Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/vinum vinumioctl():



details:   https://anonhg.NetBSD.org/src/rev/99241b5e825e
branches:  trunk
changeset: 570033:99241b5e825e
user:      jdolecek <jdolecek%NetBSD.org@localhost>
date:      Sat Sep 18 07:38:26 2004 +0000

description:
vinumioctl():
actually, those return statements were reachable, so put them back to the
appropriate case statements, and add some break statements for readability

diffstat:

 sys/dev/vinum/vinumioctl.c |  13 ++++++++-----
 1 files changed, 8 insertions(+), 5 deletions(-)

diffs (65 lines):

diff -r 76e55684ed9c -r 99241b5e825e sys/dev/vinum/vinumioctl.c
--- a/sys/dev/vinum/vinumioctl.c        Sat Sep 18 06:49:27 2004 +0000
+++ b/sys/dev/vinum/vinumioctl.c        Sat Sep 18 07:38:26 2004 +0000
@@ -41,7 +41,7 @@
  * otherwise) arising in any way out of the use of this software, even if
  * advised of the possibility of such damage.
  *
- * $Id: vinumioctl.c,v 1.2 2004/09/17 19:21:03 jdolecek Exp $
+ * $Id: vinumioctl.c,v 1.3 2004/09/18 07:38:26 jdolecek Exp $
  * $FreeBSD$
  */
 
@@ -92,7 +92,7 @@
            switch (cmd) {
            case DIOCGDINFO:                                /* get disk label */
                get_volume_label(sd->name, 1, sd->sectors, (struct disklabel *) data);
-               break;
+               return 0;
 
                /*
                 * We don't have this stuff on hardware,
@@ -106,6 +106,7 @@
            default:
                return ENOTTY;                              /* not my kind of ioctl */
            }
+           break;
 
        case VINUM_PLEX_TYPE:
            objno = Plexno(dev);
@@ -115,7 +116,7 @@
            switch (cmd) {
            case DIOCGDINFO:                                /* get disk label */
                get_volume_label(plex->name, 1, plex->length, (struct disklabel *) data);
-               break;
+               return 0;
 
                /*
                 * We don't have this stuff on hardware,
@@ -129,6 +130,7 @@
            default:
                return ENOTTY;                              /* not my kind of ioctl */
            }
+           break;
 
        case VINUM_VOLUME_TYPE:
            objno = Volno(dev);
@@ -142,7 +144,7 @@
            switch (cmd) {
            case DIOCGDINFO:                                /* get disk label */
                get_volume_label(vol->name, vol->plexes, vol->size, (struct disklabel *) data);
-               break;
+               return 0;
 
                /*
                 * Care!  DIOCGPART returns *pointers* to
@@ -153,7 +155,8 @@
                get_volume_label(vol->name, vol->plexes, vol->size, &vol->label);
                ((struct partinfo *) data)->disklab = &vol->label;
                ((struct partinfo *) data)->part = &vol->label.d_partitions[0];
-               break;
+               return 0;
+
                /*
                 * We don't have this stuff on hardware,
                 * so just pretend to do it so that



Home | Main Index | Thread Index | Old Index