diff options
author | Brian Behlendorf <[email protected]> | 2008-11-20 12:01:55 -0800 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2008-11-20 12:01:55 -0800 |
commit | 34dc7c2f2553220ebc6e29ca195fb6d57155f95f (patch) | |
tree | 634a0df4aa30200d83c16025768c9ef76a26136d /patches/lztest-lzdb.patch |
Initial Linux ZFS GIT Repo
Diffstat (limited to 'patches/lztest-lzdb.patch')
-rw-r--r-- | patches/lztest-lzdb.patch | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/patches/lztest-lzdb.patch b/patches/lztest-lzdb.patch new file mode 100644 index 000000000..37870b749 --- /dev/null +++ b/patches/lztest-lzdb.patch @@ -0,0 +1,40 @@ +Make lztest call lzdb from PATH. + +Index: zfs+chaos4/cmd/lztest/ztest.c +=================================================================== +--- zfs+chaos4.orig/cmd/lztest/ztest.c ++++ zfs+chaos4/cmd/lztest/ztest.c +@@ -3043,30 +3043,17 @@ ztest_verify_blocks(char *pool) + char zbuf[1024]; + char *bin; + char *ztest; +- char *isa; +- int isalen; + FILE *fp; + +- (void) realpath(getexecname(), zdb); +- +- /* zdb lives in /usr/sbin, while ztest lives in /usr/bin */ +- bin = strstr(zdb, "/usr/bin/"); +- ztest = strstr(bin, "/ztest"); +- isa = bin + 8; +- isalen = ztest - isa; +- isa = strdup(isa); + /* LINTED */ +- (void) sprintf(bin, +- "/usr/sbin%.*s/zdb -bc%s%s -U /tmp/zpool.cache -O %s %s", +- isalen, +- isa, ++ (void) sprintf(zdb, ++ "lzdb -bc%s%s -U /tmp/zpool.cache -O %s %s", + zopt_verbose >= 3 ? "s" : "", + zopt_verbose >= 4 ? "v" : "", + ztest_random(2) == 0 ? "pre" : "post", pool); +- free(isa); + + if (zopt_verbose >= 5) +- (void) printf("Executing %s\n", strstr(zdb, "zdb ")); ++ (void) printf("Executing %s\n", strstr(zdb, "lzdb ")); + + fp = popen(zdb, "r"); + |