buildcfg: add rundir helper macro

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
Wolfgang Bumiller 2020-12-14 14:11:32 +01:00
parent 014dc5f9d7
commit 96918252e5
1 changed files with 10 additions and 0 deletions

View File

@ -42,3 +42,13 @@ pub const PROXMOX_BACKUP_API_PID_FN: &str = concat!(PROXMOX_BACKUP_RUN_DIR_M!(),
macro_rules! configdir { macro_rules! configdir {
($subdir:expr) => (concat!("/etc/proxmox-backup", $subdir)) ($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)
};
}