vol-extra-logging-on-attach-detach-20030623

FIXES 1387

add extra logging, revert in cases where you don't have log level turned up
This commit is contained in:
Nathan Neulinger 2003-06-23 17:04:29 +00:00 committed by Derrick Brashear
parent e2507583d5
commit 725db719ee

View File

@ -285,9 +285,10 @@ int VInitVolumePackage(ProgramType pt, int nLargeVnodes, int nSmallVnodes,
if (error == VOFFLINE)
Log("Volume %d stays offline (/vice/offline/%s exists)\n",
VolumeNumber(dp->d_name), dp->d_name);
else
else if (LogLevel >= 5) {
Log("Partition %s: attached volume %d (%s)\n", diskP->name,
VolumeNumber(dp->d_name), dp->d_name);
}
if (vp) {
VPutVolume(vp);
}
@ -359,6 +360,8 @@ void VShutdown_r(void)
/* otherwise we go around again, trying another volume */
}
while(vp) {
if (LogLevel >= 5)
Log("VShutdown: Attempting to take volume %u offline.\n", vp->hashid);
/* first compute np before releasing vp, in case vp disappears
* after releasing. Hold it, so it doesn't disapear. If we
* can't hold it, try the next one in the chain. Invariant