struct udf_fileident_bh fibh;
struct fileIdentDesc *fi;
- if (dentry->d_name.len > UDF_NAME_LEN - 2)
+ if (dentry->d_name.len > UDF_NAME_LEN)
return ERR_PTR(-ENAMETOOLONG);
#ifdef UDF_RECOVERY
struct udf_inode_info *dinfo;
fibh->sbh = fibh->ebh = NULL;
- name = kmalloc(UDF_NAME_LEN, GFP_NOFS);
+ name = kmalloc(UDF_NAME_LEN_CS0, GFP_NOFS);
if (!name) {
*err = -ENOMEM;
goto out_err;
}
namelen = udf_put_filename(sb, dentry->d_name.name,
dentry->d_name.len,
- name, UDF_NAME_LEN);
+ name, UDF_NAME_LEN_CS0);
if (!namelen) {
*err = -ENAMETOOLONG;
goto out_err;
iinfo = UDF_I(inode);
down_write(&iinfo->i_data_sem);
- name = kmalloc(UDF_NAME_LEN, GFP_NOFS);
+ name = kmalloc(UDF_NAME_LEN_CS0, GFP_NOFS);
if (!name) {
err = -ENOMEM;
goto out_no_entry;
if (pc->componentType == 5) {
namelen = udf_put_filename(sb, compstart,
symname - compstart,
- name, UDF_NAME_LEN);
+ name, UDF_NAME_LEN_CS0);
if (!namelen)
goto out_no_entry;
le32_to_cpu(lvidiu->numDirs)) : 0)
+ buf->f_bfree;
buf->f_ffree = buf->f_bfree;
- buf->f_namelen = UDF_NAME_LEN - 2;
+ buf->f_namelen = UDF_NAME_LEN;
buf->f_fsid.val[0] = (u32)id;
buf->f_fsid.val[1] = (u32)(id >> 32);
#define UDF_EXTENT_FLAG_MASK 0xC0000000
#define UDF_NAME_PAD 4
-#define UDF_NAME_LEN 256
-#define UDF_PATH_LEN 1023
+#define UDF_NAME_LEN 254
+#define UDF_NAME_LEN_CS0 255
static inline size_t udf_file_entry_alloc_offset(struct inode *inode)
{
struct ustr {
uint8_t u_cmpID;
- uint8_t u_name[UDF_NAME_LEN - 2];
+ uint8_t u_name[UDF_NAME_LEN];
uint8_t u_len;
};
static int udf_char_to_ustr(struct ustr *dest, const uint8_t *src, int strlen)
{
- if ((!dest) || (!src) || (!strlen) || (strlen > UDF_NAME_LEN - 2))
+ if ((!dest) || (!src) || (!strlen) || (strlen > UDF_NAME_LEN))
return 0;
memset(dest, 0, sizeof(struct ustr));
ocu = ocu_i->u_name;
utf_o->u_len = 0;
- for (i = 0; (i < ocu_len) && (utf_o->u_len <= (UDF_NAME_LEN - 3));) {
+ for (i = 0; (i < ocu_len) && (utf_o->u_len < UDF_NAME_LEN);) {
/* Expand OSTA compressed Unicode to Unicode */
uint32_t c = ocu[i++];
if (cmp_id == 16)
c = (c << 8) | ocu[i++];
len = conv_f(c, &utf_o->u_name[utf_o->u_len],
- UDF_NAME_LEN - 2 - utf_o->u_len);
+ UDF_NAME_LEN - utf_o->u_len);
/* Valid character? */
if (len >= 0)
utf_o->u_len += len;