]> git.ipfire.org Git - thirdparty/snapper.git/commitdiff
- fixed compilation without btrfs support 701/head
authorArvin Schnell <aschnell@suse.de>
Tue, 22 Mar 2022 12:10:57 +0000 (13:10 +0100)
committerArvin Schnell <aschnell@suse.de>
Tue, 22 Mar 2022 12:10:57 +0000 (13:10 +0100)
client/cmd-list.cc

index d22d9d12db786c4c970307b915dfe44e6017a39c..3e5500edcd06523cea6e33b156bd20afbeeaaf61 100644 (file)
@@ -21,6 +21,8 @@
  */
 
 
+#include "config.h"
+
 #include <iostream>
 #include <boost/any.hpp>
 
@@ -145,17 +147,25 @@ namespace snapper
 
            bool used_space_broken = true;
 
+#ifdef ENABLE_BTRFS
+
            /**
             * For all btrfses (by btrfs filesystem uuid) keep track of whether used space
             * is broken.
             */
            static map<Uuid, bool> used_space_broken_by_uuid;
 
+#endif
+
        };
 
 
+#ifdef ENABLE_BTRFS
+
        map<Uuid, bool> OutputHelper::used_space_broken_by_uuid;
 
+#endif
+
 
        OutputHelper::OutputHelper(const ProxySnapper* snapper, const vector<Column>& columns)
            : snapper(snapper), snapshots(snapper->getSnapshots()), default_snapshot(snapshots.end()),
@@ -185,6 +195,8 @@ namespace snapper
            {
                string subvolume = snapper->getConfig().getSubvolume();
 
+#ifdef ENABLE_BTRFS
+
                try
                {
                    Uuid uuid = BtrfsUtils::get_uuid(subvolume);
@@ -213,6 +225,8 @@ namespace snapper
                {
                    // getting uuid failed, maybe it is a LVM config
                }
+
+#endif
            }
        }