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:
@ -1,6 +1,7 @@
|
||||
use anyhow::{bail, format_err, Error};
|
||||
use serde_json::{json, Value};
|
||||
use std::collections::HashMap;
|
||||
use std::os::unix::prelude::OsStrExt;
|
||||
|
||||
use proxmox_router::{
|
||||
list_subdirs_api_method, Permission, Router, RpcEnvironment, RpcEnvironmentType, SubdirMap,
|
||||
@ -360,7 +361,7 @@ pub fn get_versions() -> Result<Vec<APTUpdateInfo>, Error> {
|
||||
|
||||
let running_kernel = format!(
|
||||
"running kernel: {}",
|
||||
nix::sys::utsname::uname().release().to_owned()
|
||||
std::str::from_utf8(nix::sys::utsname::uname()?.release().as_bytes())?.to_owned()
|
||||
);
|
||||
if let Some(proxmox_backup) = pbs_packages
|
||||
.iter()
|
||||
|
@ -1,5 +1,5 @@
|
||||
use std::path::Path;
|
||||
use std::process::Command;
|
||||
use std::{os::unix::prelude::OsStrExt, path::Path};
|
||||
|
||||
use anyhow::{bail, format_err, Error};
|
||||
use serde_json::Value;
|
||||
@ -69,12 +69,12 @@ fn get_status(
|
||||
let cpuinfo = procfs::read_cpuinfo()?;
|
||||
let cpuinfo = cpuinfo.into();
|
||||
|
||||
let uname = nix::sys::utsname::uname();
|
||||
let uname = nix::sys::utsname::uname()?;
|
||||
let kversion = format!(
|
||||
"{} {} {}",
|
||||
uname.sysname(),
|
||||
uname.release(),
|
||||
uname.version()
|
||||
std::str::from_utf8(uname.sysname().as_bytes())?,
|
||||
std::str::from_utf8(uname.release().as_bytes())?,
|
||||
std::str::from_utf8(uname.version().as_bytes())?
|
||||
);
|
||||
|
||||
Ok(NodeStatus {
|
||||
|
Reference in New Issue
Block a user