*: add most of the required setup_common_bufsiz() calls
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
@@ -288,6 +288,7 @@ struct globals {
|
||||
} FIX_ALIASING;
|
||||
#define G (*(struct globals*)bb_common_bufsiz1)
|
||||
#define INIT_G() do { \
|
||||
setup_common_bufsiz(); \
|
||||
IF_NOT_FEATURE_MDEV_CONF(G.cur_rule.maj = -1;) \
|
||||
IF_NOT_FEATURE_MDEV_CONF(G.cur_rule.mode = 0660;) \
|
||||
} while (0)
|
||||
|
||||
@@ -76,6 +76,7 @@ struct swap_header_v1 {
|
||||
|
||||
#define NWORDS 129
|
||||
#define hdr ((struct swap_header_v1*)bb_common_bufsiz1)
|
||||
#define INIT_G() do { setup_common_bufsiz(); } while (0)
|
||||
|
||||
struct BUG_sizes {
|
||||
char swap_header_v1_wrong[sizeof(*hdr) != (NWORDS * 4) ? -1 : 1];
|
||||
@@ -93,6 +94,8 @@ int mkswap_main(int argc UNUSED_PARAM, char **argv)
|
||||
off_t len;
|
||||
const char *label = "";
|
||||
|
||||
INIT_G();
|
||||
|
||||
opt_complementary = "-1"; /* at least one param */
|
||||
/* TODO: -p PAGESZ, -U UUID */
|
||||
getopt32(argv, "L:", &label);
|
||||
|
||||
@@ -33,10 +33,10 @@ struct globals {
|
||||
struct termios new_settings;
|
||||
} FIX_ALIASING;
|
||||
#define G (*(struct globals*)bb_common_bufsiz1)
|
||||
#define INIT_G() ((void)0)
|
||||
#define initial_settings (G.initial_settings)
|
||||
#define new_settings (G.new_settings )
|
||||
#define cin_fileno (G.cin_fileno )
|
||||
#define INIT_G() do { setup_common_bufsiz(); } while (0)
|
||||
|
||||
#define setTermSettings(fd, argp) \
|
||||
do { \
|
||||
|
||||
@@ -457,7 +457,7 @@ enum { GETMNTENT_BUFSIZE = COMMON_BUFSIZE - offsetof(struct globals, getmntent_b
|
||||
#endif
|
||||
#define fslist (G.fslist )
|
||||
#define getmntent_buf (G.getmntent_buf )
|
||||
#define INIT_G() do { } while (0)
|
||||
#define INIT_G() do { setup_common_bufsiz(); } while (0)
|
||||
|
||||
#if ENABLE_FEATURE_MTAB_SUPPORT
|
||||
/*
|
||||
|
||||
@@ -72,7 +72,7 @@ struct globals {
|
||||
#define save_g_flags() ((void)0)
|
||||
#define restore_g_flags() ((void)0)
|
||||
#endif
|
||||
#define INIT_G() do { } while (0)
|
||||
#define INIT_G() do { setup_common_bufsiz(); } while (0)
|
||||
|
||||
#define do_swapoff (applet_name[5] == 'f')
|
||||
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
#define BUFFER_SIZE 16*1024
|
||||
|
||||
#define env ((char **)bb_common_bufsiz1)
|
||||
#define INIT_G() do { setup_common_bufsiz(); } while (0)
|
||||
enum {
|
||||
MAX_ENV = COMMON_BUFSIZE / sizeof(env[0]) - 1,
|
||||
};
|
||||
@@ -46,6 +47,8 @@ int uevent_main(int argc UNUSED_PARAM, char **argv)
|
||||
struct sockaddr_nl sa;
|
||||
int fd;
|
||||
|
||||
INIT_G();
|
||||
|
||||
argv++;
|
||||
|
||||
// Subscribe for UEVENT kernel messages
|
||||
|
||||
Reference in New Issue
Block a user