- rename UDF_MAX_NAMELEN -> UDF_MAXNAMLEN

- use NAME_MAX instead of MAXNAMLEN
This commit is contained in:
christos 2011-09-27 01:13:16 +00:00
parent a00d98eb66
commit 3a8df9f090
3 changed files with 10 additions and 10 deletions

View File

@ -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 @@ extern int udf_verbose;
/* 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)

View File

@ -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 @@ udf_to_unix_name(char *result, int result_len, char *id, int len,
} 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 @@ udf_dir_attach(struct udf_mount *ump, struct udf_node *dir_node,
/* 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 @@ brokendir:
/* 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 */

View File

@ -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 @@ udf_mountfs(struct vnode *devvp, struct mount *mp,
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;