/* volparse.c */
extern afs_int32 volutil_GetPartitionID(char *aname);
extern char *volutil_PartitionName_r(int avalue, char *tbuffer, int buflen);
+extern afs_int32 volutil_PartitionName2_r(afs_int32 part, char *tbuffer, size_t buflen);
extern char *volutil_PartitionName(int avalue);
extern afs_int32 util_GetInt32(register char *as, afs_int32 * aval);
extern afs_uint32 util_GetUInt32(register char *as, afs_uint32 * aval);
${TOP_INCDIR}/afs/salvsync.h \
${TOP_INCDIR}/afs/daemon_com.h \
${TOP_INCDIR}/afs/ihandle.h \
- ${TOP_INCDIR}/afs/namei_ops.h
+ ${TOP_INCDIR}/afs/namei_ops.h \
+ ${TOP_INCDIR}/afs/vol_prototypes.h
${TOP_LIBDIR}/vlib.a: vlib.a
${INSTALL_DATA} $? $@
${TOP_INCDIR}/afs/vol-salvage.h: vol-salvage.h
${INSTALL_DATA} $? $@
+${TOP_INCDIR}/afs/vol_prototypes.h: vol_prototypes.h
+ ${INSTALL_DATA} $? $@
+
#
# Installation targets
#
#include "volume.h"
#include "partition.h"
#include "viceinode.h"
+#include "vol_prototypes.h"
/*@printflike@*/ extern void Log(const char *format, ...);
#define flock(f,c) emul_flock(f,c)
#endif
-extern char *volutil_PartitionName_r(int volid, char *buf, int buflen);
int Testing=0;
fdP = IH_OPEN(h);
if (!fdP)
return EIO;
- strcpy(&path, name.n_path);
- strcat(&path, "-tmp");
+ strcpy(path, name.n_path);
+ strcat(path, "-tmp");
fd = afs_open(path, O_CREAT | O_EXCL | O_TRUNC | O_RDWR, 0);
if (fd < 0) {
FDH_CLOSE(fdP);
--- /dev/null
+/*
+ * Copyright 2000, International Business Machines Corporation and others.
+ * All Rights Reserved.
+ *
+ * This software has been released under the terms of the IBM Public
+ * License. For details, see the LICENSE file in the top-level source
+ * directory or online at http://www.openafs.org/dl/license10.html
+ */
+
+#ifndef _VOL_PROTOTYPES_H
+#define _VOL_PROTOTYPES_h
+
+/* clone.c */
+extern void CloneVolume(Error *, Volume *, Volume *, Volume *);
+extern int (*vol_PollProc) (void);
+
+/* nuke.c */
+extern int nuke(char *, afs_int32);
+
+/* vutil.c */
+extern void AssignVolumeName(register VolumeDiskData * vol, char *name, char *ext);
+extern void AssignVolumeName_r(register VolumeDiskData * vol, char *name, char *ext);
+extern void ClearVolumeStats(register VolumeDiskData * vol);
+extern void ClearVolumeStats_r(register VolumeDiskData * vol);
+extern afs_int32 CopyVolumeHeader(VolumeDiskData *, VolumeDiskData *);
+
+#endif
+
afs_uint32 nSmallVnodes, int connect, afs_uint32 volcache);
extern void DiskToVolumeHeader(VolumeHeader_t * h, VolumeDiskHeader_t * dh);
extern void VolumeHeaderToDisk(VolumeDiskHeader_t * dh, VolumeHeader_t * h);
+extern void AssignVolumeName(VolumeDiskData * vol, char *name, char *ext);
extern void VTakeOffline_r(register Volume * vp);
extern void VTakeOffline(register Volume * vp);
extern Volume * VLookupVolume_r(Error * ec, VolId volumeId, Volume * hint);
extern int VVolOpLeaveOnline_r(Volume * vp, FSSYNC_VolOp_info * vopinfo);
extern int VVolOpSetVBusy_r(Volume * vp, FSSYNC_VolOp_info * vopinfo);
+extern void VPurgeVolume(Error * ec, Volume * vp);
+
/* Naive formula relating number of file size to number of 1K blocks in file */
/* Note: we charge 1 block for 0 length files so the user can't store
#include "viceinode.h"
#include "volinodes.h"
+#include "vol_prototypes.h"
+
#ifdef AFS_AIX_ENV
#include <sys/lockf.h>
#endif
/*@printflike@*/ extern void Log(const char *format, ...);
-void AssignVolumeName(register VolumeDiskData * vol, char *name, char *ext);
-void AssignVolumeName_r(register VolumeDiskData * vol, char *name, char *ext);
-void ClearVolumeStats(register VolumeDiskData * vol);
-void ClearVolumeStats_r(register VolumeDiskData * vol);
-
-
#define nFILES (sizeof (stuff)/sizeof(struct stuff))
/* Note: the volume creation functions herein leave the destroyMe flag in the