X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=init%2Fbootchartd.c;h=92aaade0ffd9ac9c8a90f582b8d60046041f3514;hb=31c765081dc41f158786545fbea9294be4685bd2;hp=9fd62335782d7f4570e0e2bf97eeb9b5e702ebcc;hpb=c158601d50c2fab56ed0043989ba83fa9cd7f96a;p=oweals%2Fbusybox.git diff --git a/init/bootchartd.c b/init/bootchartd.c index 9fd623357..92aaade0f 100644 --- a/init/bootchartd.c +++ b/init/bootchartd.c @@ -47,6 +47,7 @@ //config: and /etc/bootchartd.conf files. #include "libbb.h" +#include "common_bufsiz.h" /* After libbb.h, since it needs sys/types.h on some systems */ #include @@ -60,6 +61,12 @@ # endif #endif +#if !ENABLE_TAR && !ENABLE_WERROR +# warning Note: bootchartd requires tar command, but you did not select it. +#elif !ENABLE_FEATURE_SEAMLESS_GZ && !ENABLE_WERROR +# warning Note: bootchartd requires tar -z support, but you did not select it. +#endif + #define BC_VERSION_STR "0.8" /* For debugging, set to 0: @@ -109,8 +116,8 @@ struct globals { char jiffy_line[COMMON_BUFSIZE]; } FIX_ALIASING; -#define G (*(struct globals*)&bb_common_bufsiz1) -#define INIT_G() do { } while (0) +#define G (*(struct globals*)bb_common_bufsiz1) +#define INIT_G() do { setup_common_bufsiz(); } while (0) static void dump_file(FILE *fp, const char *filename) { @@ -187,7 +194,7 @@ static char *make_tempdir(void) * Since we unmount it at once, we can mount it anywhere. * Try a few locations which are likely ti exist. */ - static const char dirs[] = "/mnt\0""/tmp\0""/boot\0""/proc\0"; + static const char dirs[] ALIGN1 = "/mnt\0""/tmp\0""/boot\0""/proc\0"; const char *try_dir = dirs; while (mount("none", try_dir, "tmpfs", MS_SILENT, "size=16m") != 0) { try_dir += strlen(try_dir) + 1;