Subject: bin/5480: lfs_cleanerd has wrong arguments to getopt
To: None <gnats-bugs@gnats.netbsd.org>
From: Konrad Schroder <perseant@hhhh.org>
List: netbsd-bugs
Date: 05/21/1998 09:39:04
>Number:         5480
>Category:       bin
>Synopsis:       lfs_cleanerd passes "smd" to getopt, but really expects "bdmn:r:s"
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    bin-bug-people (Utility Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu May 21 09:50:01 1998
>Last-Modified:
>Originator:     Konrad Schroder
>Organization:
Konrad Schroder           http://www.hitl.washington.edu/people/perseant/
System Administrator                         perseant@hitl.washington.edu
Human Interface Technology Lab                      Voice: (206) 616-1478
Box 352142, University of Washington, 98195, USA      FAX: (206) 543-5380
>Release:        -current as of Thu May 21 1998
>Environment:
	
System: NetBSD gro 1.3.1 NetBSD 1.3.1 (GRO) #2: Tue May 12 11:50:52 PDT 1998 perseant@gro:/usr/src/sys/arch/i386/compile/GRO i386
>Description:
	lfs_cleanerd passes "smd" to getopt, and then switches for a number of other options.  So, the call to getopt
	needs to be expanded to include those options.
>How-To-Repeat:
	/usr/libexec/lfs_cleanerd -n 2 /lfs
>Fix:
*** cleanerd.c.old      Thu May 21 09:31:01 1998
--- cleanerd.c  Thu May 21 09:31:40 1998
***************
*** 171,175 ****
        clean_opts = 0;
        segs_per_clean = 1;
!       while ((opt = getopt(argc, argv, "smd")) != -1) {
                switch (opt) {
                        case 'b':
--- 171,175 ----
        clean_opts = 0;
        segs_per_clean = 1;
!       while ((opt = getopt(argc, argv, "bdmn:r:s")) != -1) {
                switch (opt) {
                        case 'b':
>Audit-Trail:
>Unformatted: