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>
32 extern int VL_GetEntryByID();
35 /* ********************************************************************* */
36 /* Volserver routines */
37 /* ********************************************************************* */
40 bc_GetEntryByID(uclient, volID, volType, vldbEntryPtr)
41 struct ubik_client *uclient;
44 struct vldbentry *vldbEntryPtr;
49 ubik_Call(VL_GetEntryByID, uclient, 0, volID, volType, vldbEntryPtr);
54 * Determine the time stamp to be recorded with the backup of this
55 * volume. For backup and r/o volumes this is the clone time, for
56 * r/w volumes, this is the current time. This timestamp is stored
57 * directly into the cloneDate field of the bc_volumeDump structure
60 * -1 - failed to get information. Sets cloneDate to 0.
64 volImageTime(serv, part, volid, voltype, clDatePtr)
72 struct volintInfo *viptr;
74 if (voltype == RWVOL) {
79 code = UV_ListOneVolume(htonl(serv), part, volid, &viptr);
82 "Warning: Can't get clone time of volume %u - using 0",
88 /* volume types from vol/voldefs.h */
89 switch (viptr->type) {
91 /* For a r/w volume there may not be any foolproof way of
92 * preventing anomalies in the backups. Use the current time;
99 *clDatePtr = viptr->creationDate; /* use the creation time */
104 "Can't get clone time of volume %u - unknown volume type",