Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/fs/cd9660 define and use ISO_MAXNAMLEN instead of MAXNAMLEN



details:   https://anonhg.NetBSD.org/src/rev/3456c66ad5c6
branches:  trunk
changeset: 769922:3456c66ad5c6
user:      christos <christos%NetBSD.org@localhost>
date:      Tue Sep 27 01:01:43 2011 +0000

description:
define and use ISO_MAXNAMLEN instead of MAXNAMLEN

diffstat:

 sys/fs/cd9660/cd9660_util.c   |  8 ++++----
 sys/fs/cd9660/cd9660_vfsops.c |  6 +++---
 sys/fs/cd9660/iso.h           |  4 +++-
 3 files changed, 10 insertions(+), 8 deletions(-)

diffs (76 lines):

diff -r 5c31c2cbcc7d -r 3456c66ad5c6 sys/fs/cd9660/cd9660_util.c
--- a/sys/fs/cd9660/cd9660_util.c       Tue Sep 27 00:56:14 2011 +0000
+++ b/sys/fs/cd9660/cd9660_util.c       Tue Sep 27 01:01:43 2011 +0000
@@ -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 @@
                        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++;
                        }
diff -r 5c31c2cbcc7d -r 3456c66ad5c6 sys/fs/cd9660/cd9660_vfsops.c
--- a/sys/fs/cd9660/cd9660_vfsops.c     Tue Sep 27 00:56:14 2011 +0000
+++ b/sys/fs/cd9660/cd9660_vfsops.c     Tue Sep 27 01:01:43 2011 +0000
@@ -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 @@
        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;
diff -r 5c31c2cbcc7d -r 3456c66ad5c6 sys/fs/cd9660/iso.h
--- a/sys/fs/cd9660/iso.h       Tue Sep 27 00:56:14 2011 +0000
+++ b/sys/fs/cd9660/iso.h       Tue Sep 27 01:01:43 2011 +0000
@@ -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 @@
 #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)];



Home | Main Index | Thread Index | Old Index