NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

kern/38043: dkctl doesn't display device after addwedge



>Number:         38043
>Category:       kern
>Synopsis:       dkctl doesn't display device after addwedge
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Feb 16 17:10:00 +0000 2008
>Originator:     Wolfgang Solfrank
>Release:        NetBSD 4.99.54 2008-02-16
>Organization:
NetBSD
>Environment:
System: NetBSD ws.Solfrank.net 4.99.54 NetBSD 4.99.54 (ws) #1: Sat Feb 16 
15:45:39 MET 2008 
ws%ws.Solfrank.net@localhost:/src/obj.amd64/sys/arch/amd64/compile/ws amd64
Architecture: x86_64
Machine: amd64

>Description:
According to the dkctl(8), the utility should, when used with the
addwedge command, display "the virtual block device assigned to the
wedge ... after the wedge has been successfully created."
Currently this doesn't happen.

>How-To-Repeat:
Add some wedge with (e.g.)
        dkctl wd0 addwedge swapspace 1048576 1048576 swap
and wonder why there is no output.

>Fix:
Apply the following diff:

Index: dkctl.c
===================================================================
RCS file: /cvsroot/src/sbin/dkctl/dkctl.c,v
retrieving revision 1.16
diff -u -r1.16 dkctl.c
--- dkctl.c     17 Jun 2006 02:16:19 -0000      1.16
+++ dkctl.c     16 Feb 2008 16:39:04 -0000
@@ -533,6 +533,8 @@
 
        if (ioctl(fd, DIOCAWEDGE, &dkw) == -1)
                err(1, "%s: addwedge", dvname);
+
+       printf("%s\n", dkw.dkw_devname);
 }
 
 void



Home | Main Index | Thread Index | Old Index