vol-additional-logging-20030513
authorNathan Neulinger <nneul@umr.edu>
Wed, 14 May 2003 15:54:53 +0000 (15:54 +0000)
committerDerrick Brashear <shadow@dementia.org>
Wed, 14 May 2003 15:54:53 +0000 (15:54 +0000)
FIXES 1387

additional logging for attach/detach.

src/vol/volume.c

index ef3a3e5..fdd4426 100644 (file)
@@ -271,9 +271,10 @@ int VInitVolumePackage(ProgramType pt, int nLargeVnodes, int nSmallVnodes,
        /* Attach all the volumes in this partition */
        for (diskP = DiskPartitionList; diskP; diskP = diskP->next) {
            int nAttached = 0, nUnattached = 0;
+           Log("Partition %s: attaching volumes\n", diskP->name);
            dirp = opendir(VPartitionPath(diskP));
            assert(dirp);
-           while (dp = readdir(dirp)) {
+           while ((dp = readdir(dirp))) {
                char *p;
                p = strrchr(dp->d_name, '.');
                if (p != NULL && strcmp(p, VHDREXT) == 0) {
@@ -285,6 +286,9 @@ int VInitVolumePackage(ProgramType pt, int nLargeVnodes, int nSmallVnodes,
                    if (error == VOFFLINE)
                        Log("Volume %u stays offline (/vice/offline/%s exists)\n", 
                            VolumeNumber(dp->d_name), dp->d_name);
+                   else 
+                       Log("Partition %s: attached volume %u (%s)\n", diskP->name, 
+                           VolumeNumber(dp->d_name), dp->d_name);
                    if (vp) {
                        VPutVolume(vp);
                    }