Sat Oct 10 23:39:43 2015 UTC ()
remove incorrect comment (from kre)


(christos)
diff -r1.84 -r1.85 src/sys/dev/dkwedge/dk.c

cvs diff -r1.84 -r1.85 src/sys/dev/dkwedge/dk.c (expand / switch to unified diff)

--- src/sys/dev/dkwedge/dk.c 2015/10/06 11:22:40 1.84
+++ src/sys/dev/dkwedge/dk.c 2015/10/10 23:39:43 1.85
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: dk.c,v 1.84 2015/10/06 11:22:40 jmcneill Exp $ */ 1/* $NetBSD: dk.c,v 1.85 2015/10/10 23:39:43 christos Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 2004, 2005, 2006, 2007 The NetBSD Foundation, Inc. 4 * Copyright (c) 2004, 2005, 2006, 2007 The NetBSD Foundation, Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * This code is derived from software contributed to The NetBSD Foundation 7 * This code is derived from software contributed to The NetBSD Foundation
8 * by Jason R. Thorpe. 8 * by Jason R. Thorpe.
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without 10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions 11 * modification, are permitted provided that the following conditions
12 * are met: 12 * are met:
13 * 1. Redistributions of source code must retain the above copyright 13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer. 14 * notice, this list of conditions and the following disclaimer.
@@ -20,27 +20,27 @@ @@ -20,27 +20,27 @@
20 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 20 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 21 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
23 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 23 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 24 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 26 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 27 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29 * POSSIBILITY OF SUCH DAMAGE. 29 * POSSIBILITY OF SUCH DAMAGE.
30 */ 30 */
31 31
32#include <sys/cdefs.h> 32#include <sys/cdefs.h>
33__KERNEL_RCSID(0, "$NetBSD: dk.c,v 1.84 2015/10/06 11:22:40 jmcneill Exp $"); 33__KERNEL_RCSID(0, "$NetBSD: dk.c,v 1.85 2015/10/10 23:39:43 christos Exp $");
34 34
35#ifdef _KERNEL_OPT 35#ifdef _KERNEL_OPT
36#include "opt_dkwedge.h" 36#include "opt_dkwedge.h"
37#endif 37#endif
38 38
39#include <sys/param.h> 39#include <sys/param.h>
40#include <sys/systm.h> 40#include <sys/systm.h>
41#include <sys/proc.h> 41#include <sys/proc.h>
42#include <sys/errno.h> 42#include <sys/errno.h>
43#include <sys/pool.h> 43#include <sys/pool.h>
44#include <sys/ioctl.h> 44#include <sys/ioctl.h>
45#include <sys/disklabel.h> 45#include <sys/disklabel.h>
46#include <sys/disk.h> 46#include <sys/disk.h>
@@ -674,28 +674,26 @@ dkwedge_delall1(struct disk *pdk, bool i @@ -674,28 +674,26 @@ dkwedge_delall1(struct disk *pdk, bool i
674 } 674 }
675 strcpy(dkw.dkw_parent, pdk->dk_name); 675 strcpy(dkw.dkw_parent, pdk->dk_name);
676 strlcpy(dkw.dkw_devname, device_xname(sc->sc_dev), 676 strlcpy(dkw.dkw_devname, device_xname(sc->sc_dev),
677 sizeof(dkw.dkw_devname)); 677 sizeof(dkw.dkw_devname));
678 mutex_exit(&pdk->dk_openlock); 678 mutex_exit(&pdk->dk_openlock);
679 (void) dkwedge_del1(&dkw, flags); 679 (void) dkwedge_del1(&dkw, flags);
680 } 680 }
681} 681}
682 682
683/* 683/*
684 * dkwedge_list: [exported function] 684 * dkwedge_list: [exported function]
685 * 685 *
686 * List all of the wedges on a particular disk. 686 * List all of the wedges on a particular disk.
687 * If p == NULL, the buffer is in kernel space. Otherwise, it is 
688 * in user space of the specified process. 
689 */ 687 */
690int 688int
691dkwedge_list(struct disk *pdk, struct dkwedge_list *dkwl, struct lwp *l) 689dkwedge_list(struct disk *pdk, struct dkwedge_list *dkwl, struct lwp *l)
692{ 690{
693 struct uio uio; 691 struct uio uio;
694 struct iovec iov; 692 struct iovec iov;
695 struct dkwedge_softc *sc; 693 struct dkwedge_softc *sc;
696 struct dkwedge_info dkw; 694 struct dkwedge_info dkw;
697 int error = 0; 695 int error = 0;
698 696
699 iov.iov_base = dkwl->dkwl_buf; 697 iov.iov_base = dkwl->dkwl_buf;
700 iov.iov_len = dkwl->dkwl_bufsize; 698 iov.iov_len = dkwl->dkwl_bufsize;
701 699