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>
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>
33 /* ********************************************************************* */
34 /* Volserver routines */
35 /* ********************************************************************* */
38 bc_GetEntryByID(uclient, volID, volType, vldbEntryPtr)
39 struct ubik_client *uclient;
42 struct vldbentry *vldbEntryPtr;
47 ubik_VL_GetEntryByID(uclient, 0, volID, volType, vldbEntryPtr);
52 * Determine the time stamp to be recorded with the backup of this
53 * volume. For backup and r/o volumes this is the clone time, for
54 * r/w volumes, this is the current time. This timestamp is stored
55 * directly into the cloneDate field of the bc_volumeDump structure
58 * -1 - failed to get information. Sets cloneDate to 0.
62 volImageTime(serv, part, volid, voltype, clDatePtr)
70 struct volintInfo *viptr;
72 if (voltype == RWVOL) {
77 code = UV_ListOneVolume(htonl(serv), part, volid, &viptr);
80 "Warning: Can't get clone time of volume %u - using 0",
86 /* volume types from vol/voldefs.h */
87 switch (viptr->type) {
89 /* For a r/w volume there may not be any foolproof way of
90 * preventing anomalies in the backups. Use the current time;
97 *clDatePtr = viptr->creationDate; /* use the creation time */
102 "Can't get clone time of volume %u - unknown volume type",