int verbose = 0;
/* Forward Declarations */
-void HandleVolume(struct DiskPartition64 *partP, char *name, char *filename, int fromtime);
-Volume *AttachVolume(struct DiskPartition64 *dp, char *volname,
- struct VolumeHeader *header);
+static void HandleVolume(struct DiskPartition64 *partP, char *name,
+ char *filename, int fromtime);
+static Volume *AttachVolume(struct DiskPartition64 *dp, char *volname,
+ struct VolumeHeader *header);
static void DoMyVolDump(Volume * vp, struct DiskPartition64 *dp,
char *dumpfile, int fromtime);
char name[VMAXPATHLEN];
-int
+static int
ReadHdr1(IHandle_t * ih, char *to, int size, u_int magic, u_int version)
{
int code;
}
-Volume *
+static Volume *
AttachVolume(struct DiskPartition64 * dp, char *volname,
struct VolumeHeader * header)
{
vp->shuttingDown = 0;
vp->goingOffline = 0;
vp->nUsers = 1;
- vp->header = (struct volHeader *)calloc(1, sizeof(*vp->header));
+ vp->header = calloc(1, sizeof(*vp->header));
ec = ReadHdr1(V_diskDataHandle(vp), (char *)&V_disk(vp),
sizeof(V_disk(vp)), VOLUMEINFOMAGIC, VOLUMEINFOVERSION);
if (!ec) {
return 0;
}
-void
+static void
HandleVolume(struct DiskPartition64 *dp, char *name, char *filename, int fromtime)
{
struct VolumeHeader header;
}
DoMyVolDump(vp, dp, filename, fromtime);
+
+ free(vp);
}