- 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
This commit is contained in:
Maxime Henrion 2002-11-07 21:15:02 +00:00
parent 1a8fc7d6a0
commit b65d1ba9dd
2 changed files with 3 additions and 8 deletions

View File

@ -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;

View File

@ -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 */