+debug-hack: Do not close fds if '--debug-messages' is given.
authorshort <>
Tue, 16 Sep 2003 15:00:21 +0000 (15:00 +0000)
committershort <>
Tue, 16 Sep 2003 15:00:21 +0000 (15:00 +0000)
 - It would lock-up usermount(1) but these two features should not meet. :-)

lufsd/daemon.c

index 2b3d6a8..b1ed7ff 100644 (file)
@@ -220,8 +220,12 @@ main(int argc, char **argv){
        if(pid == 0){
            int fd;
            const char *quiet;
+           int debug_messages;
 
            quiet = lu_opt_getchar(&cfg, "MOUNT", "quiet");
+           debug_messages = 0
+                       || lu_opt_getchar(&cfg, "MOUNT",   "debug-messages")
+                       || lu_opt_getchar(&cfg, "MOUNT", "--debug-messages");
            
            if((fd = open("/dev/tty", O_RDWR, 0)) < 0){
                WARN("couldn't open tty, assuming still ok...");
@@ -235,7 +239,7 @@ main(int argc, char **argv){
            free(nopts);
 
            /* FIXME: 'quiet' option has no meaning now; check fd_closeup(). */
-           if(1 || quiet){
+           if(!debug_messages){
                int stdfd;
 
                TRACE("going dumb...");