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 <afs/param.h>
11 #include <afsconfig.h>
15 #include <sys/types.h>
20 #include <sys/socket.h>
21 #include <netinet/in.h>
25 #include <afs/vlserver.h> /*Misc server-side Volume Location stuff*/
29 #include <afs/volint.h>
31 extern int VL_GetEntryByID();
34 /* ********************************************************************* */
35 /* Volserver routines */
36 /* ********************************************************************* */
38 afs_int32 bc_GetEntryByID(uclient, volID, volType, vldbEntryPtr)
39 struct ubik_client *uclient;
42 struct vldbentry *vldbEntryPtr;
46 code = ubik_Call(VL_GetEntryByID, uclient, 0, volID, volType, vldbEntryPtr);
51 * Determine the time stamp to be recorded with the backup of this
52 * volume. For backup and r/o volumes this is the clone time, for
53 * r/w volumes, this is the current time. This timestamp is stored
54 * directly into the cloneDate field of the bc_volumeDump structure
57 * -1 - failed to get information. Sets cloneDate to 0.
61 volImageTime (serv, part, volid, voltype, clDatePtr)
69 struct volintInfo *viptr;
77 code = UV_ListOneVolume(htonl(serv), part, volid, &viptr);
81 "Warning: Can't get clone time of volume %u - using 0", volid);
86 /* volume types from vol/voldefs.h */
87 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", volid);