#include <afsconfig.h>
#include <afs/param.h>
+#ifdef IGNORE_SOME_GCC_WARNINGS
+# pragma GCC diagnostic warning "-Wformat"
+#endif
#include <ctype.h>
#include <errno.h>
#include <rx/xdr.h>
#include <afs/afsint.h>
-#include "nfs.h"
+#include <afs/nfs.h>
#include <afs/errors.h>
-#include "lock.h"
-#include "lwp.h"
+#include <lock.h>
+#include <lwp.h>
#include <afs/afssyscalls.h>
-#include "ihandle.h"
-#include "vnode.h"
-#include "volume.h"
-#include "partition.h"
-#include "viceinode.h"
+#include <afs/ihandle.h>
+#include <afs/vnode.h>
+#include <afs/volume.h>
+#include <afs/partition.h>
+#include <afs/viceinode.h>
#include <afs/afssyscalls.h>
-#include "acl.h"
+#include <afs/acl.h>
+#include <afs/dir.h>
+#include <afs/com_err.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#include <dirent.h>
-#include "volser/volser.h"
-#include "volser/volint.h"
-#include "volser/dump.h"
+#include "volser.h"
+#include "volint.h"
+#include "dump.h"
#define putint32(p, v) *p++ = v>>24, *p++ = v>>16, *p++ = v>>8, *p++ = v
#define putshort(p, v) *p++ = v>>8, *p++ = v
int
ReadHdr1(IHandle_t * ih, char *to, int size, u_int magic, u_int version)
{
- int bad = 0;
int code;
code = IH_IREAD(ih, 0, to, size);
{
struct VolumeHeader header;
struct VolumeDiskHeader diskHeader;
- struct afs_stat status, stat;
+ struct afs_stat status;
register int fd;
Volume *vp;
- IHandle_t *ih;
char headerName[1024];
afs_int32 n;
{
register struct cmd_syndesc *ts;
afs_int32 code;
+ VolumePackageOptions opts;
- VInitVolumePackage(volumeUtility, 5, 5, DONT_CONNECT_FS, 0);
+ VOptDefaults(volumeUtility, &opts);
+ VInitVolumePackage2(volumeUtility, &opts);
ts = cmd_CreateSyntax(NULL, handleit, NULL,
"Dump a volume to a 'vos dump' format file without using volserver");
#ifndef AFS_NT40_ENV
struct afs_stat status;
#endif
- afs_sfsize_t size, tmpsize;
+ afs_sfsize_t size;
#ifdef AFS_AIX_ENV
#include <sys/statfs.h>
struct statfs tstatfs;
if (verbose)
fprintf(stderr, " howBig = %u, howMany = %u, fdh size = %u\n",
- howBig, howMany, size);
+ (unsigned int) howBig, (unsigned int) howMany,
+ (unsigned int) size);
#ifdef AFS_LARGEFILE_ENV
{
dumpfd =
afs_open(dumpfile, O_CREAT | O_WRONLY | O_TRUNC, S_IRUSR | S_IWUSR);
if (dumpfd < 0) {
- fprintf(stderr, "Failed to open dump file! Exiting.\n");
+ fprintf(stderr, "Failed to open dump file: %s. Exiting.\n",
+ afs_error_message(errno));
exit(1);
}
} else {