diff options
author | Goffredo Baroncelli <kreijack@libero.it> | 2010-12-20 20:06:19 +0000 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2011-10-25 09:18:31 -0400 |
commit | 17cf679fb3622a9e3452777d07fcf3a346266ff1 (patch) | |
tree | 50b0745e40f8102f1e6e3b26eec3c5a865d3d42d /ctree.h | |
parent | 0646719841433c015d849c197cd13be6f2cb31a3 (diff) |
Improve error handling in the btrfs command
Hi Chris,
below is enclosed a trivial patch, which has the aim to improve the error
reporting of the "btrfs" command.
You can pull from
http://cassiopea.homelinux.net/git/btrfs-progs-unstable.git
branch
strerror
I changed every printf("some-error") to something like:
e = errno;
fprintf(stderr, "ERROR: .... - %s", strerror(e));
so:
1) all the error are reported to standard error
2) At the end of the message is printed the error as returned by the system.
The change is quite simple, I replaced every printf("some-error") to the line
above. I don't touched anything other.
I also integrated a missing "printf" on the basis of the Ben patch.
This patch leads the btrfs command to be more "user friendly" :-)
Regards
G.Baroncelli
btrfs-list.c | 40 ++++++++++++++++++++++--------
btrfs_cmds.c | 77 ++++++++++++++++++++++++++++++++++++++++-----------------
utils.c | 6 ++++
3 files changed, 89 insertions(+), 34 deletions(-)
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'ctree.h')
0 files changed, 0 insertions, 0 deletions