mirror of
git://git.proxmox.com/git/proxmox-backup.git
synced 2025-01-05 09:17:59 +03:00
use XATTR_* constants instead of calling functions
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
parent
0c9f247cfd
commit
da72994faf
@ -1403,7 +1403,7 @@ fn get_fcaps(
|
||||
return Ok(());
|
||||
}
|
||||
|
||||
match xattr::fgetxattr(fd, xattr::xattr_name_fcaps()) {
|
||||
match xattr::fgetxattr(fd, xattr::XATTR_NAME_FCAPS) {
|
||||
Ok(data) => {
|
||||
meta.fcaps = Some(pxar::format::FCaps { data });
|
||||
Ok(())
|
||||
|
@ -188,7 +188,7 @@ fn add_fcaps(
|
||||
c_result!(unsafe {
|
||||
libc::setxattr(
|
||||
c_proc_path,
|
||||
xattr::xattr_name_fcaps().as_ptr(),
|
||||
xattr::XATTR_NAME_FCAPS.as_ptr(),
|
||||
fcaps.data.as_ptr() as *const libc::c_void,
|
||||
fcaps.data.len(),
|
||||
0,
|
||||
|
@ -620,7 +620,7 @@ impl SessionImpl {
|
||||
use pxar::format::XAttr;
|
||||
|
||||
if let Some(fcaps) = metadata.fcaps {
|
||||
xattrs.push(XAttr::new(xattr::xattr_name_fcaps().to_bytes(), fcaps.data));
|
||||
xattrs.push(XAttr::new(xattr::XATTR_NAME_FCAPS.to_bytes(), fcaps.data));
|
||||
}
|
||||
|
||||
// TODO: Special cases:
|
||||
|
Loading…
Reference in New Issue
Block a user