]> git.proxmox.com Git - proxmox-backup.git/commitdiff
buildcfg: add rundir helper macro
authorWolfgang Bumiller <w.bumiller@proxmox.com>
Mon, 14 Dec 2020 13:11:32 +0000 (14:11 +0100)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Mon, 11 Jan 2021 09:22:32 +0000 (10:22 +0100)
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
src/buildcfg.rs

index c7e65032b542357057aff7aa4c3a088e63648a04..9aff8b4bae3be5550e9044ad40b77ea64c463f5b 100644 (file)
@@ -42,3 +42,13 @@ pub const PROXMOX_BACKUP_API_PID_FN: &str = concat!(PROXMOX_BACKUP_RUN_DIR_M!(),
 macro_rules! configdir {
     ($subdir:expr) => (concat!("/etc/proxmox-backup", $subdir))
 }
+
+/// Prepend the run directory to a file name.
+///
+/// This is a simply way to get the full path for files in `/run`.
+#[macro_export]
+macro_rules! rundir {
+    ($subdir:expr) => {
+        concat!(PROXMOX_BACKUP_RUN_DIR_M!(), $subdir)
+    };
+}