From 96918252e504c6a36f3a3350991382ee04c56196 Mon Sep 17 00:00:00 2001 From: Wolfgang Bumiller Date: Mon, 14 Dec 2020 14:11:32 +0100 Subject: [PATCH] buildcfg: add rundir helper macro Signed-off-by: Wolfgang Bumiller --- src/buildcfg.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/buildcfg.rs b/src/buildcfg.rs index c7e65032..9aff8b4b 100644 --- a/src/buildcfg.rs +++ b/src/buildcfg.rs @@ -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) + }; +}