public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: "Fabian Grünbichler" <f.gruenbichler@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [pbs-devel] [PATCH proxmox-backup-qemu 6/6] update to new BackupDir constructor
Date: Fri, 11 Sep 2020 14:34:39 +0200	[thread overview]
Message-ID: <20200911123439.1876094-7-f.gruenbichler@proxmox.com> (raw)
In-Reply-To: <20200911123439.1876094-1-f.gruenbichler@proxmox.com>

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
---
 Cargo.toml    | 4 ++--
 src/backup.rs | 2 +-
 src/lib.rs    | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/Cargo.toml b/Cargo.toml
index 649b4c5..664bba2 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -25,7 +25,7 @@ libc = "0.2"
 once_cell = "1.3.1"
 openssl = "0.10"
 proxmox = { version = "0.3.5", features = [ "sortable-macro", "api-macro" ] }
-proxmox-backup = { git = "git://git.proxmox.com/git/proxmox-backup.git", tag = "v0.8.15" }
-#proxmox-backup = { path = "../proxmox-backup" }
+#proxmox-backup = { git = "git://git.proxmox.com/git/proxmox-backup.git", tag = "v0.8.15" }
+proxmox-backup = { path = "../proxmox-backup" }
 serde_json = "1.0"
 tokio = { version = "0.2.9", features = [ "blocking", "fs", "io-util", "macros", "rt-threaded", "signal", "stream", "tcp", "time", "uds" ] }
diff --git a/src/backup.rs b/src/backup.rs
index 094f8b3..aa65239 100644
--- a/src/backup.rs
+++ b/src/backup.rs
@@ -59,7 +59,7 @@ impl BackupTask {
 
         let (abort, _) = tokio::sync::broadcast::channel(16);
 
-        let snapshot = BackupDir::new(&setup.backup_type, &setup.backup_id, setup.backup_time.timestamp());
+        let snapshot = BackupDir::new(&setup.backup_type, &setup.backup_id, setup.backup_time.timestamp())?;
         let manifest = Arc::new(Mutex::new(BackupManifest::new(snapshot)));
 
         let registry = Arc::new(Mutex::new(Registry::<ImageUploadInfo>::new()));
diff --git a/src/lib.rs b/src/lib.rs
index 5bb3685..67f2fe9 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -98,7 +98,7 @@ pub extern "C" fn proxmox_backup_snapshot_string(
         let backup_id: String = tools::utf8_c_string_lossy(backup_id)
             .ok_or_else(|| format_err!("backup_id must not be NULL"))?;
 
-        let snapshot = BackupDir::new(backup_type, backup_id, backup_time);
+        let snapshot = BackupDir::new(backup_type, backup_id, backup_time)?;
 
         Ok(CString::new(format!("{}", snapshot))?)
     });
-- 
2.20.1





  parent reply	other threads:[~2020-09-11 12:35 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-11 12:34 [pbs-devel] [PATCH proxmox-backup(-qemu) 0/6] improve timestamp handling Fabian Grünbichler
2020-09-11 12:34 ` [pbs-devel] [PATCH proxmox-backup 1/6] catalog dump: preserve original mtime Fabian Grünbichler
2020-09-11 12:34 ` [pbs-devel] [PATCH proxmox-backup 2/6] don't truncate DateTime nanoseconds Fabian Grünbichler
2020-09-11 12:34 ` [pbs-devel] [PATCH proxmox-backup 3/6] use non-panicky timestamp_opt where appropriate Fabian Grünbichler
2020-09-11 12:34 ` [pbs-devel] [PATCH proxmox-backup 4/6] handle invalid mtime when formating entries Fabian Grünbichler
2020-09-11 12:34 ` [pbs-devel] [PATCH proxmox-backup 5/6] BackupDir: make constructor fallible Fabian Grünbichler
2020-09-11 14:12   ` Dietmar Maurer
2020-09-11 14:28     ` Dietmar Maurer
2020-09-11 12:34 ` Fabian Grünbichler [this message]
2020-09-11 14:15   ` [pbs-devel] applied: [PATCH proxmox-backup-qemu 6/6] update to new BackupDir constructor Dietmar Maurer
2020-09-11 14:00 ` [pbs-devel] applied: [PATCH proxmox-backup(-qemu) 0/6] improve timestamp handling Dietmar Maurer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200911123439.1876094-7-f.gruenbichler@proxmox.com \
    --to=f.gruenbichler@proxmox.com \
    --cc=pbs-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal