]> git.proxmox.com Git - proxmox-backup.git/commit
xattr: api cleanup
authorWolfgang Bumiller <w.bumiller@proxmox.com>
Fri, 24 Apr 2020 08:48:28 +0000 (10:48 +0200)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Fri, 24 Apr 2020 08:56:52 +0000 (10:56 +0200)
commit27a3decbfea96aacc2a4f40b8a774db51b63dc8d
tree0cf5177de808e819a20d32e8825081be4d8ed103
parent9af76ef0753ab244cfd5eee3a090b71331e29c81
xattr: api cleanup

Make `flistxattr()` return a `ListXAttr` helper which
provides an iterator over `&CStr`.

This exposes the property that xattr names are a
zero-terminated string without simply being an opaque
"byte vector". Using &[u8] as a type here is too lax.

Also let `fgetxattr` take a `CStr`. While this may be a
burden on the caller, we usually already have
zero-terminated strings on the call site. Currently we only
use this method coming from `flistxattr` after all.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
src/pxar/encoder.rs
src/pxar/sequential_decoder.rs
src/tools/xattr.rs