1.1 --- a/librazor/atomic-actions.c Mon Sep 01 12:19:32 2014 +0100
1.2 +++ b/librazor/atomic-actions.c Tue Sep 30 16:19:55 2014 +0100
1.3 @@ -260,8 +260,7 @@
1.4
1.5 if (errno != EEXIST || chmod(action->args.path, mode) < 0) {
1.6 if (!atomic->error)
1.7 - atomic->error = razor_error_new_str(action->args.path,
1.8 - strerror(errno));
1.9 + atomic->error = razor_error_new_posix(action->args.path);
1.10 atomic_action_free(action);
1.11 return NULL;
1.12 }
1.13 @@ -279,8 +278,7 @@
1.14
1.15 if (rmdir(action->args.path) < 0) {
1.16 if (!atomic->error)
1.17 - atomic->error = razor_error_new_str(action->args.path,
1.18 - strerror(errno));
1.19 + atomic->error = razor_error_new_posix(action->args.path);
1.20 atomic_action_free(action);
1.21 return NULL;
1.22 } else
1.23 @@ -302,8 +300,7 @@
1.24 r = symlink(action->args.u.create_symlink.target, action->args.path);
1.25 if (r < 0) {
1.26 if (!atomic->error)
1.27 - atomic->error = razor_error_new_str(action->args.path,
1.28 - strerror(errno));
1.29 + atomic->error = razor_error_new_posix(action->args.path);
1.30 atomic_action_free(action);
1.31 return NULL;
1.32 }
1.33 @@ -322,8 +319,7 @@
1.34
1.35 if (unlink(action->args.path) < 0) {
1.36 if (!atomic->error)
1.37 - atomic->error = razor_error_new_str(action->args.path,
1.38 - strerror(errno));
1.39 + atomic->error = razor_error_new_posix(action->args.path);
1.40 atomic_action_free(action);
1.41 return NULL;
1.42 }
1.43 @@ -362,8 +358,7 @@
1.44 #else
1.45 if (rename(path, dest)) {
1.46 if (!atomic->error)
1.47 - atomic->error = razor_error_new_str(dest,
1.48 - strerror(errno));
1.49 + atomic->error = razor_error_new_posix(dest);
1.50 return -1;
1.51 }
1.52 #endif