Cleanup VOffline log message
authorAndrew Deason <adeason@sinenomine.net>
Wed, 4 Nov 2009 03:22:50 +0000 (21:22 -0600)
committerDerrick Brashear <shadow|account-1000005@unknown>
Thu, 5 Nov 2009 16:01:39 +0000 (08:01 -0800)
Make the 'Volume X (Y) is now offline' messages appear more sanely in
the log; logging as one line at once.

Change-Id: I8a3cf986fb30e292e509237357bd1039f2f181b9
Reviewed-on: http://gerrit.openafs.org/782
Tested-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

src/vol/volume.c

index 313cb42..4c4f007 100644 (file)
@@ -3712,11 +3712,14 @@ VCheckOffline(register Volume * vp)
        VCloseVolumeHandles_r(vp);
 
        if (LogLevel) {
-           Log("VOffline: Volume %u (%s) is now offline", V_id(vp),
-               V_name(vp));
-           if (V_offlineMessage(vp)[0])
-               Log(" (%s)", V_offlineMessage(vp));
-           Log("\n");
+           if (V_offlineMessage(vp)[0]) {
+               Log("VOffline: Volume %lu (%s) is now offline (%s)\n",
+                   afs_printable_uint32_lu(V_id(vp)), V_name(vp),
+                   V_offlineMessage(vp));
+           } else {
+               Log("VOffline: Volume %lu (%s) is now offline\n",
+                   afs_printable_uint32_lu(V_id(vp)), V_name(vp));
+           }
        }
 
        /* invalidate the volume header cache entry */