Module Name: src Committed By: christos Date: Tue Sep 27 01:01:44 UTC 2011
Modified Files: src/sys/fs/cd9660: cd9660_util.c cd9660_vfsops.c iso.h Log Message: define and use ISO_MAXNAMLEN instead of MAXNAMLEN To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/fs/cd9660/cd9660_util.c \ src/sys/fs/cd9660/iso.h cvs rdiff -u -r1.72 -r1.73 src/sys/fs/cd9660/cd9660_vfsops.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/fs/cd9660/cd9660_util.c diff -u src/sys/fs/cd9660/cd9660_util.c:1.9 src/sys/fs/cd9660/cd9660_util.c:1.10 --- src/sys/fs/cd9660/cd9660_util.c:1.9 Wed Feb 27 14:43:36 2008 +++ src/sys/fs/cd9660/cd9660_util.c Mon Sep 26 21:01:43 2011 @@ -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 infnl 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++; } Index: src/sys/fs/cd9660/iso.h diff -u src/sys/fs/cd9660/iso.h:1.9 src/sys/fs/cd9660/iso.h:1.10 --- src/sys/fs/cd9660/iso.h:1.9 Sat Jan 27 02:20:31 2007 +++ src/sys/fs/cd9660/iso.h Mon Sep 26 21:01:44 2011 @@ -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)]; Index: src/sys/fs/cd9660/cd9660_vfsops.c diff -u src/sys/fs/cd9660/cd9660_vfsops.c:1.72 src/sys/fs/cd9660/cd9660_vfsops.c:1.73 --- src/sys/fs/cd9660/cd9660_vfsops.c:1.72 Sat Jun 11 23:35:52 2011 +++ src/sys/fs/cd9660/cd9660_vfsops.c Mon Sep 26 21:01:43 2011 @@ -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 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;