search for: 963beb8

Displaying 2 results from an estimated 2 matches for "963beb8".

2014 Oct 13
0
[PATCH] cat, diff: avoid double slashes in paths (RHBZ#1151910).
In full_path, skip the trailing slash in the base directory when different than "/", as the slash will eventually be added when building the resulting path. --- cat/visit.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/cat/visit.c b/cat/visit.c index 963beb8..49b779e 100644 --- a/cat/visit.c +++ b/cat/visit.c @@ -138,13 +138,18 @@ full_path (const char *dir, const char *name) { int r; char *path; + int len; + + len = strlen (dir); + if (len > 0 && dir[len - 1] == '/') + --len; if (STREQ (dir, "/")) r...
2014 Sep 22
2
[PATCH] New APIs: Implement stat calls that return nanosecond timestamps (RHBZ#1144891).
...("%3" PRIi64, (now - i) / 86400); + r = printf ("%3" PRIi64, (now - secs) / 86400); break; } } else { - time_t t = (time_t) i; + time_t t = (time_t) secs; char buf[64]; struct tm *tm; diff --git a/cat/visit.c b/cat/visit.c index 2347b56..963beb8 100644 --- a/cat/visit.c +++ b/cat/visit.c @@ -51,11 +51,11 @@ _visit (guestfs_h *g, int depth, const char *dir, * case. */ if (depth == 0) { - CLEANUP_FREE_STAT struct guestfs_stat *stat = NULL; + CLEANUP_FREE_STATNS struct guestfs_statns *stat = NULL; CLEANUP_FREE_XATTR_LIST...