2 * Copyright 2000, International Business Machines Corporation and others.
5 * This software has been released under the terms of the IBM Public
6 * License. For details, see the LICENSE file in the top-level source
7 * directory or online at http://www.openafs.org/dl/license10.html
10 #include <afsconfig.h>
11 #include <afs/param.h>
16 /* This is the salvage test program. */
22 long ofid, nfid, code, myFid[3], parentFid[3];
27 } else if (argc == 3) {
31 printf("usage is: test <ofid> <optional new fid>\n");
35 printf("DirOK returned %d.\n");
37 printf("Salvaging from fid %d into fid %d.\n", ofid, nfid);
38 if (Lookup(&ofid, ".", myFid) || Lookup(&ofid, "..", parentFid)) {
39 printf("Lookup of \".\" and/or \"..\" failed: ");
40 printf("%d %d %d %d\n", myFid[1], myFid[2], parentFid[1],
42 printf("Directory cannot be salvaged\n");
45 DirSalvage(&ofid, &nfid, myFid[1], myFid[2], parentFid[1],
47 printf("DirSalvage returned %d.\n", code);
53 Log(a, b, c, d, e, f, g, h, i, j, k, l, m, n)
55 printf(a, b, c, d, e, f, g, h, i, j, k, l, m, n);