Subject: bin/19278: libexec/lfs_cleanerd/library.c has a typo of a raw device name
To: None <gnats-bugs@gnats.netbsd.org>
From: Ryo HAYASAKA <ryoh@jaist.ac.jp>
List: netbsd-bugs
Date: 12/05/2002 05:15:45
>Number:         19278
>Category:       bin
>Synopsis:       libexec/lfs_cleanerd/library.c has a typo of a raw device name
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Dec 04 12:16:00 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     Ryo HAYASAKA
>Release:        NetBSD 1.6K
>Organization:
Japan Advanced Institute of Science and Technology (JAIST)
>Environment:
System: NetBSD bonnie.jaist.ac.jp 1.6K NetBSD 1.6K (BONNIE) #347: Wed Dec 4 22:25:54 JST 2002 ryoh@bonnie.jaist.ac.jp:/home/ryoh/util/compile/BONNIE i386
Architecture: i386
Machine: i386
>Description:
lfs_cleanerd exits because of a typo of a raw device name.

In /var/log/messages:

Dec  5 04:51:33 bonnie lfs_cleanerd[171]: Cannot open `/dev/r/wd0a' (No such file or directory)
Dec  5 04:51:33 bonnie lfs_cleanerd[161]: /e: cleanerd looping, exiting
	
>How-To-Repeat:
Mount a lfs file system
	
>Fix:
Index: library.c
===================================================================
RCS file: /usr/cvsup/basesrc/libexec/lfs_cleanerd/library.c,v
retrieving revision 1.30
diff -d -p -u -r1.30 library.c
--- library.c   29 Nov 2002 17:15:46 -0000      1.30
+++ library.c   4 Dec 2002 19:58:04 -0000
@@ -161,7 +161,7 @@ getdevfd(FS_INFO *fsp)
        if (dev_fd != -1)
                return dev_fd;
 
-       (void)snprintf(rdev, sizeof(rdev), "/dev/r/%s",
+       (void)snprintf(rdev, sizeof(rdev), "/dev/r%s",
            fsp->fi_statfsp->f_mntfromname + 5);
        if ((dev_fd = open(rdev, O_RDONLY)) == -1) {
                syslog(LOG_ERR, "Cannot open `%s' (%m)", rdev);
	
>Release-Note:
>Audit-Trail:
>Unformatted: