From: Arvin Schnell Date: Wed, 26 Feb 2014 13:17:47 +0000 (+0100) Subject: - renamed enum member to match linux vocabulary X-Git-Tag: v0.2.2~16^2~1 X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=2fa23b82418a4811a6803ddfccc11217c8a268f3;p=thirdparty%2Fsnapper.git - renamed enum member to match linux vocabulary --- diff --git a/snapper/Btrfs.cc b/snapper/Btrfs.cc index 73356152..cc0ba86f 100644 --- a/snapper/Btrfs.cc +++ b/snapper/Btrfs.cc @@ -451,10 +451,10 @@ namespace snapper if (status & CREATED) status = CREATED; if (status & DELETED) status = DELETED; - if (status & (CONTENT | PERMISSIONS | USER | GROUP | XATTRS | ACL)) + if (status & (CONTENT | PERMISSIONS | OWNER | GROUP | XATTRS | ACL)) { // TODO check for content sometimes not required - status &= ~(CONTENT | PERMISSIONS | USER | GROUP | XATTRS | ACL); + status &= ~(CONTENT | PERMISSIONS | OWNER | GROUP | XATTRS | ACL); string dirname = snapper::dirname(name); string basename = snapper::basename(name); @@ -547,7 +547,7 @@ namespace snapper else { node->status &= ~(CREATED | DELETED); - node->status |= CONTENT | PERMISSIONS | USER | GROUP | XATTRS | ACL; + node->status |= CONTENT | PERMISSIONS | OWNER | GROUP | XATTRS | ACL; } } @@ -680,7 +680,7 @@ namespace snapper else { node->status &= ~(CREATED | DELETED); - node->status |= CONTENT | PERMISSIONS | USER | GROUP | XATTRS | ACL; + node->status |= CONTENT | PERMISSIONS | OWNER | GROUP | XATTRS | ACL; } merge(processor, &it->second, from, to, x); @@ -698,7 +698,7 @@ namespace snapper else { node->status &= ~(CREATED | DELETED); - node->status |= CONTENT | PERMISSIONS | USER | GROUP | XATTRS | ACL; + node->status |= CONTENT | PERMISSIONS | OWNER | GROUP | XATTRS | ACL; } merge(processor, &it->second, from, to, x); @@ -937,7 +937,7 @@ namespace snapper #endif tree_node* node = processor->files.insert(path); - node->status |= USER | GROUP; + node->status |= OWNER | GROUP; return 0; } diff --git a/snapper/Compare.cc b/snapper/Compare.cc index fa1b771e..cd21a299 100644 --- a/snapper/Compare.cc +++ b/snapper/Compare.cc @@ -212,7 +212,7 @@ namespace snapper if (stat1.st_uid != stat2.st_uid) { - status |= USER; + status |= OWNER; } if (stat1.st_gid != stat2.st_gid) diff --git a/snapper/File.cc b/snapper/File.cc index 7865ffb8..b328c73d 100644 --- a/snapper/File.cc +++ b/snapper/File.cc @@ -514,7 +514,7 @@ namespace snapper } } - if (getPreToPostStatus() & (USER | GROUP)) + if (getPreToPostStatus() & (OWNER | GROUP)) { if (lchown(getAbsolutePath(LOC_SYSTEM).c_str(), fs.st_uid, fs.st_gid) != 0) { @@ -636,7 +636,7 @@ namespace snapper error = true; } - if (getPreToPostStatus() & (CONTENT | PERMISSIONS | USER | GROUP)) + if (getPreToPostStatus() & (CONTENT | PERMISSIONS | OWNER | GROUP)) { if (!modifyAllTypes()) error = true; @@ -756,7 +756,7 @@ namespace snapper ret += "."; ret += status & PERMISSIONS ? "p" : "."; - ret += status & USER ? "u" : "."; + ret += status & OWNER ? "u" : "."; ret += status & GROUP ? "g" : "."; ret += status & XATTRS ? "x" : "."; ret += status & ACL ? "a" : "."; @@ -789,8 +789,8 @@ namespace snapper if (str.length() >= 3) { - if (str[2] == 'u') - ret |= USER; + if (str[2] == 'u' || str[2] == 'o') + ret |= OWNER; } if (str.length() >= 4) diff --git a/snapper/File.h b/snapper/File.h index 96c1e39e..b6783f33 100644 --- a/snapper/File.h +++ b/snapper/File.h @@ -38,7 +38,7 @@ namespace snapper enum StatusFlags { - CREATED = 1, DELETED = 2, TYPE = 4, CONTENT = 8, PERMISSIONS = 16, USER = 32, + CREATED = 1, DELETED = 2, TYPE = 4, CONTENT = 8, PERMISSIONS = 16, OWNER = 32, USER = 32, GROUP = 64, XATTRS = 128, ACL = 256 };