]> git.ipfire.org Git - thirdparty/snapper.git/commitdiff
- store config_name and root_prefix in snapper object 1033/head
authorArvin Schnell <aschnell@suse.de>
Wed, 23 Jul 2025 09:09:52 +0000 (11:09 +0200)
committerArvin Schnell <aschnell@suse.de>
Wed, 23 Jul 2025 09:09:52 +0000 (11:09 +0200)
snapper/Snapper.cc
snapper/Snapper.h

index a1f0f91d6357e006f34b787d5b43495a4e74bc84..7c54cc33b6758c38ca17dc456fa1d51c22990b23 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright (c) [2011-2015] Novell, Inc.
- * Copyright (c) [2016-2024] SUSE LLC
+ * Copyright (c) [2016-2025] SUSE LLC
  *
  * All Rights Reserved.
  *
@@ -92,13 +92,12 @@ namespace snapper
 
 
     Snapper::Snapper(const string& config_name, const string& root_prefix, bool disable_filters)
-       : snapshots(this)
+       : config_name(config_name), root_prefix(root_prefix), snapshots(this)
     {
-       y2mil("Snapper constructor");
+       y2mil("Snapper constructor '" << config_name << "'");
        y2mil("snapper version " VERSION);
        y2mil("libsnapper version " LIBSNAPPER_VERSION_STRING);
-       y2mil("config_name:" << config_name << " root_prefix:" << root_prefix <<
-             " disable_filters:" << disable_filters);
+       y2mil("root-prefix:" << root_prefix << " disable-filters:" << disable_filters);
 
        try
        {
@@ -139,7 +138,7 @@ namespace snapper
 
     Snapper::~Snapper()
     {
-       y2mil("Snapper destructor");
+       y2mil("Snapper destructor '" << config_name << "'");
 
        for (Snapshots::iterator it = snapshots.begin(); it != snapshots.end(); ++it)
        {
index 7d8dbda272d4cd448fd37b72733e52bd8b4f30b2..0f09673cfad0dd0130b86b9f2787e1eb5536d263 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright (c) [2011-2015] Novell, Inc.
- * Copyright (c) [2016-2023] SUSE LLC
+ * Copyright (c) [2016-2025] SUSE LLC
  *
  * All Rights Reserved.
  *
@@ -229,7 +229,8 @@ namespace snapper
 
        void syncInfoDir(SDir& dir) const;
 
-       // const std::string root_prefix; // TODO ABI change
+       const std::string config_name;
+       const std::string root_prefix;
 
        ConfigInfo* config_info = nullptr;