Add USE_FAKE_SOCKET compile option
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>
Mon, 2 Apr 2007 06:36:25 +0000 (16:36 +1000)
committerJeremy Kerr <jk@ozlabs.org>
Tue, 3 Apr 2007 04:16:03 +0000 (14:16 +1000)
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
devices/udev-helper.c

index f54ca238fd03178d165a169c520c36efa2f6b5e0..c113e55432177217c7fc144ded1b9e4ddc11ce69 100644 (file)
 #include <sys/ioctl.h>
 
 #include "udev-helper.h"
-#define REMOVABLE_SLEEP_DELAY  2
-
 #include "petitboot-paths.h"
 
+/* Define below to operate without the frontend */
+#undef USE_FAKE_SOCKET
+
+/* Delay in seconds between polling of removable devices */
+#define REMOVABLE_SLEEP_DELAY  2
+
 extern struct parser native_parser;
 extern struct parser yaboot_parser;
 static FILE *logf;
@@ -195,7 +199,7 @@ int remove_device(const char *dev_path)
 
 int connect_to_socket()
 {
-#if 1
+#ifndef USE_FAKE_SOCKET
        int fd;
        struct sockaddr_un addr;