watchdog: stop watchdog first on startup
[oweals/busybox.git] / init / bootchartd.c
index 9fd62335782d7f4570e0e2bf97eeb9b5e702ebcc..92aaade0ffd9ac9c8a90f582b8d60046041f3514 100644 (file)
@@ -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 <sys/utsname.h>
 
 # 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:
 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;