aboutsummaryrefslogtreecommitdiff
path: root/miscutils/hdparm.c
diff options
context:
space:
mode:
Diffstat (limited to 'miscutils/hdparm.c')
-rw-r--r--miscutils/hdparm.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/miscutils/hdparm.c b/miscutils/hdparm.c
index 8e201ac35..b4c5876d4 100644
--- a/miscutils/hdparm.c
+++ b/miscutils/hdparm.c
@@ -63,6 +63,7 @@
63//usage: "\n -z Reread partition table" 63//usage: "\n -z Reread partition table"
64 64
65#include "libbb.h" 65#include "libbb.h"
66#include "common_bufsiz.h"
66/* must be _after_ libbb.h: */ 67/* must be _after_ libbb.h: */
67#include <linux/hdreg.h> 68#include <linux/hdreg.h>
68#include <sys/mount.h> 69#include <sys/mount.h>
@@ -367,7 +368,7 @@ struct globals {
367 unsigned char flushcache[4] = { WIN_FLUSHCACHE, 0, 0, 0 }; 368 unsigned char flushcache[4] = { WIN_FLUSHCACHE, 0, 0, 0 };
368#endif 369#endif
369} FIX_ALIASING; 370} FIX_ALIASING;
370#define G (*(struct globals*)&bb_common_bufsiz1) 371#define G (*(struct globals*)bb_common_bufsiz1)
371#define get_identity (G.get_identity ) 372#define get_identity (G.get_identity )
372#define get_geom (G.get_geom ) 373#define get_geom (G.get_geom )
373#define do_flush (G.do_flush ) 374#define do_flush (G.do_flush )
@@ -431,6 +432,7 @@ struct globals {
431#define hwif_ctrl (G.hwif_ctrl ) 432#define hwif_ctrl (G.hwif_ctrl )
432#define hwif_irq (G.hwif_irq ) 433#define hwif_irq (G.hwif_irq )
433#define INIT_G() do { \ 434#define INIT_G() do { \
435 setup_common_bufsiz(); \
434 BUILD_BUG_ON(sizeof(G) > COMMON_BUFSIZE); \ 436 BUILD_BUG_ON(sizeof(G) > COMMON_BUFSIZE); \
435} while (0) 437} while (0)
436 438