From: Arvin Schnell Date: Thu, 4 Aug 2011 09:12:27 +0000 (+0200) Subject: - added error logging X-Git-Tag: v0.1.3~318 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e9c6e2712d0977aebd5ac1bd4806fab58d7b04d4;p=thirdparty%2Fsnapper.git - added error logging --- diff --git a/snapper/Filesystem.cc b/snapper/Filesystem.cc index ddc715c9..82376d76 100644 --- a/snapper/Filesystem.cc +++ b/snapper/Filesystem.cc @@ -54,9 +54,7 @@ namespace snapper { SystemCmd cmd2(BTRFSBIN " subvolume create " + quote(subvolume + "/.snapshots")); if (cmd2.retcode() != 0) - { throw AddConfigFailedException("creating btrfs snapshot failed"); - } } @@ -132,6 +130,7 @@ namespace snapper } else if (errno != EEXIST) { + y2err("mkdir failed errno:" << errno << " (" << strerror(errno) << ")"); throw AddConfigFailedException("mkdir failed"); } @@ -144,6 +143,7 @@ namespace snapper } else if (errno != EEXIST) { + y2err("mkdir failed errno:" << errno << " (" << strerror(errno) << ")"); throw AddConfigFailedException("mkdir failed"); } } @@ -235,7 +235,10 @@ namespace snapper int r1 = mkdir(snapshotDir(num).c_str(), 0755); if (r1 != 0 && errno != EEXIST) + { + y2err("mkdir failed errno:" << errno << " (" << strerror(errno) << ")"); throw MountSnapshotFailedException(); + } SystemCmd cmd2(MOUNTBIN " -t ext4 -r -o loop,noload " + quote(snapshotFile(num)) + " " + quote(snapshotDir(num)));