]> git.proxmox.com Git - proxmox-backup.git/commitdiff
config: drop deprecated Fd usage
authorWolfgang Bumiller <w.bumiller@proxmox.com>
Wed, 19 Oct 2022 11:45:53 +0000 (13:45 +0200)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Wed, 19 Oct 2022 11:45:53 +0000 (13:45 +0200)
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
pbs-config/src/network/helper.rs

index e335ba25c62d6acf86a708dcdfca3c0a2d5abbff..02548cf914714eb7b0401aade9b91e626592efc4 100644 (file)
@@ -1,5 +1,5 @@
 use std::collections::HashMap;
-use std::os::unix::io::{AsRawFd, FromRawFd};
+use std::os::unix::io::{AsRawFd, FromRawFd, OwnedFd};
 use std::path::Path;
 use std::process::Command;
 
@@ -11,8 +11,6 @@ use regex::Regex;
 
 use pbs_api_types::*; // for IP macros
 
-use proxmox_sys::fd::Fd;
-
 pub static IPV4_REVERSE_MASK: &[&str] = &[
     "0.0.0.0",
     "128.0.0.0",
@@ -141,7 +139,7 @@ pub fn get_network_interfaces() -> Result<HashMap<String, bool>, Error> {
     let lines = raw.lines();
 
     let sock = unsafe {
-        Fd::from_raw_fd(
+        OwnedFd::from_raw_fd(
             socket(
                 AddressFamily::Inet,
                 SockType::Datagram,