Separated errors about Linux file attributes from those of xattr and ACL
This commit is contained in:
parent
70827242b2
commit
c4769f333e
@ -980,9 +980,9 @@ int iso_local_get_lfa_flags(char *disk_path, uint64_t *lfa_flags, int *max_bit,
|
|||||||
return 3;
|
return 3;
|
||||||
ret = aaip_get_lfa_flags(disk_path, lfa_flags, max_bit, os_errno, 0);
|
ret = aaip_get_lfa_flags(disk_path, lfa_flags, max_bit, os_errno, 0);
|
||||||
if(ret == 0)
|
if(ret == 0)
|
||||||
return ISO_AAIP_NOT_ENABLED;
|
return ISO_LFA_NOT_ENABLED;
|
||||||
if (ret < 0)
|
if(ret < 0)
|
||||||
return ISO_AAIP_NO_GET_LOCAL;
|
return ISO_LFA_NO_SET_LOCAL;
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1025,17 +1025,17 @@ int iso_local_set_lfa_flags(char *disk_path, uint64_t lfa_flags, int max_bit,
|
|||||||
ret = aaip_get_lfa_flags(disk_path, &eff_flags, &old_max_bit, os_errno,
|
ret = aaip_get_lfa_flags(disk_path, &eff_flags, &old_max_bit, os_errno,
|
||||||
0);
|
0);
|
||||||
if (ret == 0)
|
if (ret == 0)
|
||||||
return ISO_AAIP_NOT_ENABLED;
|
return ISO_LFA_NOT_ENABLED;
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return ISO_AAIP_NO_GET_LOCAL;
|
return ISO_LFA_NO_GET_LOCAL;
|
||||||
eff_flags &= ~change_mask;
|
eff_flags &= ~change_mask;
|
||||||
eff_flags |= (lfa_flags & change_mask);
|
eff_flags |= (lfa_flags & change_mask);
|
||||||
}
|
}
|
||||||
ret= aaip_set_lfa_flags(disk_path, eff_flags, max_bit, os_errno, 0);
|
ret= aaip_set_lfa_flags(disk_path, eff_flags, max_bit, os_errno, 0);
|
||||||
if(ret == 0)
|
if(ret == 0)
|
||||||
return ISO_AAIP_NOT_ENABLED;
|
return ISO_LFA_NOT_ENABLED;
|
||||||
if(ret < 0)
|
if(ret < 0)
|
||||||
return ISO_AAIP_NO_SET_LOCAL;
|
return ISO_LFA_NO_SET_LOCAL;
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -9700,6 +9700,18 @@ int iso_conv_name_chars(IsoWriteOpts *opts, char *name, size_t name_len,
|
|||||||
(WARNING,HIGH, -431) */
|
(WARNING,HIGH, -431) */
|
||||||
#define ISO_LFA_UNKNOWN_BIT 0xD030FE51
|
#define ISO_LFA_UNKNOWN_BIT 0xD030FE51
|
||||||
|
|
||||||
|
/** Local Linux-like file attribute processing not enabled at compile time
|
||||||
|
(SORRY,HIGH, -432) */
|
||||||
|
#define ISO_LFA_NOT_ENABLED 0xE030FE50
|
||||||
|
|
||||||
|
/** Error with getting Linux-like file attributes of local file
|
||||||
|
(SORRY,HIGH, -433) */
|
||||||
|
#define ISO_LFA_NO_GET_LOCAL 0xE030FE4F
|
||||||
|
|
||||||
|
/** Error with setting Linux-like file attributes of local file
|
||||||
|
(SORRY,HIGH, -434) */
|
||||||
|
#define ISO_LFA_NO_SET_LOCAL 0xE030FE4E
|
||||||
|
|
||||||
|
|
||||||
/* Internal developer note:
|
/* Internal developer note:
|
||||||
Place new error codes directly above this comment.
|
Place new error codes directly above this comment.
|
||||||
|
@ -577,6 +577,12 @@ const char *iso_error_to_msg(int errcode)
|
|||||||
return "Unknown Linux-like chattr letter encountered during conversion";
|
return "Unknown Linux-like chattr letter encountered during conversion";
|
||||||
case ISO_LFA_UNKNOWN_BIT:
|
case ISO_LFA_UNKNOWN_BIT:
|
||||||
return "Unknown Linux-like file attribute flag bit encountered during conversion";
|
return "Unknown Linux-like file attribute flag bit encountered during conversion";
|
||||||
|
case ISO_LFA_NOT_ENABLED:
|
||||||
|
return "Local Linux-like file attribute processing not enabled at compile time";
|
||||||
|
case ISO_LFA_NO_GET_LOCAL:
|
||||||
|
return "Error with getting Linux-like file attributes of local file";
|
||||||
|
case ISO_LFA_NO_SET_LOCAL:
|
||||||
|
return "Error with setting Linux-like file attributes of local file";
|
||||||
default:
|
default:
|
||||||
return "Unknown error";
|
return "Unknown error";
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user