From 32e107317cbc0db93b46a56dcf69102e9ab0ff1e Mon Sep 17 00:00:00 2001 From: Simon Wilkinson Date: Fri, 10 Jul 2009 18:33:38 +0100 Subject: [PATCH] Rework bucoord prototypes for external dlq use Rework prototyping in the bucoord directory so that bucoord_prototypes.h can be used by others who need definitions of the dlq_* types. Add additional prototyping and header includes so these types work correctly No Windows specific changes are required, as the NTMakefile doesn't have header dependencies Reviewed-on: http://gerrit.openafs.org/35 Verified-by: Russ Allbery Reviewed-by: Russ Allbery --- src/bubasics/bubasics.h | 2 +- src/bucoord/Makefile.in | 5 +- src/bucoord/bc_status.c | 2 +- src/bucoord/bucoord_internal.h | 176 ++++++++++++++++++++++++++ src/bucoord/bucoord_prototypes.h | 210 +++++-------------------------- src/bucoord/commands.c | 1 + src/bucoord/dlq.c | 10 +- src/bucoord/dsvs.c | 2 +- src/bucoord/dump.c | 3 +- src/bucoord/dump_sched.c | 2 +- src/bucoord/main.c | 6 +- src/bucoord/restore.c | 1 + src/bucoord/status.c | 1 + src/bucoord/tape_hosts.c | 2 +- src/bucoord/ubik_db_if.c | 3 + src/bucoord/vol_sets.c | 2 +- 16 files changed, 230 insertions(+), 198 deletions(-) create mode 100644 src/bucoord/bucoord_internal.h diff --git a/src/bubasics/bubasics.h b/src/bubasics/bubasics.h index d647b49fd..0bc925c85 100644 --- a/src/bubasics/bubasics.h +++ b/src/bubasics/bubasics.h @@ -137,7 +137,7 @@ struct dlqlink { struct dlqlink *dlq_next; struct dlqlink *dlq_prev; afs_int32 dlq_type; - char *dlq_structPtr; /* enclosing structure */ + void *dlq_structPtr; /* enclosing structure */ }; typedef struct dlqlink dlqlinkT; diff --git a/src/bucoord/Makefile.in b/src/bucoord/Makefile.in index c54d23025..1700606c1 100644 --- a/src/bucoord/Makefile.in +++ b/src/bucoord/Makefile.in @@ -22,11 +22,14 @@ LIBS=${TOP_LIBDIR}/libbudb.a ${TOP_LIBDIR}/libbubasics.a \ ${TOP_LIBDIR}/liblwp.a ${TOP_LIBDIR}/libcmd.a \ ${TOP_LIBDIR}/libcom_err.a ${TOP_LIBDIR}/util.a -all: ${TOP_LIBDIR}/libbxdb.a backup +all: ${TOP_LIBDIR}/libbxdb.a ${TOP_INCDIR}/afs/bucoord_prototypes.h backup ${TOP_LIBDIR}/libbxdb.a: libbxdb.a ${INSTALL_DATA} $? $@ +${TOP_INCDIR}/afs/bucoord_prototypes.h: bucoord_prototypes.h + ${INSTALL_DATA} $? $@ + libbxdb.a: dsstub.o ubik_db_if.o status.o dlq.o bucoord_errs.o volstub.o AFS_component_version_number.o -$(RM) -f $@ $(AR) crv $@ dsstub.o ubik_db_if.o status.o dlq.o bucoord_errs.o volstub.o AFS_component_version_number.o diff --git a/src/bucoord/bc_status.c b/src/bucoord/bc_status.c index cc4983592..bd81f542c 100644 --- a/src/bucoord/bc_status.c +++ b/src/bucoord/bc_status.c @@ -26,6 +26,7 @@ #include #include "bc.h" #include "error_macros.h" +#include "bucoord_internal.h" #include "bucoord_prototypes.h" #define SET_FLAG(set) \ @@ -40,7 +41,6 @@ extern struct bc_config *bc_globalConfig; extern afs_int32 bc_GetConn(struct bc_config *aconfig, afs_int32 aport, struct rx_connection **tconn); -extern statusP findStatus(afs_uint32 taskId); /* globals for backup coordinator status management */ diff --git a/src/bucoord/bucoord_internal.h b/src/bucoord/bucoord_internal.h new file mode 100644 index 000000000..8fc8f1652 --- /dev/null +++ b/src/bucoord/bucoord_internal.h @@ -0,0 +1,176 @@ +/* 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 _BUCOORD_INTERNAL_H +#define _BUCOORD_INTERNAL_H + +/* bc_status.c */ + +extern void *statusWatcher(void *); +extern afs_int32 bc_jobNumber(void); +extern int waitForTask(afs_uint32 taskId); + +/* command.c */ +extern char *bc_CopyString(char *astring); +extern afs_int32 getPortOffset(char *port); +extern afs_int32 bc_SafeATOI(char *anum); +extern int bc_WaitForNoJobs(void); + +struct cmd_syndesc; +extern int bc_DumpCmd(struct cmd_syndesc *as, void *arock); +extern int bc_VolRestoreCmd(struct cmd_syndesc *as, void *arock); +extern int bc_DiskRestoreCmd(struct cmd_syndesc *as, void *arock); +extern int bc_QuitCmd(struct cmd_syndesc *as, void *arock); +extern int bc_VolsetRestoreCmd(struct cmd_syndesc *as, void *arock); +extern int bc_AddHostCmd(struct cmd_syndesc *as, void *arock); +extern int bc_DeleteHostCmd(struct cmd_syndesc *as, void *arock); +extern int bc_ListHostsCmd(struct cmd_syndesc *as, void *arock); +extern int bc_JobsCmd(struct cmd_syndesc *as, void *arock); +extern int bc_KillCmd(struct cmd_syndesc *as, void *arock); +extern int bc_ListVolSetCmd(struct cmd_syndesc *as, void *arock); +extern int bc_ListDumpScheduleCmd(struct cmd_syndesc *as, void *arock); +extern int bc_AddVolSetCmd(struct cmd_syndesc *as, void *arock); +extern int bc_GetTapeStatusCmd(struct cmd_syndesc *as, void *arock); +extern int bc_DeleteVolSetCmd(struct cmd_syndesc *as, void *arock); +extern int bc_AddVolEntryCmd(struct cmd_syndesc *as, void *arock); +extern int bc_DeleteVolEntryCmd(struct cmd_syndesc *as, void *arock); +extern int bc_AddDumpCmd(struct cmd_syndesc *as, void *arock); +extern int bc_DeleteDumpCmd(struct cmd_syndesc *as, void *arock); +extern int bc_LabelTapeCmd(struct cmd_syndesc *as, void *arock); +extern int bc_ReadLabelCmd(struct cmd_syndesc *as, void *arock); +extern int bc_ScanDumpsCmd(struct cmd_syndesc *as, void *arock); +extern int bc_dblookupCmd(struct cmd_syndesc *as, void *arock); +extern int bc_SetExpCmd(struct cmd_syndesc *as, void *arock); +extern int bc_saveDbCmd(struct cmd_syndesc *as, void *arock); +extern int bc_restoreDbCmd(struct cmd_syndesc *as, void *arock); +extern int bc_dumpInfoCmd(struct cmd_syndesc *as, void *arock); +extern int bc_dbVerifyCmd(struct cmd_syndesc *as, void *arock); +extern int bc_deleteDumpCmd(struct cmd_syndesc *as, void *arock); + +/* config.c */ +extern int bc_AddTapeHost(struct bc_config *aconfig, char *aname, + afs_int32 aport); +extern int bc_DeleteTapeHost(struct bc_config *aconfig, char *aname, + afs_int32 aport); + +/* dsstub.c */ +extern char *tailCompPtr(char *pathNamePtr); + +/* dsvs.c */ +extern struct bc_volumeSet *bc_FindVolumeSet(struct bc_config *aconfig, + char *aname); +extern void FreeVolumeSet(struct bc_volumeSet *); +extern int bc_AddVolumeItem(struct bc_config *aconfig, char *avolName, + char *ahost, char *apart, char *avol); +extern int bc_CreateVolumeSet(struct bc_config *aconfig, char *avolName, + afs_int32 aflags); +extern int bc_DeleteVolumeItem(struct bc_config *aconfig, char *avolName, + afs_int32 anumber); +extern int bc_DeleteVolumeSet(struct bc_config *aconfig, char *avolName, + afs_int32 *flags); +extern int bc_ParseHost(char *aname, struct sockaddr_in *asockaddr); +extern afs_int32 bc_GetPartitionID(char *aname, afs_int32 *aval); +extern int bc_CreateDumpSchedule(struct bc_config *aconfig, char *adumpName, + afs_int32 expDate, afs_int32 expType); +extern int bc_DeleteDumpSchedule(struct bc_config *aconfig, char *adumpName); +extern int FindDump(struct bc_config *aconfig, char *nodeString, + struct bc_dumpSchedule **parentptr, + struct bc_dumpSchedule **nodeptr); +extern int bc_ProcessDumpSchedule(struct bc_config *aconfig); +extern struct bc_dumpSchedule * bc_FindDumpSchedule(struct bc_config *aconfig, + char *aname); + + +/* dump.c */ +extern int CheckTCVersion(struct rx_connection *tconn); +extern int ConnectButc(struct bc_config *config, afs_int32 port, + struct rx_connection **tconn); +extern int bc_StartDmpRst(struct bc_config *aconfig, char *adname, + char *avname, struct bc_volumeDump *avolsToDump, + struct sockaddr_in *adestServer, + afs_int32 adestPartition, afs_int32 afromDate, + char *anewExt, int aoldFlag, afs_int32 aparent, + afs_int32 alevel, int (*aproc) (int), + afs_int32 *ports, afs_int32 portCount, + struct bc_dumpSchedule *dsptr, int append, + int dontExecute); +extern int bc_Dumper(int); +extern int bc_LabelTape(char *afsname, char *pname, afs_int32 size, + struct bc_config *config, afs_int32 port); +extern int bc_ReadLabel(struct bc_config *config, afs_int32 port); +extern int bc_ScanDumps(struct bc_config *config, afs_int32 dbAddFlag, + afs_int32 port); + + + + +/* dump_sched.c */ +extern afs_int32 bc_UpdateDumpSchedule(void); +extern int bc_SaveDumpSchedule(void); + +/* expire.c */ +struct cmd_parmdesc; +extern afs_int32 bc_ParseExpiration(struct cmd_parmdesc *paramPtr, + afs_int32 *expType, afs_int32 *expDate); +/* main.c */ +extern afs_int32 doDispatch(afs_int32, char *[], afs_int32); +extern void bc_HandleMisc(afs_int32 code); + +/* regex.c */ +extern char *re_comp(const char *sp); +extern int re_exec(const char *p1); + +/* restore.c */ +extern int BackupName(char *); +extern int bc_Restorer(afs_int32); + +/* status.c */ +extern void initStatus(void); +extern void lock_cmdLine(void); +extern void unlock_cmdLine(void); +extern void clearStatus(afs_uint32, afs_uint32); + +/* tape_hosts.c */ +extern afs_int32 bc_UpdateHosts(void); +extern int bc_SaveHosts(void); + +/* ubik_db_if.c */ +extern afs_int32 filesize(FILE *stream); +extern int bc_CheckTextVersion(udbClientTextP ctPtr); +extern int bc_openTextFile(udbClientTextP ctPtr, char *tmpFileName); +extern int bcdb_GetTextFile(register udbClientTextP ctPtr); +extern afs_int32 bcdb_FindVolumes(afs_int32 dumpID, char *volumeName, + struct budb_volumeEntry *returnArray, + afs_int32 last, afs_int32 *next, + afs_int32 maxa, afs_int32 *nEntries); +extern int bcdb_FindDump(char *volumeName, afs_int32 beforeDate, + struct budb_dumpEntry *deptr); +extern afs_int32 bcdb_FindLastVolClone(char *volSetName, char *dumpName, + char *volName, afs_int32 *clonetime); +extern afs_int32 bcdb_listDumps (afs_int32 sflags, afs_int32 groupId, + afs_int32 fromTime, afs_int32 toTime, + budb_dumpsList *dumps, budb_dumpsList *flags); +extern afs_int32 bcdb_DeleteVDP(char *, char *, afs_int32 ); +extern afs_int32 bcdb_FindClone(afs_int32, char *, afs_int32 *); +extern afs_int32 bcdb_LookupVolume(char *volumeName, + struct budb_volumeEntry *returnArray, + afs_int32 last, afs_int32 *next, + afs_int32 maxa, afs_int32 *nEntries); +extern int bcdb_FindTape(afs_int32 dumpid, char *tapeName, + struct budb_tapeEntry *teptr); + +/* vol_sets.c */ +extern afs_int32 bc_UpdateVolumeSet(void); +extern int bc_SaveVolumeSet(void); + +/* volstub.c */ + +extern afs_int32 volImageTime(afs_int32 serv, afs_int32 part, afs_int32 volid, + afs_int32 voltype, afs_int32 *clDatePtr); +#endif + diff --git a/src/bucoord/bucoord_prototypes.h b/src/bucoord/bucoord_prototypes.h index 7e0039d6a..d36a73036 100644 --- a/src/bucoord/bucoord_prototypes.h +++ b/src/bucoord/bucoord_prototypes.h @@ -9,203 +9,49 @@ #ifndef _BUCOORD_PROTOTYPES_H #define _BUCOORD_PROTOTYPES_H -/* bc_status.c */ - -extern void *statusWatcher(void *); -extern afs_int32 bc_jobNumber(void); -extern int waitForTask(afs_uint32 taskId); - -/* command.c */ -extern char *bc_CopyString(char *astring); -extern afs_int32 getPortOffset(char *port); -extern afs_int32 bc_SafeATOI(char *anum); -extern int bc_WaitForNoJobs(void); - -struct cmd_syndesc; -extern int bc_DumpCmd(struct cmd_syndesc *as, void *arock); -extern int bc_VolRestoreCmd(struct cmd_syndesc *as, void *arock); -extern int bc_DiskRestoreCmd(struct cmd_syndesc *as, void *arock); -extern int bc_QuitCmd(struct cmd_syndesc *as, void *arock); -extern int bc_VolsetRestoreCmd(struct cmd_syndesc *as, void *arock); -extern int bc_AddHostCmd(struct cmd_syndesc *as, void *arock); -extern int bc_DeleteHostCmd(struct cmd_syndesc *as, void *arock); -extern int bc_ListHostsCmd(struct cmd_syndesc *as, void *arock); -extern int bc_JobsCmd(struct cmd_syndesc *as, void *arock); -extern int bc_KillCmd(struct cmd_syndesc *as, void *arock); -extern int bc_ListVolSetCmd(struct cmd_syndesc *as, void *arock); -extern int bc_ListDumpScheduleCmd(struct cmd_syndesc *as, void *arock); -extern int bc_AddVolSetCmd(struct cmd_syndesc *as, void *arock); -extern int bc_GetTapeStatusCmd(struct cmd_syndesc *as, void *arock); -extern int bc_DeleteVolSetCmd(struct cmd_syndesc *as, void *arock); -extern int bc_AddVolEntryCmd(struct cmd_syndesc *as, void *arock); -extern int bc_DeleteVolEntryCmd(struct cmd_syndesc *as, void *arock); -extern int bc_AddDumpCmd(struct cmd_syndesc *as, void *arock); -extern int bc_DeleteDumpCmd(struct cmd_syndesc *as, void *arock); -extern int bc_LabelTapeCmd(struct cmd_syndesc *as, void *arock); -extern int bc_ReadLabelCmd(struct cmd_syndesc *as, void *arock); -extern int bc_ScanDumpsCmd(struct cmd_syndesc *as, void *arock); -extern int bc_dblookupCmd(struct cmd_syndesc *as, void *arock); -extern int bc_SetExpCmd(struct cmd_syndesc *as, void *arock); -extern int bc_saveDbCmd(struct cmd_syndesc *as, void *arock); -extern int bc_restoreDbCmd(struct cmd_syndesc *as, void *arock); -extern int bc_dumpInfoCmd(struct cmd_syndesc *as, void *arock); -extern int bc_dbVerifyCmd(struct cmd_syndesc *as, void *arock); -extern int bc_deleteDumpCmd(struct cmd_syndesc *as, void *arock); - - - - - - - - - -/* config.c */ -extern int bc_AddTapeHost(struct bc_config *aconfig, char *aname, - afs_int32 aport); -extern int bc_DeleteTapeHost(struct bc_config *aconfig, char *aname, - afs_int32 aport); - /* dlq.c */ -extern int dlqEmpty(dlqlinkP headptr ); -extern int dlqInit(dlqlinkP headptr ); +extern int dlqEmpty(dlqlinkP); +extern int dlqInit(dlqlinkP); extern void dlqUnlink(dlqlinkP ); -extern int dlqLinkb(dlqlinkP headptr, dlqlinkP entryptr); - -/* dsstub.c */ -extern char *tailCompPtr(char *pathNamePtr); - -/* dsvs.c */ -extern struct bc_volumeSet *bc_FindVolumeSet(struct bc_config *aconfig, - char *aname); -extern void FreeVolumeSet(struct bc_volumeSet *); -extern int bc_AddVolumeItem(struct bc_config *aconfig, char *avolName, - char *ahost, char *apart, char *avol); -extern int bc_CreateVolumeSet(struct bc_config *aconfig, char *avolName, - afs_int32 aflags); -extern int bc_DeleteVolumeItem(struct bc_config *aconfig, char *avolName, - afs_int32 anumber); -extern int bc_DeleteVolumeSet(struct bc_config *aconfig, char *avolName, - afs_int32 *flags); -extern int bc_ParseHost(char *aname, struct sockaddr_in *asockaddr); -extern afs_int32 bc_GetPartitionID(char *aname, afs_int32 *aval); -extern int bc_CreateDumpSchedule(struct bc_config *aconfig, char *adumpName, - afs_int32 expDate, afs_int32 expType); -extern int bc_DeleteDumpSchedule(struct bc_config *aconfig, char *adumpName); -extern int FindDump(struct bc_config *aconfig, char *nodeString, - struct bc_dumpSchedule **parentptr, - struct bc_dumpSchedule **nodeptr); -extern int bc_ProcessDumpSchedule(struct bc_config *aconfig); -extern struct bc_dumpSchedule * bc_FindDumpSchedule(struct bc_config *aconfig, - char *aname); - - -/* dump.c */ -extern int CheckTCVersion(struct rx_connection *tconn); -extern int ConnectButc(struct bc_config *config, afs_int32 port, - struct rx_connection **tconn); -extern int bc_StartDmpRst(struct bc_config *aconfig, char *adname, - char *avname, struct bc_volumeDump *avolsToDump, - struct sockaddr_in *adestServer, - afs_int32 adestPartition, afs_int32 afromDate, - char *anewExt, int aoldFlag, afs_int32 aparent, - afs_int32 alevel, int (*aproc) (int), - afs_int32 *ports, afs_int32 portCount, - struct bc_dumpSchedule *dsptr, int append, - int dontExecute); -extern int bc_Dumper(int); -extern int bc_LabelTape(char *afsname, char *pname, afs_int32 size, - struct bc_config *config, afs_int32 port); -extern int bc_ReadLabel(struct bc_config *config, afs_int32 port); -extern int bc_ScanDumps(struct bc_config *config, afs_int32 dbAddFlag, - afs_int32 port); - - - +extern int dlqLinkb(dlqlinkP, dlqlinkP); +extern int dlqLinkf(dlqlinkP, dlqlinkP); -/* dump_sched.c */ -extern afs_int32 bc_UpdateDumpSchedule(void); -extern int bc_SaveDumpSchedule(void); - -/* expire.c */ -struct cmd_parmdesc; -extern afs_int32 bc_ParseExpiration(struct cmd_parmdesc *paramPtr, - afs_int32 *expType, afs_int32 *expDate); -/* main.c */ -extern afs_int32 doDispatch(afs_int32, char *[], afs_int32); -extern void bc_HandleMisc(afs_int32 code); - -/* regex.c */ -extern char *re_comp(const char *sp); -extern int re_exec(const char *p1); - -/* restore.c */ -extern int BackupName(char *); -extern int bc_Restorer(afs_int32); +extern int dlqTraverseQueue(dlqlinkP, int (*)(void *), int (*)(void *)); /* status.c */ -extern void initStatus(void); +extern statusP findStatus(afs_uint32); extern void lock_Status(void); extern void unlock_Status(void); -extern void lock_cmdLine(void); -extern void unlock_cmdLine(void); -extern void clearStatus(afs_uint32, afs_uint32); -extern statusP createStatusNode(void); extern void deleteStatusNode(statusP ptr); -extern statusP findStatus(afs_uint32); +extern statusP createStatusNode(void); -/* tape_hosts.c */ -extern afs_int32 bc_UpdateHosts(void); -extern int bc_SaveHosts(void); +/* volstub.c */ +struct vldbentry; +extern afs_int32 bc_GetEntryByID(struct ubik_client *uclient, + afs_int32 volID, afs_int32 volType, + struct vldbentry *vldbEntryPtr); /* ubik_db_if.c */ extern int bc_LockText(udbClientTextP ctPtr); extern int bc_UnlockText(udbClientTextP ctPtr); extern int bcdb_SaveTextFile(udbClientTextP ctPtr); -extern afs_int32 filesize(FILE *stream); -extern int bc_CheckTextVersion(udbClientTextP ctPtr); -extern int bc_openTextFile(udbClientTextP ctPtr, char *tmpFileName); -extern int bcdb_GetTextFile(register udbClientTextP ctPtr); -extern int bcdb_FindDumpByID(afs_int32 dumpID, struct budb_dumpEntry *deptr); -extern afs_int32 bcdb_FindVolumes(afs_int32 dumpID, char *volumeName, - struct budb_volumeEntry *returnArray, - afs_int32 last, afs_int32 *next, - afs_int32 maxa, afs_int32 *nEntries); -extern int bcdb_FindDump(char *volumeName, afs_int32 beforeDate, - struct budb_dumpEntry *deptr); -extern afs_int32 bcdb_FindLastVolClone(char *volSetName, char *dumpName, - char *volName, afs_int32 *clonetime); -extern int bcdb_FindLatestDump(char *volSetName, char *dumpPath, - struct budb_dumpEntry *deptr); -extern afs_int32 bcdb_FindClone(afs_int32 dumpID, char *volName, - afs_int32 *clonetime); -extern afs_int32 bcdb_AddVolume(register struct budb_volumeEntry *); -extern afs_int32 bcdb_AddVolumes(register struct budb_volumeEntry *, - afs_int32 ); -extern afs_int32 bcdb_CreateDump(register struct budb_dumpEntry *) ; -extern afs_int32 bcdb_deleteDump(afs_int32 dumpID, afs_int32 fromTime, - afs_int32 toTime, budb_dumpsList *dumps); -extern afs_int32 bcdb_listDumps (afs_int32 sflags, afs_int32 groupId, - afs_int32 fromTime, afs_int32 toTime, - budb_dumpsList *dumps, budb_dumpsList *flags); -extern afs_int32 bcdb_DeleteVDP(char *, char *, afs_int32 ); +extern int bcdb_FindDumpByID(afs_int32, struct budb_dumpEntry *); +extern int bcdb_FindLastTape(afs_int32, struct budb_dumpEntry *, + struct budb_tapeEntry *, + struct budb_volumeEntry *); +extern afs_int32 bcdb_deleteDump(afs_int32, afs_int32, afs_int32, + budb_dumpsList *); +extern int bcdb_MakeDumpAppended(afs_int32, afs_int32, afs_int32); +extern afs_int32 bcdb_CreateDump(struct budb_dumpEntry *) ; +extern int bcdb_FindLatestDump(char *, char *, struct budb_dumpEntry *); extern afs_int32 bcdb_FindClone(afs_int32, char *, afs_int32 *); -extern afs_int32 bcdb_LookupVolume(char *volumeName, - struct budb_volumeEntry *returnArray, - afs_int32 last, afs_int32 *next, - afs_int32 maxa, afs_int32 *nEntries); -extern int bcdb_FindTape(afs_int32 dumpid, char *tapeName, - struct budb_tapeEntry *teptr); -extern int bcdb_FindTapeSeq(afs_int32 dumpid, afs_int32 tapeSeq, +extern int bcdb_FinishDump(struct budb_dumpEntry *); +extern int bcdb_UseTape(struct budb_tapeEntry *, afs_int32 *); +extern int bcdb_FinishTape(struct budb_tapeEntry *); +extern int bcdb_FindTapeSeq(afs_int32 dumpid, afs_int32 tapeSeq, struct budb_tapeEntry *teptr); - -/* vol_sets.c */ -extern afs_int32 bc_UpdateVolumeSet(void); -extern int bc_SaveVolumeSet(void); - -/* volstub.c */ - -extern afs_int32 volImageTime(afs_int32 serv, afs_int32 part, afs_int32 volid, - afs_int32 voltype, afs_int32 *clDatePtr); +extern afs_int32 bcdb_AddVolume(register struct budb_volumeEntry *); +extern afs_int32 bcdb_AddVolumes(register struct budb_volumeEntry *, + afs_int32 ); #endif diff --git a/src/bucoord/commands.c b/src/bucoord/commands.c index 3b3009ba3..88ba957bd 100644 --- a/src/bucoord/commands.c +++ b/src/bucoord/commands.c @@ -45,6 +45,7 @@ #include #include "bc.h" #include "error_macros.h" +#include "bucoord_internal.h" #include "bucoord_prototypes.h" #include "regex.h" diff --git a/src/bucoord/dlq.c b/src/bucoord/dlq.c index 08f48f1c1..91e2694a7 100644 --- a/src/bucoord/dlq.c +++ b/src/bucoord/dlq.c @@ -15,13 +15,9 @@ #include "bc.h" #include +#include "bucoord_prototypes.h" + /* protos */ -int dlqEmpty(dlqlinkP ); -int dlqInit(dlqlinkP headptr); -int dlqLinkf(dlqlinkP, dlqlinkP ); -int dlqLinkb(dlqlinkP, dlqlinkP ); -void dlqUnlink( dlqlinkP ); -int dlqTraverseQueue(dlqlinkP, int *(), int *()); int dlqCount(dlqlinkP ); void dlqMoveb( dlqlinkP, dlqlinkP); dlqlinkP dlqUnlinkb(dlqlinkP ); @@ -210,7 +206,7 @@ int dlqCount(dlqlinkP headptr) return (count); } -int dlqTraverseQueue(dlqlinkP headptr, int (*fn1()), int (*fn2())) +int dlqTraverseQueue(dlqlinkP headptr, int (*fn1)(void *), int (*fn2)(void *)) { dlqlinkP ptr, oldPtr; diff --git a/src/bucoord/dsvs.c b/src/bucoord/dsvs.c index 5f5f69b4a..379f54c0e 100644 --- a/src/bucoord/dsvs.c +++ b/src/bucoord/dsvs.c @@ -33,7 +33,7 @@ #include #include "bc.h" -#include "bucoord_prototypes.h" +#include "bucoord_internal.h" struct ubik_client *cstructp; /*Ptr to Ubik client structure */ diff --git a/src/bucoord/dump.c b/src/bucoord/dump.c index 846e0e5d9..b8d3a06d0 100644 --- a/src/bucoord/dump.c +++ b/src/bucoord/dump.c @@ -37,6 +37,7 @@ #include "bc.h" #include "error_macros.h" +#include "bucoord_internal.h" #include "bucoord_prototypes.h" struct bc_dumpTask bc_dumpTasks[BC_MAXSIMDUMPS]; @@ -245,7 +246,7 @@ bc_StartDmpRst(struct bc_config *aconfig, char *adname, char *avname, { register int i; register afs_int32 code; - char *junk; + void *junk; for (i = 0; i < BC_MAXSIMDUMPS; i++) if (!(bc_dumpTasks[i].flags & BC_DI_INUSE)) diff --git a/src/bucoord/dump_sched.c b/src/bucoord/dump_sched.c index 867ffee36..06669be66 100644 --- a/src/bucoord/dump_sched.c +++ b/src/bucoord/dump_sched.c @@ -33,7 +33,7 @@ #include #include "bc.h" #include "error_macros.h" -#include "bucoord_prototypes.h" +#include "bucoord_internal.h" /* code to manage dump schedules * specific to the ubik database implementation diff --git a/src/bucoord/main.c b/src/bucoord/main.c index f0a1de4da..90e228a68 100644 --- a/src/bucoord/main.c +++ b/src/bucoord/main.c @@ -44,9 +44,13 @@ #include #include #include +#include +#include +#include +#include #include "bc.h" /*Backup Coordinator structs and defs */ -#include "bucoord_prototypes.h" +#include "bucoord_internal.h" int localauth, interact; char tcell[64]; diff --git a/src/bucoord/restore.c b/src/bucoord/restore.c index bda6e40c8..bb379e9fd 100644 --- a/src/bucoord/restore.c +++ b/src/bucoord/restore.c @@ -34,6 +34,7 @@ #include #include #include "error_macros.h" +#include "bucoord_internal.h" #include "bucoord_prototypes.h" extern struct bc_dumpTask bc_dumpTasks[BC_MAXSIMDUMPS]; diff --git a/src/bucoord/status.c b/src/bucoord/status.c index 5e63ac3c3..16bd74744 100644 --- a/src/bucoord/status.c +++ b/src/bucoord/status.c @@ -25,6 +25,7 @@ #include #include "bc.h" #include "error_macros.h" +#include "bucoord_internal.h" #include "bucoord_prototypes.h" extern dlqlinkT statusHead; /* chain of status blocks */ diff --git a/src/bucoord/tape_hosts.c b/src/bucoord/tape_hosts.c index dba06eba9..a5d98f818 100644 --- a/src/bucoord/tape_hosts.c +++ b/src/bucoord/tape_hosts.c @@ -27,7 +27,7 @@ #include "bc.h" #include "error_macros.h" #include -#include "bucoord_prototypes.h" +#include "bucoord_internal.h" /* code to manage tape hosts * specific to the ubik database implementation diff --git a/src/bucoord/ubik_db_if.c b/src/bucoord/ubik_db_if.c index b6c0a650b..655c642ae 100644 --- a/src/bucoord/ubik_db_if.c +++ b/src/bucoord/ubik_db_if.c @@ -35,6 +35,7 @@ #include "bc.h" #include "error_macros.h" +#include "bucoord_internal.h" #include "bucoord_prototypes.h" extern char *whoami; @@ -619,6 +620,7 @@ bcdb_SaveTextFile(udbClientTextP ctPtr) return (code); } +int bcdb_FindLastTape(afs_int32 dumpID, struct budb_dumpEntry *dumpEntry, struct budb_tapeEntry *tapeEntry, struct budb_volumeEntry *volEntry) @@ -627,6 +629,7 @@ bcdb_FindLastTape(afs_int32 dumpID, struct budb_dumpEntry *dumpEntry, tapeEntry, volEntry)); } +int bcdb_MakeDumpAppended(afs_int32 appendedDumpID, afs_int32 initialDumpID, afs_int32 startTapeSeq) { diff --git a/src/bucoord/vol_sets.c b/src/bucoord/vol_sets.c index 23d85cae5..70e2cb5f4 100644 --- a/src/bucoord/vol_sets.c +++ b/src/bucoord/vol_sets.c @@ -27,7 +27,7 @@ #include #include "bc.h" #include "error_macros.h" -#include "bucoord_prototypes.h" +#include "bucoord_internal.h" /* code to manage volumesets * specific to the ubik database implementation -- 2.39.5