Module Name: src
Committed By: bouyer
Date: Tue Nov 29 19:17:03 UTC 2011
Modified Files:
src/sys/dev: fss.c fssvar.h
Log Message:
Fix FSSIOCSET50: needs to use the 5.0 struct fss_set, not the current one.
To generate a diff of this commit:
cvs rdiff -u -r1.78 -r1.79 src/sys/dev/fss.c
cvs rdiff -u -r1.25 -r1.26 src/sys/dev/fssvar.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/dev/fss.c
diff -u src/sys/dev/fss.c:1.78 src/sys/dev/fss.c:1.79
--- src/sys/dev/fss.c:1.78 Sun Aug 7 14:03:16 2011
+++ src/sys/dev/fss.c Tue Nov 29 19:17:03 2011
@@ -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 @@ fss_ioctl(dev_t dev, u_long cmd, void *d
{
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:
Index: src/sys/dev/fssvar.h
diff -u src/sys/dev/fssvar.h:1.25 src/sys/dev/fssvar.h:1.26
--- src/sys/dev/fssvar.h:1.25 Thu Feb 24 09:38:57 2011
+++ src/sys/dev/fssvar.h Tue Nov 29 19:17:03 2011
@@ -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 @@ struct fss_get {
#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