diff options
author | Richard W.M. Jones <rjones@redhat.com> | 2011-01-11 13:55:23 +0000 |
---|---|---|
committer | Richard W.M. Jones <rjones@redhat.com> | 2011-01-11 13:55:23 +0000 |
commit | e5220b26f51d5912371424ab6dfbdb46ce6aa170 (patch) | |
tree | 9da1a1e6adfd8566fddb036abcafed2cfcb171dd /df | |
parent | 0c60e4d9dd6549c2135699490ba8a9ec1dd50ab9 (diff) | |
download | libguestfs-e5220b26f51d5912371424ab6dfbdb46ce6aa170.tar.gz libguestfs-e5220b26f51d5912371424ab6dfbdb46ce6aa170.tar.xz libguestfs-e5220b26f51d5912371424ab6dfbdb46ce6aa170.zip |
df: Skip final '/' character when calculating basename.
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.
Diffstat (limited to 'df')
-rw-r--r-- | df/main.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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; |