Source-Changes-HG archive

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

[src/trunk]: src/sys/dev Fix FSSIOCSET50: needs to use the 5.0 struct fss_set...



details:   https://anonhg.NetBSD.org/src/rev/64603823dbc5
branches:  trunk
changeset: 771706:64603823dbc5
user:      bouyer <bouyer%NetBSD.org@localhost>
date:      Tue Nov 29 19:17:03 2011 +0000

description:
Fix FSSIOCSET50: needs to use the 5.0 struct fss_set, not the current one.

diffstat:

 sys/dev/fss.c    |  10 ++++++++--
 sys/dev/fssvar.h |  10 ++++++++--
 2 files changed, 16 insertions(+), 4 deletions(-)

diffs (67 lines):

diff -r 0af9225f4060 -r 64603823dbc5 sys/dev/fss.c
--- a/sys/dev/fss.c     Tue Nov 29 17:28:45 2011 +0000
+++ b/sys/dev/fss.c     Tue Nov 29 19:17:03 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: fss.c,v 1.78 2011/08/07 14:03:16 rmind Exp $   */
+/*     $NetBSD: fss.c,v 1.79 2011/11/29 19:17:03 bouyer Exp $  */
 
 /*-
  * Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: fss.c,v 1.78 2011/08/07 14:03:16 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fss.c,v 1.79 2011/11/29 19:17:03 bouyer Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -300,11 +300,17 @@
 {
        int error;
        struct fss_softc *sc = device_lookup_private(&fss_cd, minor(dev));
+       struct fss_set _fss;
        struct fss_set *fss = (struct fss_set *)data;
+       struct fss_set50 *fss50 = (struct fss_set50 *)data;
        struct fss_get *fsg = (struct fss_get *)data;
 
        switch (cmd) {
        case FSSIOCSET50:
+               fss = &_fss;
+               fss->fss_mount = fss50->fss_mount;
+               fss->fss_bstore = fss50->fss_bstore;
+               fss->fss_csize = fss50->fss_csize;
                fss->fss_flags = 0;
                /* Fall through */
        case FSSIOCSET:
diff -r 0af9225f4060 -r 64603823dbc5 sys/dev/fssvar.h
--- a/sys/dev/fssvar.h  Tue Nov 29 17:28:45 2011 +0000
+++ b/sys/dev/fssvar.h  Tue Nov 29 19:17:03 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: fssvar.h,v 1.25 2011/02/24 09:38:57 hannken Exp $      */
+/*     $NetBSD: fssvar.h,v 1.26 2011/11/29 19:17:03 bouyer Exp $       */
 
 /*-
  * Copyright (c) 2003, 2007 The NetBSD Foundation, Inc.
@@ -37,6 +37,12 @@
 #define FSS_UNCONFIG_ON_CLOSE  0x01    /* Unconfigure on last close */
 #define FSS_UNLINK_ON_CREATE   0x02    /* Unlink backing store on create */
 
+struct fss_set50 {
+       char            *fss_mount;     /* Mount point of file system */
+       char            *fss_bstore;    /* Path of backing store */
+       blksize_t       fss_csize;      /* Preferred cluster size */
+};
+
 struct fss_set {
        char            *fss_mount;     /* Mount point of file system */
        char            *fss_bstore;    /* Path of backing store */
@@ -57,7 +63,7 @@
 #define FSSIOCCLR      _IO('F', 2)                     /* Unconfigure */
 #define FSSIOFSET      _IOW('F', 3, int)               /* Set flags */
 #define FSSIOFGET      _IOR('F', 4, int)               /* Get flags */
-#define FSSIOCSET50    _IOW('F', 0, struct fss_set)    /* Old configure */
+#define FSSIOCSET50    _IOW('F', 0, struct fss_set50)  /* Old configure */
 
 #ifdef _KERNEL
 



Home | Main Index | Thread Index | Old Index