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 <afs/param.h>
11 #include <afsconfig.h>
15 /* This is the salvage test program. */
20 {long ofid, nfid, code, myFid[3], parentFid[3];
23 {ofid = atoi(argv[1]);
27 {ofid = atoi(argv[1]);
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) )
40 printf("Lookup of \".\" and/or \"..\" failed: ");
41 printf("%d %d %d %d\n",myFid[1],myFid[2],parentFid[1],parentFid[2]);
42 printf("Directory cannot be salvaged\n");
46 code = DirSalvage(&ofid, &nfid, myFid[1],myFid[2],
47 parentFid[1],parentFid[2]);
48 printf("DirSalvage returned %d.\n", code);
54 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);