From 725db719eee937cff6f764289b822fc428d5b0d5 Mon Sep 17 00:00:00 2001 From: Nathan Neulinger Date: Mon, 23 Jun 2003 17:04:29 +0000 Subject: [PATCH] vol-extra-logging-on-attach-detach-20030623 FIXES 1387 add extra logging, revert in cases where you don't have log level turned up --- src/vol/volume.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/vol/volume.c b/src/vol/volume.c index ffcc645..d585af1 100644 --- a/src/vol/volume.c +++ b/src/vol/volume.c @@ -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 -- 1.9.4