]> git.proxmox.com Git - proxmox-backup.git/blobdiff - proxmox-restore-daemon/src/main.rs
Set MMAP_THRESHOLD to a fixed value (128K)
[proxmox-backup.git] / proxmox-restore-daemon / src / main.rs
index a1ad6005e0fa0ae42fb99ca3519bc77f7eb8fbe3..47790a7db86c814d2d22f2a7c11e4891e5c81e80 100644 (file)
@@ -38,6 +38,8 @@ lazy_static! {
 
 /// This is expected to be run by 'proxmox-file-restore' within a mini-VM
 fn main() -> Result<(), Error> {
+    pbs_tools::setup_libc_malloc_opts();
+
     if !Path::new(VM_DETECT_FILE).exists() {
         bail!(
             "This binary is not supposed to be run manually, use 'proxmox-file-restore' instead."
@@ -46,7 +48,7 @@ fn main() -> Result<(), Error> {
 
     // don't have a real syslog (and no persistance), so use env_logger to print to a log file (via
     // stdout to a serial terminal attached by QEMU)
-    env_logger::from_env(env_logger::Env::default().default_filter_or("info"))
+    env_logger::Builder::from_env(env_logger::Env::default().default_filter_or("info"))
         .write_style(env_logger::WriteStyle::Never)
         .format_timestamp_millis()
         .init();
@@ -63,7 +65,7 @@ fn main() -> Result<(), Error> {
 
     info!("disk scan complete, starting main runtime...");
 
-    pbs_runtime::main(run())
+    proxmox_async::runtime::main(run())
 }
 
 /// ensure we have our /run dirs, system users and stuff like that setup