5
0
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:
Wolfgang Bumiller 2024-06-20 11:07:33 +02:00
parent 0c9f247cfd
commit da72994faf
3 changed files with 3 additions and 3 deletions

View File

@ -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(())

View File

@ -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,

View File

@ -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: