From a970d645ad5202a6abfb2a5098e6ac99c3c78733 Mon Sep 17 00:00:00 2001 From: Arvin Schnell Date: Thu, 27 Feb 2014 14:40:52 +0100 Subject: [PATCH] - documented status characters --- doc/snapper.xml.in | 34 ++++++++++++++++++++++++++++++++-- snapper/File.cc | 5 ++++- 2 files changed, 36 insertions(+), 3 deletions(-) diff --git a/doc/snapper.xml.in b/doc/snapper.xml.in index ef99d164..c2f4e569 100644 --- a/doc/snapper.xml.in +++ b/doc/snapper.xml.in @@ -422,6 +422,38 @@ + The output consists of a string encoding the status followed by + the filename. The characters of the status string are: + + + A "+" means the file was + created, a "-" means the file was deleted. A + "c" means the content of the file has changed + and a "t" means the type of the file has + changed (e.g. from regular file to directory). + + + A "p" means the permissions + are have changed. + + + An "u" means the user + ownership has changed. + + + A "g" means the group + ownership has changed. + + + A "x" means the extended + attribute information has changed. + + + An "a" means the ACL + information has changed. + + + If there is no change a "." is outputted. @@ -462,11 +494,9 @@ - Compare the extended attributes between snapshot number1 and number2. See examples below: - +:user.foo for created attributes diff --git a/snapper/File.cc b/snapper/File.cc index b328c73d..6da3f0da 100644 --- a/snapper/File.cc +++ b/snapper/File.cc @@ -742,6 +742,9 @@ namespace snapper string statusToString(unsigned int status) { + // If possible keep the characters in sync with e.g. rpm or + // rsync. Unfortunately rpm and rsync are not consistent. + string ret; if (status & CREATED) @@ -789,7 +792,7 @@ namespace snapper if (str.length() >= 3) { - if (str[2] == 'u' || str[2] == 'o') + if (str[2] == 'u') ret |= OWNER; } -- 2.47.3