aboutsummaryrefslogtreecommitdiff
path: root/util-linux/mdev.c
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2008-05-31 18:27:58 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2008-05-31 18:27:58 +0000
commitf4e6bd0bf3c09f9672107ef1c45174c2ce13269a (patch)
tree89144942f2b94c6597affb71999c51c8845e37a0 /util-linux/mdev.c
parent1d1bba4e99f56874f1f0da1a3e0cc39f62f0e709 (diff)
downloadbusybox-w32-f4e6bd0bf3c09f9672107ef1c45174c2ce13269a.tar.gz
busybox-w32-f4e6bd0bf3c09f9672107ef1c45174c2ce13269a.tar.bz2
busybox-w32-f4e6bd0bf3c09f9672107ef1c45174c2ce13269a.zip
mdev: add commented-out debug code to open stdio.
Diffstat (limited to 'util-linux/mdev.c')
-rw-r--r--util-linux/mdev.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/util-linux/mdev.c b/util-linux/mdev.c
index a32c04f6b..057b9e4ff 100644
--- a/util-linux/mdev.c
+++ b/util-linux/mdev.c
@@ -392,6 +392,15 @@ int mdev_main(int argc, char **argv)
392 char *env_path; 392 char *env_path;
393 RESERVE_CONFIG_BUFFER(temp, PATH_MAX + SCRATCH_SIZE); 393 RESERVE_CONFIG_BUFFER(temp, PATH_MAX + SCRATCH_SIZE);
394 394
395#ifdef YOU_WANT_TO_DEBUG_HOTPLUG_EVENTS
396 /* Kernel cannot provide suitable stdio fds for us, do it ourself */
397 /* Replace LOGFILE by other file or device name if you need */
398#define LOGFILE "/dev/console"
399 xmove_fd(xopen("/dev/null", O_RDONLY), STDIN_FILENO);
400 xmove_fd(xopen(LOGFILE, O_WRONLY|O_APPEND), STDOUT_FILENO);
401 xmove_fd(xopen(LOGFILE, O_WRONLY|O_APPEND), STDERR_FILENO);
402#endif
403
395 xchdir("/dev"); 404 xchdir("/dev");
396 405
397 if (argc == 2 && !strcmp(argv[1], "-s")) { 406 if (argc == 2 && !strcmp(argv[1], "-s")) {