Update GIT documentation to describe the new DAC setup
[zfs.git] / patches / lztest-lzdb.patch
1 Make lztest call lzdb from PATH.
2
3 Index: zfs+chaos4/cmd/lztest/ztest.c
4 ===================================================================
5 --- zfs+chaos4.orig/cmd/lztest/ztest.c
6 +++ zfs+chaos4/cmd/lztest/ztest.c
7 @@ -3043,30 +3043,17 @@ ztest_verify_blocks(char *pool)
8         char zbuf[1024];
9         char *bin;
10         char *ztest;
11 -       char *isa;
12 -       int isalen;
13         FILE *fp;
14  
15 -       (void) realpath(getexecname(), zdb);
16 -
17 -       /* zdb lives in /usr/sbin, while ztest lives in /usr/bin */
18 -       bin = strstr(zdb, "/usr/bin/");
19 -       ztest = strstr(bin, "/ztest");
20 -       isa = bin + 8;
21 -       isalen = ztest - isa;
22 -       isa = strdup(isa);
23         /* LINTED */
24 -       (void) sprintf(bin,
25 -           "/usr/sbin%.*s/zdb -bc%s%s -U /tmp/zpool.cache -O %s %s",
26 -           isalen,
27 -           isa,
28 +       (void) sprintf(zdb,
29 +           "lzdb -bc%s%s -U /tmp/zpool.cache -O %s %s",
30             zopt_verbose >= 3 ? "s" : "",
31             zopt_verbose >= 4 ? "v" : "",
32             ztest_random(2) == 0 ? "pre" : "post", pool);
33 -       free(isa);
34  
35         if (zopt_verbose >= 5)
36 -               (void) printf("Executing %s\n", strstr(zdb, "zdb "));
37 +               (void) printf("Executing %s\n", strstr(zdb, "lzdb "));
38  
39         fp = popen(zdb, "r");
40