-static char *svdir;
-static unsigned long dev;
-static unsigned long ino;
-static struct service {
- unsigned long dev;
- unsigned long ino;
- int pid;
- int isgone;
-} *sv;
-static int svnum;
-static int check = 1;
-static char *rplog;
-static int rploglen;
-static int logpipe[2];
-static iopause_fd io[1];
-static struct taia stamplog;
-static int exitsoon;
-static int pgrp;
+/* Should be not needed - all dirs are on same FS, right? */
+#define CHECK_DEVNO_TOO 0
+
+struct service {
+#if CHECK_DEVNO_TOO
+ dev_t dev;
+#endif
+ ino_t ino;
+ pid_t pid;
+ smallint isgone;
+};
+
+struct globals {
+ struct service *sv;
+ char *svdir;
+ int svnum;
+#if ENABLE_FEATURE_RUNSVDIR_LOG
+ char *rplog;
+ int rploglen;
+ struct fd_pair logpipe;
+ struct pollfd pfd[1];
+ unsigned stamplog;
+#endif
+ smallint need_rescan; /* = 1; */
+ smallint set_pgrp;
+};
+#define G (*(struct globals*)&bb_common_bufsiz1)
+#define sv (G.sv )
+#define svdir (G.svdir )
+#define svnum (G.svnum )
+#define rplog (G.rplog )
+#define rploglen (G.rploglen )
+#define logpipe (G.logpipe )
+#define pfd (G.pfd )
+#define stamplog (G.stamplog )
+#define need_rescan (G.need_rescan )
+#define set_pgrp (G.set_pgrp )
+#define INIT_G() do { \
+ need_rescan = 1; \
+} while (0)