From: Arvin Schnell Date: Mon, 1 Aug 2011 15:24:51 +0000 (+0200) Subject: - set FSTYPE in addConfig X-Git-Tag: v0.1.3~325 X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=acd9fb32cfc40fdec0a9af0c4ea97828e6afa87a;p=thirdparty%2Fsnapper.git - set FSTYPE in addConfig --- diff --git a/snapper/Snapper.cc b/snapper/Snapper.cc index 5fbbe60a..c731fcc4 100644 --- a/snapper/Snapper.cc +++ b/snapper/Snapper.cc @@ -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(new Btrfs(subvolume)); + auto_ptr filesystem(Filesystem::create(fstype, subvolume)); filesystem->addConfig(); }