define and use ISO_MAXNAMLEN instead of MAXNAMLEN

This commit is contained in:
christos 2011-09-27 01:01:43 +00:00
parent 1c4884ad71
commit 4fa49ab869
3 changed files with 10 additions and 8 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: cd9660_util.c,v 1.9 2008/02/27 19:43:36 matt Exp $ */
/* $NetBSD: cd9660_util.c,v 1.10 2011/09/27 01:01:43 christos Exp $ */
/*-
* Copyright (c) 1994
@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: cd9660_util.c,v 1.9 2008/02/27 19:43:36 matt Exp $");
__KERNEL_RCSID(0, "$NetBSD: cd9660_util.c,v 1.10 2011/09/27 01:01:43 christos Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -187,10 +187,10 @@ isofntrans(const u_char *infn, int infnlen, u_char *outfn, u_short *outfnlen,
break;
}
sz = wput(outfn, MAXNAMLEN - fnidx, c, joliet_level);
sz = wput(outfn, ISO_MAXNAMLEN - fnidx, c, joliet_level);
if (sz == 0) {
/* not enough space to write the character */
if (fnidx < MAXNAMLEN) {
if (fnidx < ISO_MAXNAMLEN) {
*outfn = '?';
fnidx++;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: cd9660_vfsops.c,v 1.72 2011/06/12 03:35:52 rmind Exp $ */
/* $NetBSD: cd9660_vfsops.c,v 1.73 2011/09/27 01:01:43 christos Exp $ */
/*-
* Copyright (c) 1994
@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: cd9660_vfsops.c,v 1.72 2011/06/12 03:35:52 rmind Exp $");
__KERNEL_RCSID(0, "$NetBSD: cd9660_vfsops.c,v 1.73 2011/09/27 01:01:43 christos Exp $");
#if defined(_KERNEL_OPT)
#include "opt_compat_netbsd.h"
@ -444,7 +444,7 @@ iso_mountfs(struct vnode *devvp, struct mount *mp, struct lwp *l,
mp->mnt_stat.f_fsidx.__fsid_val[0] = (long)dev;
mp->mnt_stat.f_fsidx.__fsid_val[1] = makefstype(MOUNT_CD9660);
mp->mnt_stat.f_fsid = mp->mnt_stat.f_fsidx.__fsid_val[0];
mp->mnt_stat.f_namemax = MAXNAMLEN;
mp->mnt_stat.f_namemax = ISO_MAXNAMLEN;
mp->mnt_flag |= MNT_LOCAL;
mp->mnt_iflag |= IMNT_MPSAFE;
mp->mnt_dev_bshift = iso_bsize;

View File

@ -1,4 +1,4 @@
/* $NetBSD: iso.h,v 1.9 2007/01/27 07:20:31 cbiere Exp $ */
/* $NetBSD: iso.h,v 1.10 2011/09/27 01:01:44 christos Exp $ */
/*-
* Copyright (c) 1994
@ -62,6 +62,8 @@ struct iso_volume_descriptor {
#define ISO_STANDARD_ID "CD001"
#define ISO_ECMA_ID "CDW01"
#define ISO_MAXNAMLEN 255
struct iso_primary_descriptor {
char type [ISODCL ( 1, 1)]; /* 711 */
char id [ISODCL ( 2, 6)];