Source-Changes-HG archive

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

[src/trunk]: src/sys/fs/udf - rename UDF_MAX_NAMELEN -> UDF_MAXNAMLEN



details:   https://anonhg.NetBSD.org/src/rev/8b69790f42d8
branches:  trunk
changeset: 769928:8b69790f42d8
user:      christos <christos%NetBSD.org@localhost>
date:      Tue Sep 27 01:13:16 2011 +0000

description:
- rename UDF_MAX_NAMELEN -> UDF_MAXNAMLEN
- use NAME_MAX instead of MAXNAMLEN

diffstat:

 sys/fs/udf/udf.h        |   4 ++--
 sys/fs/udf/udf_subr.c   |  10 +++++-----
 sys/fs/udf/udf_vfsops.c |   6 +++---
 3 files changed, 10 insertions(+), 10 deletions(-)

diffs (90 lines):

diff -r 67bdb26b1914 -r 8b69790f42d8 sys/fs/udf/udf.h
--- a/sys/fs/udf/udf.h  Tue Sep 27 01:10:43 2011 +0000
+++ b/sys/fs/udf/udf.h  Tue Sep 27 01:13:16 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: udf.h,v 1.43 2010/09/25 01:42:40 matt Exp $ */
+/* $NetBSD: udf.h,v 1.44 2011/09/27 01:13:16 christos Exp $ */
 
 /*
  * Copyright (c) 2006, 2008 Reinoud Zandijk
@@ -139,7 +139,7 @@
 
 
 /* constants */
-#define UDF_MAX_NAMELEN                255                     /* as per SPEC */
+#define UDF_MAXNAMLEN          255                     /* as per SPEC */
 #define UDF_TRANS_ZERO         ((uint64_t) -1)
 #define UDF_TRANS_UNMAPPED     ((uint64_t) -2)
 #define UDF_TRANS_INTERN       ((uint64_t) -3)
diff -r 67bdb26b1914 -r 8b69790f42d8 sys/fs/udf/udf_subr.c
--- a/sys/fs/udf/udf_subr.c     Tue Sep 27 01:10:43 2011 +0000
+++ b/sys/fs/udf/udf_subr.c     Tue Sep 27 01:13:16 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: udf_subr.c,v 1.116 2011/08/16 14:29:16 mbalmer Exp $ */
+/* $NetBSD: udf_subr.c,v 1.117 2011/09/27 01:13:16 christos Exp $ */
 
 /*
  * Copyright (c) 2006, 2008 Reinoud Zandijk
@@ -29,7 +29,7 @@
 
 #include <sys/cdefs.h>
 #ifndef lint
-__KERNEL_RCSID(0, "$NetBSD: udf_subr.c,v 1.116 2011/08/16 14:29:16 mbalmer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: udf_subr.c,v 1.117 2011/09/27 01:13:16 christos Exp $");
 #endif /* not lint */
 
 
@@ -4178,7 +4178,7 @@
        } else {
                /* assume 8bit char length byte latin-1 */
                assert(*id == 8);
-               assert(strlen((char *) (id+1)) <= MAXNAMLEN);
+               assert(strlen((char *) (id+1)) <= NAME_MAX);
                strncpy((char *) result, (char *) (id+1), strlen((char *) (id+1)));
        }
        free(raw_name, M_UDFTEMP);
@@ -5259,7 +5259,7 @@
 
        /* append to the dirhash */
        /* NOTE do not use dirent anymore or it won't match later! */
-       udf_to_unix_name(dirent.d_name, MAXNAMLEN,
+       udf_to_unix_name(dirent.d_name, NAME_MAX,
                (char *) fid->data + udf_rw16(fid->l_iu), fid->l_fi, &osta_charspec);
        dirent.d_namlen = strlen(dirent.d_name);
        dirhash_enter(dirh, &dirent, chosen_fid_pos,
@@ -6359,7 +6359,7 @@
 
        /* create resulting dirent structure */
        fid_name = (char *) fid->data + udf_rw16(fid->l_iu);
-       udf_to_unix_name(dirent->d_name, MAXNAMLEN,
+       udf_to_unix_name(dirent->d_name, NAME_MAX,
                fid_name, fid->l_fi, &ump->logical_vol->desc_charset);
 
        /* '..' has no name, so provide one */
diff -r 67bdb26b1914 -r 8b69790f42d8 sys/fs/udf/udf_vfsops.c
--- a/sys/fs/udf/udf_vfsops.c   Tue Sep 27 01:10:43 2011 +0000
+++ b/sys/fs/udf/udf_vfsops.c   Tue Sep 27 01:13:16 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: udf_vfsops.c,v 1.60 2010/06/24 13:03:11 hannken Exp $ */
+/* $NetBSD: udf_vfsops.c,v 1.61 2011/09/27 01:13:16 christos Exp $ */
 
 /*
  * Copyright (c) 2006, 2008 Reinoud Zandijk
@@ -28,7 +28,7 @@
 
 #include <sys/cdefs.h>
 #ifndef lint
-__KERNEL_RCSID(0, "$NetBSD: udf_vfsops.c,v 1.60 2010/06/24 13:03:11 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: udf_vfsops.c,v 1.61 2011/09/27 01:13:16 christos Exp $");
 #endif /* not lint */
 
 
@@ -576,7 +576,7 @@
        mp->mnt_stat.f_fsidx.__fsid_val[0] = (uint32_t) devvp->v_rdev;
        mp->mnt_stat.f_fsidx.__fsid_val[1] = makefstype(MOUNT_UDF);
        mp->mnt_stat.f_fsid = mp->mnt_stat.f_fsidx.__fsid_val[0];
-       mp->mnt_stat.f_namemax = UDF_MAX_NAMELEN;
+       mp->mnt_stat.f_namemax = UDF_MAXNAMLEN;
        mp->mnt_flag |= MNT_LOCAL;
 //     mp->mnt_iflag |= IMNT_MPSAFE;
 



Home | Main Index | Thread Index | Old Index