From 482b6b8ae70ed9bb0ca07d1f33a86b9c2580eeb2 Mon Sep 17 00:00:00 2001 From: Arvin Schnell Date: Thu, 27 Aug 2020 12:21:04 +0200 Subject: [PATCH] - coding style --- snapper/Hooks.cc | 9 ++++++--- testsuite/Makefile.am | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/snapper/Hooks.cc b/snapper/Hooks.cc index 923e459a..abd9e30d 100644 --- a/snapper/Hooks.cc +++ b/snapper/Hooks.cc @@ -70,10 +70,12 @@ namespace snapper Hooks::grub(const string& subvolume, const Filesystem* filesystem, const char* option) { #ifdef ENABLE_ROLLBACK - if (subvolume == "/" && filesystem->fstype() == "btrfs" && - access("/usr/lib/snapper/plugins/grub", X_OK) == 0) + +#define GRUB_SCRIPT "/usr/lib/snapper/plugins/grub" + + if (subvolume == "/" && filesystem->fstype() == "btrfs" && access(GRUB_SCRIPT, X_OK) == 0) { - SystemCmd cmd(string("/usr/lib/snapper/plugins/grub ") + option); + SystemCmd cmd(string(GRUB_SCRIPT) + " " + option); } #endif } @@ -83,6 +85,7 @@ namespace snapper Hooks::rollback(const string& old_root, const string& new_root) { #ifdef ENABLE_ROLLBACK + #define ROLLBACK_SCRIPT "/usr/lib/snapper/plugins/rollback" // Fate#319108 diff --git a/testsuite/Makefile.am b/testsuite/Makefile.am index 31ec8117..431f87cb 100644 --- a/testsuite/Makefile.am +++ b/testsuite/Makefile.am @@ -11,7 +11,7 @@ check_PROGRAMS = sysconfig-get1.test dirname1.test basename1.test \ csv-formatter.test json-formatter.test if ENABLE_BTRFS_QUOTA -check_PROGRAMS += qgroup1.test +check_PROGRAMS += qgroup1.test endif TESTS = $(check_PROGRAMS) -- 2.47.3