]> git.ipfire.org Git - thirdparty/snapper.git/commitdiff
- set FSTYPE in addConfig
authorArvin Schnell <aschnell@suse.de>
Mon, 1 Aug 2011 15:24:51 +0000 (17:24 +0200)
committerArvin Schnell <aschnell@suse.de>
Mon, 1 Aug 2011 15:24:51 +0000 (17:24 +0200)
snapper/Snapper.cc

index 5fbbe60a89ce2a22147e06b0173985fa7e2024dd..c731fcc41599a9cd2f5a6673d71863a5a3182689 100644 (file)
@@ -549,6 +549,8 @@ namespace snapper
        y2mil("config_name:" << config_name << " subvolume:" << subvolume <<
              " template_name:" << template_name);
 
+       string fstype = "ext4";
+
        if (config_name.empty() || config_name.find_first_of(" \t") != string::npos)
        {
            throw AddConfigFailedException("illegal config name");
@@ -593,13 +595,14 @@ namespace snapper
        {
            SysconfigFile config(CONFIGSDIR "/" + config_name);
            config.setValue("SUBVOLUME", subvolume);
+           config.setValue("FSTYPE", fstype);
        }
        catch (const FileNotFoundException& e)
        {
            throw AddConfigFailedException("modifying config failed");
        }
 
-       auto_ptr<Filesystem> filesystem(new Btrfs(subvolume));
+       auto_ptr<Filesystem> filesystem(Filesystem::create(fstype, subvolume));
        filesystem->addConfig();
     }