mirror of
https://git.proxmox.com/git/proxmox
synced 2025-08-13 17:56:37 +00:00
update proxmox-schema to nix 0.24.1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
parent
bd0a7cb223
commit
92069b224d
@ -18,7 +18,7 @@ textwrap = "0.11"
|
|||||||
|
|
||||||
# the upid type needs this for 'getpid'
|
# the upid type needs this for 'getpid'
|
||||||
libc = { version = "0.2", optional = true }
|
libc = { version = "0.2", optional = true }
|
||||||
nix = { version = "0.19", optional = true }
|
nix = { version = "0.24.1", optional = true }
|
||||||
|
|
||||||
proxmox-api-macro = { path = "../proxmox-api-macro", optional = true, version = "1.0.3" }
|
proxmox-api-macro = { path = "../proxmox-api-macro", optional = true, version = "1.0.3" }
|
||||||
|
|
||||||
|
@ -209,6 +209,7 @@ fn unescape_id(text: &str) -> Result<String, Error> {
|
|||||||
|
|
||||||
#[cfg(feature = "upid-api-impl")]
|
#[cfg(feature = "upid-api-impl")]
|
||||||
mod upid_impl {
|
mod upid_impl {
|
||||||
|
use std::os::unix::ffi::OsStrExt;
|
||||||
use std::sync::atomic::{AtomicUsize, Ordering};
|
use std::sync::atomic::{AtomicUsize, Ordering};
|
||||||
|
|
||||||
use anyhow::{bail, format_err, Error};
|
use anyhow::{bail, format_err, Error};
|
||||||
@ -246,8 +247,8 @@ mod upid_impl {
|
|||||||
worker_type: worker_type.to_owned(),
|
worker_type: worker_type.to_owned(),
|
||||||
worker_id,
|
worker_id,
|
||||||
auth_id,
|
auth_id,
|
||||||
node: nix::sys::utsname::uname()
|
node: std::str::from_utf8(nix::sys::utsname::uname()?.nodename().as_bytes())
|
||||||
.nodename()
|
.map_err(|_| format_err!("non-utf8 nodename not supported"))?
|
||||||
.split('.')
|
.split('.')
|
||||||
.next()
|
.next()
|
||||||
.ok_or_else(|| format_err!("failed to get nodename from uname()"))?
|
.ok_or_else(|| format_err!("failed to get nodename from uname()"))?
|
||||||
|
Loading…
Reference in New Issue
Block a user