2 * Copyright 2000, International Business Machines Corporation and others.
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
10 #include <afsconfig.h>
11 #include <afs/param.h>
16 #include <sys/types.h>
21 #include <sys/socket.h>
22 #include <netinet/in.h>
26 #include <afs/vlserver.h> /*Misc server-side Volume Location stuff */
30 #include <afs/volint.h>
34 /* ********************************************************************* */
35 /* Volserver routines */
36 /* ********************************************************************* */
39 bc_GetEntryByID(uclient, volID, volType, vldbEntryPtr)
40 struct ubik_client *uclient;
43 struct vldbentry *vldbEntryPtr;
48 ubik_VL_GetEntryByID(uclient, 0, volID, volType, vldbEntryPtr);
53 * Determine the time stamp to be recorded with the backup of this
54 * volume. For backup and r/o volumes this is the clone time, for
55 * r/w volumes, this is the current time. This timestamp is stored
56 * directly into the cloneDate field of the bc_volumeDump structure
59 * -1 - failed to get information. Sets cloneDate to 0.
63 volImageTime(serv, part, volid, voltype, clDatePtr)
71 struct volintInfo *viptr;
73 if (voltype == RWVOL) {
78 code = UV_ListOneVolume(htonl(serv), part, volid, &viptr);
81 "Warning: Can't get clone time of volume %u - using 0",
87 /* volume types from vol/voldefs.h */
88 switch (viptr->type) {
90 /* For a r/w volume there may not be any foolproof way of
91 * preventing anomalies in the backups. Use the current time;
98 *clDatePtr = viptr->creationDate; /* use the creation time */
103 "Can't get clone time of volume %u - unknown volume type",