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>
14 /* This is the salvage test program. */
20 long ofid
, nfid
, code
, myFid
[3], parentFid
[3];
25 } else if (argc
== 3) {
29 printf("usage is: test <ofid> <optional new fid>\n");
33 printf("DirOK returned %d.\n");
35 printf("Salvaging from fid %d into fid %d.\n", ofid
, nfid
);
36 if (Lookup(&ofid
, ".", myFid
) || Lookup(&ofid
, "..", parentFid
)) {
37 printf("Lookup of \".\" and/or \"..\" failed: ");
38 printf("%d %d %d %d\n", myFid
[1], myFid
[2], parentFid
[1],
40 printf("Directory cannot be salvaged\n");
43 DirSalvage(&ofid
, &nfid
, myFid
[1], myFid
[2], parentFid
[1],
45 printf("DirSalvage returned %d.\n", code
);
51 Log(a
, b
, c
, d
, e
, f
, g
, h
, i
, j
, k
, l
, m
, n
)
53 printf(a
, b
, c
, d
, e
, f
, g
, h
, i
, j
, k
, l
, m
, n
);