update to nix 0.24 / rustyline 9 / proxmox-sys 0.3
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
This commit is contained in:
@ -147,7 +147,7 @@ impl BackupGroup {
|
||||
/* close else this leaks! */
|
||||
nix::unistd::close(rawfd)?;
|
||||
}
|
||||
Err(nix::Error::Sys(nix::errno::Errno::ENOENT)) => {
|
||||
Err(nix::errno::Errno::ENOENT) => {
|
||||
return Ok(());
|
||||
}
|
||||
Err(err) => {
|
||||
|
@ -221,7 +221,7 @@ impl ChunkStore {
|
||||
})?;
|
||||
|
||||
if let Err(err) = res {
|
||||
if !assert_exists && err.as_errno() == Some(nix::errno::Errno::ENOENT) {
|
||||
if !assert_exists && err == nix::errno::Errno::ENOENT {
|
||||
return Ok(false);
|
||||
}
|
||||
bail!("update atime failed for chunk/file {path:?} - {err}");
|
||||
@ -304,7 +304,7 @@ impl ChunkStore {
|
||||
// start reading:
|
||||
continue;
|
||||
}
|
||||
Err(ref err) if err.as_errno() == Some(nix::errno::Errno::ENOENT) => {
|
||||
Err(ref err) if err == &nix::errno::Errno::ENOENT => {
|
||||
// non-existing directories are okay, just keep going:
|
||||
continue;
|
||||
}
|
||||
|
@ -433,7 +433,7 @@ impl DataStore {
|
||||
ty_dir.push(ty.to_string());
|
||||
// best effort only, but we probably should log the error
|
||||
if let Err(err) = unlinkat(Some(base_fd), &ty_dir, UnlinkatFlags::RemoveDir) {
|
||||
if err.as_errno() != Some(nix::errno::Errno::ENOENT) {
|
||||
if err != nix::errno::Errno::ENOENT {
|
||||
log::error!("failed to remove backup type {ty} in {ns} - {err}");
|
||||
}
|
||||
}
|
||||
@ -483,10 +483,10 @@ impl DataStore {
|
||||
if !ns.is_root() {
|
||||
match unlinkat(Some(base_fd), &ns.path(), UnlinkatFlags::RemoveDir) {
|
||||
Ok(()) => log::debug!("removed namespace {ns}"),
|
||||
Err(nix::Error::Sys(nix::errno::Errno::ENOENT)) => {
|
||||
Err(nix::errno::Errno::ENOENT) => {
|
||||
log::debug!("namespace {ns} already removed")
|
||||
}
|
||||
Err(nix::Error::Sys(nix::errno::Errno::ENOTEMPTY)) if !delete_groups => {
|
||||
Err(nix::errno::Errno::ENOTEMPTY) if !delete_groups => {
|
||||
removed_all_requested = false;
|
||||
log::debug!("skip removal of non-empty namespace {ns}")
|
||||
}
|
||||
|
@ -196,7 +196,7 @@ impl Iterator for ListNamespaces {
|
||||
|
||||
let ns_dirfd = match proxmox_sys::fs::read_subdir(libc::AT_FDCWD, &base_path) {
|
||||
Ok(dirfd) => dirfd,
|
||||
Err(nix::Error::Sys(nix::errno::Errno::ENOENT)) => return None,
|
||||
Err(nix::errno::Errno::ENOENT) => return None,
|
||||
Err(err) => return Some(Err(err.into())),
|
||||
};
|
||||
// found a ns directory, descend into it to scan all it's namespaces
|
||||
|
Reference in New Issue
Block a user