VolListOneVolume(struct rx_call *acid, afs_int32 partid,
afs_uint32 volumeId, volEntries *volumeInfo)
{
- volintInfo *pntr;
struct DiskPartition64 *partP;
char pname[9], volname[20];
DIR *dirp;
return ENOMEM;
memset(volumeInfo->volEntries_val, 0, sizeof(volintInfo)); /* Clear structure */
- pntr = volumeInfo->volEntries_val;
volumeInfo->volEntries_len = 1;
if (GetPartName(partid, pname))
return VOLSERILLEGAL_PARTITION;
afs_uint32 a_volID, volXEntries *a_volumeXInfoP)
{ /*SAFSVolXListOneVolume */
- volintXInfo *xInfoP; /*Ptr to the extended vol info */
struct DiskPartition64 *partP; /*Ptr to partition */
char pname[9], volname[20]; /*Partition, volume names */
DIR *dirp; /*Partition directory ptr */
return ENOMEM;
memset(a_volumeXInfoP->volXEntries_val, 0, sizeof(volintXInfo)); /* Clear structure */
- xInfoP = a_volumeXInfoP->volXEntries_val;
a_volumeXInfoP->volXEntries_len = 1;
code = ENODEV;
break;
default:
{
-
- afs_int32 offset;
-
initialize_KA_error_table();
initialize_RXK_error_table();
initialize_KTC_error_table();
initialize_CMD_error_table();
initialize_VL_error_table();
- offset = errcode & ((1 << ERRCODE_RANGE) - 1);
fprintf(STDERR, "%s: %s\n", afs_error_table_name(errcode),
afs_error_message(errcode));
break;
struct volser_status tstatus;
struct destServer destination;
struct nvldbentry entry, newentry, storeEntry;
- int islocked;
afs_int32 error;
afs_int32 tmp;
afs_uint32 tmpVol;
- int justclone = 0;
- islocked = 0;
fromconn = (struct rx_connection *)0;
toconn = (struct rx_connection *)0;
fromtid = 0;
fromconn = UV_Bind(afromserver, AFSCONF_VOLUMEPORT);
fromtid = totid = 0; /* initialize to uncreated */
-
- /* check if we can shortcut and use a local clone instead of a full copy */
- if (afromserver == atoserver && afrompart == atopart) {
- justclone = 1;
- }
-
/* ***
* clone the read/write volume locally.
* ***/
manyResults results;
int rwindex, roindex, roclone, roexists;
afs_uint32 rwcrdate = 0;
- afs_uint32 rwupdate, clcrdate;
+ afs_uint32 clcrdate;
struct rtime {
int validtime;
afs_uint32 uptime;
ONERROR(code, afromvol,
"Failed to get the status of RW volume %u\n");
rwcrdate = volstatus.creationDate;
- rwupdate = volstatus.updateDate;
/* End transaction on RW */
code = AFSVolEndTrans(fromconn, fromtid, &rcode);
"Failed to get the status of the RW volume %u\n");
VDONE;
rwcrdate = volstatus.creationDate;
- rwupdate = volstatus.updateDate;
/* End the transaction on the RW volume */
VPRINT1("Ending cloning transaction on RW volume %u...", afromvol);
{
afs_int32 vcode;
struct nvldbentry entry, storeEntry;
- int islocked;
vcode = ubik_VL_SetLock(cstruct, 0, volid, RWVOL, VLOP_ADDSITE);
if (vcode) {
PrintError("", vcode);
return (vcode);
}
- islocked = 1;
vcode = VLDB_GetEntryByID(volid, RWVOL, &entry);
if (vcode) {
fprintf(STDERR,
afs_int32 code, error = 0;
struct nvldbentry entry, storeEntry;
char pname[10];
- int pass = 0, islocked = 0, createentry, addvolume, modified, mod, doit = 1;
+ int pass = 0, createentry, addvolume, modified, mod, doit = 1;
afs_uint32 rwvolid;
char hoststr[16];
(unsigned long)rwvolid);
ERROR_EXIT(code);
}
- islocked = 1;
}
createentry = 0; /* Do we need to create a VLDB entry */