vos: Add missing -partition requires -server checks
[openafs.git] / src / volser / dumpstuff.h
1 /*
2  * Copyright 2000, International Business Machines Corporation and others.
3  * All Rights Reserved.
4  *
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
8  */
9
10 #ifndef _VOLSER_DUMPSTUFF_H
11 #define _VOLSER_DUMPSTUFF_H
12
13 /* This iod stuff is a silly little package to emulate the old qi_in stuff,
14  * which emulated the stdio stuff.  There is a big assumption here, that the
15  * rx_Read will never be called directly, by a routine like readFile, when
16  * there is an old character that was pushed back with iod_ungetc.  This
17  * is really bletchy, and is here for compatibility only.  Eventually,
18  * we should define a volume format that doesn't require the pushing back
19  * of characters (i.e. characters should not double both as an end marker
20  * and a begin marker)
21  */
22 struct iod {
23     struct rx_call *call;       /* call to which to write, might be an array */
24     int device;                 /* dump device ID for volume */
25     int parentId;               /* dump parent ID for volume */
26     struct DiskPartition64 *dumpPartition;      /* Dump partition. */
27     struct rx_call **calls;     /* array of pointers to calls */
28     int ncalls;                 /* how many calls/codes in array */
29     int *codes;                 /* one return code for each call */
30     char haveOldChar;           /* state for pushing back a character */
31     char oldChar;
32 };
33
34 extern int DumpVolume(struct rx_call *call, Volume *vp, afs_int32, int);
35 extern int DumpVolMulti(struct rx_call **, int, Volume *, afs_int32, int,
36                         int *);
37 extern int RestoreVolume(struct rx_call *, Volume *, struct restoreCookie *);
38 extern int SizeDumpVolume(struct rx_call *, Volume *, afs_int32, int,
39                           struct volintSize *);
40
41 #endif