git.annexia.org
/
libguestfs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0c60e4d
)
df: Skip final '/' character when calculating basename.
author
Richard W.M. Jones
<rjones@redhat.com>
Tue, 11 Jan 2011 13:55:23 +0000
(13:55 +0000)
committer
Richard W.M. Jones
<rjones@redhat.com>
Tue, 11 Jan 2011 13:55:23 +0000
(13:55 +0000)
Previously it was including the final '/' character when calculating
the basename for the -a option eg:
Filesystem Size Used Available Use%
/Ubuntu1010x64:/dev/sda1 9.4G 2.3G 6.6G 25%
With this patch the '/' is not printed.
df/main.c
patch
|
blob
|
history
diff --git
a/df/main.c
b/df/main.c
index
55e5eaa
..
7ac5a6c
100644
(file)
--- a/
df/main.c
+++ b/
df/main.c
@@
-281,6
+281,8
@@
main (int argc, char *argv[])
name = strrchr (drvs->a.filename, '/');
if (name == NULL)
name = drvs->a.filename;
+ else
+ name++; /* skip '/' character */
break;
case drv_d:
name = drvs->d.guest;