~ubuntu-branches/ubuntu/oneiric/openafs/oneiric-201305130334

« back to all changes in this revision

Viewing changes to src/butc/test.c

  • Committer: Bazaar Package Importer
  • Author(s): Russ Allbery
  • Date: 2008-09-22 19:07:02 UTC
  • mfrom: (12.1.14 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080922190702-59m13d7kn6gkw32d
Tags: 1.4.7.dfsg1-6
* Apply upstream patch to free /proc entries in the correct order.
  Thanks, Marc Dionne.  (Closes: #493914)
* Apply upstream deltas to support 2.6.27 kernels and to stop using
  COMMON_KERN_CFLAGS for all 2.6 kernels uniformly, which fixes
  problems on amd64 with newer kernels.  Thanks, Björn Torkelsson.
  (LP: #267504)
* Translation updates:
  - Swedish, thanks Martin Bagge.  (Closes: #493120)

Show diffs side-by-side

added added

removed removed

Lines of Context:
81
81
}
82
82
 
83
83
 
84
 
static
85
 
PerformDump(as)
86
 
     register struct cmd_syndesc *as;
 
84
static int
 
85
PerformDump(register struct cmd_syndesc *as, void *arock)
87
86
{
88
87
    struct rx_connection *aconn;
89
88
    afs_int32 server;
128
127
        exit(1);
129
128
    }
130
129
    printf("dumpid returned %u\n", tdumpID);
 
130
 
 
131
    return 0;
131
132
}
132
133
 
133
 
static
134
 
PerformRestore(as)
135
 
     register struct cmd_syndesc *as;
 
134
static int
 
135
PerformRestore(register struct cmd_syndesc *as, void *arock)
136
136
{
137
137
    struct rx_connection *aconn;
138
138
    afs_int32 server;
170
170
        exit(1);
171
171
    }
172
172
    printf("dumpid returned %u\n", tdumpID);
 
173
    return 0;
173
174
}
174
175
 
175
 
static
176
 
CheckDump(as)
177
 
     register struct cmd_syndesc *as;
 
176
static int
 
177
CheckDump(register struct cmd_syndesc *as, void *arock)
178
178
{
179
179
    struct rx_connection *aconn;
180
180
    afs_int32 server;
190
190
        printf("call to TC_CheckDump failed %u\n", code);
191
191
        exit(1);
192
192
    }
 
193
    return 0;
193
194
}
194
195
 
195
 
static
196
 
AbortDump(as)
197
 
     register struct cmd_syndesc *as;
 
196
static int
 
197
AbortDump(register struct cmd_syndesc *as, void *arock)
198
198
{
199
199
    struct rx_connection *aconn;
200
200
    afs_int32 server;
210
210
        printf("call to TC_AbortDump failed %u\n", code);
211
211
        exit(1);
212
212
    }
 
213
    return 0;
213
214
}
214
215
 
215
 
static
216
 
WaitForDump(as)
217
 
     register struct cmd_syndesc *as;
 
216
static int
 
217
WaitForDump(register struct cmd_syndesc *as, void *arock)
218
218
{
219
219
    struct rx_connection *aconn;
220
220
    afs_int32 server;
230
230
        printf("call to TC_WaitForDump failed %u\n", code);
231
231
        exit(1);
232
232
    }
 
233
    return 0;
233
234
}
234
235
 
235
 
static
236
 
EndDump(as)
237
 
     register struct cmd_syndesc *as;
 
236
static int
 
237
EndDump(register struct cmd_syndesc *as, void *arock)
238
238
{
239
239
    struct rx_connection *aconn;
240
240
    afs_int32 server;
250
250
        printf("call to TC_EndDump failed %u\n", code);
251
251
        exit(1);
252
252
    }
 
253
    return 0;
253
254
}
254
255
 
255
 
static
256
 
MyBeforeProc(as, arock)
257
 
     struct cmd_syndesc *as;
258
 
     char *arock;
 
256
static int
 
257
MyBeforeProc(struct cmd_syndesc *as, void *arock)
259
258
{
260
259
    afs_int32 code;
261
260
 
296
295
#endif
297
296
    cmd_SetBeforeProc(MyBeforeProc, NULL);
298
297
 
299
 
    ts = cmd_CreateSyntax("dump", PerformDump, 0, "perform a dump");
300
 
 
301
 
    ts = cmd_CreateSyntax("restore", PerformRestore, 0, "perform a restore");
302
 
 
303
 
    ts = cmd_CreateSyntax("check", CheckDump, 0, "check a dump");
304
 
    cmd_AddParm(ts, "-id", CMD_SINGLE, 0, "dump id");
305
 
 
306
 
    ts = cmd_CreateSyntax("abort", AbortDump, 0, "abort a dump");
307
 
    cmd_AddParm(ts, "-id", CMD_SINGLE, 0, "dump id");
308
 
 
309
 
    ts = cmd_CreateSyntax("wait", WaitForDump, 0, "wait for a dump");
310
 
    cmd_AddParm(ts, "-id", CMD_SINGLE, 0, "dump id");
311
 
 
312
 
    ts = cmd_CreateSyntax("end", EndDump, 0, "end a dump");
 
298
    ts = cmd_CreateSyntax("dump", PerformDump, NULL, "perform a dump");
 
299
 
 
300
    ts = cmd_CreateSyntax("restore", PerformRestore, NULL, "perform a restore");
 
301
 
 
302
    ts = cmd_CreateSyntax("check", CheckDump, NULL, "check a dump");
 
303
    cmd_AddParm(ts, "-id", CMD_SINGLE, 0, "dump id");
 
304
 
 
305
    ts = cmd_CreateSyntax("abort", AbortDump, NULL, "abort a dump");
 
306
    cmd_AddParm(ts, "-id", CMD_SINGLE, 0, "dump id");
 
307
 
 
308
    ts = cmd_CreateSyntax("wait", WaitForDump, NULL, "wait for a dump");
 
309
    cmd_AddParm(ts, "-id", CMD_SINGLE, 0, "dump id");
 
310
 
 
311
    ts = cmd_CreateSyntax("end", EndDump, NULL, "end a dump");
313
312
    cmd_AddParm(ts, "-id", CMD_SINGLE, 0, "dump id");
314
313
 
315
314
    code = cmd_Dispatch(argc, argv);