From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id E5D1A610B8 for ; Fri, 11 Sep 2020 14:35:33 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id D004424C67 for ; Fri, 11 Sep 2020 14:35:03 +0200 (CEST) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [212.186.127.180]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS id 4CE3424C5D for ; Fri, 11 Sep 2020 14:35:03 +0200 (CEST) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 19F9B44B6C for ; Fri, 11 Sep 2020 14:35:03 +0200 (CEST) From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= To: pbs-devel@lists.proxmox.com Date: Fri, 11 Sep 2020 14:34:39 +0200 Message-Id: <20200911123439.1876094-7-f.gruenbichler@proxmox.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200911123439.1876094-1-f.gruenbichler@proxmox.com> References: <20200911123439.1876094-1-f.gruenbichler@proxmox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL 0.026 Adjusted score from AWL reputation of From: address KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [backup.rs, proxmox.com, lib.rs] Subject: [pbs-devel] [PATCH proxmox-backup-qemu 6/6] update to new BackupDir constructor X-BeenThere: pbs-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox Backup Server development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Sep 2020 12:35:33 -0000 Signed-off-by: Fabian Grünbichler --- 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::::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