]> git.ipfire.org Git - thirdparty/snapper.git/commitdiff
- coding style 548/head
authorArvin Schnell <aschnell@suse.de>
Thu, 27 Aug 2020 10:21:04 +0000 (12:21 +0200)
committerArvin Schnell <aschnell@suse.de>
Thu, 27 Aug 2020 10:21:04 +0000 (12:21 +0200)
snapper/Hooks.cc
testsuite/Makefile.am

index 923e459a094c0a5d4ba714e52ffff47c1d37dcc4..abd9e30d953fc052efcc719a6c33ac5eff640254 100644 (file)
@@ -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
index 31ec811711c8b0a41ee8bf8c03365bd5a3d96ad3..431f87cbf0d6ebcb33a9cdf26f4b5821c00d7f13 100644 (file)
@@ -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)