mirror of
https://git.proxmox.com/git/proxmox-backup
synced 2025-10-04 20:16:38 +00:00
fuse-loop: remove lazy_static dependency
Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
This commit is contained in:
parent
81b40e1421
commit
7549722640
@ -4,11 +4,11 @@ version = "0.1.0"
|
|||||||
authors.workspace = true
|
authors.workspace = true
|
||||||
edition.workspace = true
|
edition.workspace = true
|
||||||
description = "fuse and loop device helpers"
|
description = "fuse and loop device helpers"
|
||||||
|
rust-version.workspace = true
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
anyhow.workspace = true
|
anyhow.workspace = true
|
||||||
futures.workspace = true
|
futures.workspace = true
|
||||||
lazy_static.workspace = true
|
|
||||||
libc.workspace = true
|
libc.workspace = true
|
||||||
log.workspace = true
|
log.workspace = true
|
||||||
nix.workspace = true
|
nix.workspace = true
|
||||||
|
@ -7,6 +7,7 @@ use std::fs::{read_to_string, remove_file, File, OpenOptions};
|
|||||||
use std::io::prelude::*;
|
use std::io::prelude::*;
|
||||||
use std::io::SeekFrom;
|
use std::io::SeekFrom;
|
||||||
use std::path::{Path, PathBuf};
|
use std::path::{Path, PathBuf};
|
||||||
|
use std::sync::LazyLock;
|
||||||
|
|
||||||
use nix::sys::signal::{self, Signal};
|
use nix::sys::signal::{self, Signal};
|
||||||
use nix::unistd::Pid;
|
use nix::unistd::Pid;
|
||||||
@ -22,9 +23,7 @@ use proxmox_time::epoch_i64;
|
|||||||
|
|
||||||
const RUN_DIR: &str = "/run/pbs-loopdev";
|
const RUN_DIR: &str = "/run/pbs-loopdev";
|
||||||
|
|
||||||
lazy_static::lazy_static! {
|
static LOOPDEV_REGEX: LazyLock<Regex> = LazyLock::new(|| Regex::new(r"^loop\d+$").unwrap());
|
||||||
static ref LOOPDEV_REGEX: Regex = Regex::new(r"^loop\d+$").unwrap();
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Represents an ongoing FUSE-session that has been mapped onto a loop device.
|
/// Represents an ongoing FUSE-session that has been mapped onto a loop device.
|
||||||
/// Create with map_loop, then call 'main' and poll until startup_chan reports
|
/// Create with map_loop, then call 'main' and poll until startup_chan reports
|
||||||
|
Loading…
Reference in New Issue
Block a user