summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormux <mux@FreeBSD.org>2002-11-07 21:15:02 +0000
committermux <mux@FreeBSD.org>2002-11-07 21:15:02 +0000
commit5c733089f3f667e46f935e18c21a6b814bfb8941 (patch)
treecde56accd183f9cb5850e3b094035ee83f7f965e
parentb79b5c3b5583e03230f8db18d972673b2f4a7bd6 (diff)
downloadFreeBSD-src-5c733089f3f667e46f935e18c21a6b814bfb8941.zip
FreeBSD-src-5c733089f3f667e46f935e18c21a6b814bfb8941.tar.gz
- Use a better definition for MNAMELEN which doesn't require
to have one #ifdef per architecture. - Change a space to a tab after a nearby #define. Obtained from: bde
-rw-r--r--sys/kern/vfs_mount.c2
-rw-r--r--sys/sys/mount.h9
2 files changed, 3 insertions, 8 deletions
diff --git a/sys/kern/vfs_mount.c b/sys/kern/vfs_mount.c
index 2d6e660..58e8434 100644
--- a/sys/kern/vfs_mount.c
+++ b/sys/kern/vfs_mount.c
@@ -1498,7 +1498,7 @@ vfs_mountroot_try(char *mountfrom)
vfsname = malloc(MFSNAMELEN, M_MOUNT, M_WAITOK);
path = malloc(MNAMELEN, M_MOUNT, M_WAITOK);
vfsname[0] = path[0] = 0;
- sprintf(patt, "%%%d[a-z0-9]:%%%ds", MFSNAMELEN, MNAMELEN);
+ sprintf(patt, "%%%d[a-z0-9]:%%%zds", MFSNAMELEN, MNAMELEN);
if (sscanf(mountfrom, patt, vfsname, path) < 1)
goto done;
diff --git a/sys/sys/mount.h b/sys/sys/mount.h
index 55fd547..43e4217 100644
--- a/sys/sys/mount.h
+++ b/sys/sys/mount.h
@@ -73,13 +73,8 @@ struct fid {
* filesystem statistics
*/
-#define MFSNAMELEN 16 /* length of fs type name, including null */
-#if defined(__i386__) || defined(__powerpc__)
-#define MNAMELEN 80 /* length of buffer for returned name */
-#endif
-#if defined(__alpha__) || defined(__ia64__) || defined(__sparc64__)
-#define MNAMELEN 72 /* length of buffer for returned name */
-#endif
+#define MFSNAMELEN 16 /* length of fs type name, including null */
+#define MNAMELEN (88 - 2 * sizeof(long)) /* size of on/from name bufs */
struct statfs {
long f_spare2; /* placeholder */
OpenPOWER on IntegriCloud