[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] Reduce log spam


  • To: <win-pv-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Owen Smith <owen.smith@xxxxxxxxxx>
  • Date: Thu, 21 Apr 2022 13:29:45 +0100
  • Authentication-results: esa6.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
  • Cc: Owen Smith <owen.smith@xxxxxxxxxx>
  • Delivery-date: Thu, 21 Apr 2022 12:30:11 +0000
  • Ironport-data: A9a23:4OWTKK7pZiVmQzTnx8TnYQxRtGTHchMFZxGqfqrLsTDasY5as4F+v mtOXW2EMvvcMTT3c4wiYdngoUMHupaDz9BnGQNt/ihjHi5G8cbLO4+Ufxz6V8+wwmwvb67FA +E2MISowBUcFyeEzvuVGuG96yE6j8lkf5KkYAL+EnkZqTRMFWFw0XqPp8Zj2tQy2YTjWlvU0 T/Pi5a31GGNimYc3l08s8pvmDs31BglkGpF1rCWTakjUG72zxH5PrpGTU2CByKQrr1vNvy7X 47+IISRpQs1yfuP5uSNyd4XemVSKlLb0JPnZnB+A8BOiTAazsA+PzpS2FPxpi67hh3Q9+2dx umhurS2SjUkF6rugN8lSiZ2SxBuBYd0+qLIdC3XXcy7lyUqclPpyvRqSko3IZcZ6qB8BmQmG f4wcW5XKErZ3qTvnez9GrIEascLdaEHOKsYpXxmiyrcDOomaZvCX7/L9ZlT2zJYasVmQ6eCO JpGN2IHgBLoYzNdJHA8EpICusinj0amWjBxogmnnP9ii4TU5FMoi+W8WDbPQfSVRMMQhljdq m/Y8mDRBhABKMfZ2TeD6mirhOLEgWX8Qo16KVGj3qc02hvJnDVVUUBIEwvgyRWktqKgc9RcG UE9/Qg2lpAry2Lzf8nFdS+6vXHR63bwROFsO+E97QiMzI/d7ACYGnUIQ1Z9VTA2iCMlbWd0j wHUxrsFERQq6eTIEizFqt94uBvoYUAowXk+iTjopOfvy/3qu8kNgx3GVb6P+4bl34SuSVkcL 91nxRXSZon/b+ZWj81XHnid2lpAQ6QlqSZvuG3qspqNtF8RWWJcT9XABaLnxfhBNp2FaVKKo WIJncOThMhXU8zVyHTXHLpSRuH1jxpgDNE6qQc+d3XG327zk0NPgKgKuG0uTKuXGppslcDVj L/75loKuc470IqCZq5reYOhY/nGPoC7fekJosv8N4IUCrAoLVfv1Hg3OSa4gjC8+GBxwPpXE crKLq6R4YMyVP0PIMyeHLxGj9fGB0kWmAvueHwM50n5gefGOC7JGN/o8jKmN4gE0U9Nmy2Nm /43CidA40w3vDHWCsUPzbMuEA==
  • Ironport-hdrordr: A9a23:sTid2aMSW+UlY8BcTs2jsMiBIKoaSvp037Eqv3oedfUzSL39qy nOpoV86faaslYssR0b9exoW5PwJE80l6QFgrX5VI3KNGKN1VdARLsSircKqAeAJ8SRzIFgPN 9bAspDNOE=
  • List-id: Developer list for the Windows PV Drivers subproject <win-pv-devel.lists.xenproject.org>

Squash errors generated by IoctlDirectory returning no sub-paths
Reduce logging level in ThreadCreate

Signed-off-by: Owen Smith <owen.smith@xxxxxxxxxx>
---
 src/xeniface/ioctl_store.c | 25 +++++++++++++++++--------
 src/xeniface/thread.c      |  2 +-
 2 files changed, 18 insertions(+), 9 deletions(-)

diff --git a/src/xeniface/ioctl_store.c b/src/xeniface/ioctl_store.c
index 9116e82..97062df 100644
--- a/src/xeniface/ioctl_store.c
+++ b/src/xeniface/ioctl_store.c
@@ -218,6 +218,7 @@ IoctlStoreDirectory(
     PCHAR       Value;
     ULONG       Length;
     ULONG       Count;
+    BOOLEAN     SquashError = FALSE;
 
     status = STATUS_INVALID_BUFFER_SIZE;
     if (InLen == 0)
@@ -228,14 +229,17 @@ IoctlStoreDirectory(
         goto fail2;
 
     status = XENBUS_STORE(Directory, &Fdo->StoreInterface, NULL, NULL, Buffer, 
&Value);
-    if (!NT_SUCCESS(status))
+    if (!NT_SUCCESS(status)) {
+        if (status == STATUS_OBJECT_NAME_NOT_FOUND)
+            SquashError = TRUE;
         goto fail3;
+    }
 
     Length = __MultiSzLen(Value, &Count) + 1;
 
     status = STATUS_BUFFER_OVERFLOW;
     if (OutLen == 0) {
-        Trace("(\"%s\")=(%d)(%d)\n", Buffer, Length, Count);
+        Trace("(\"%s\")=(%d bytes)(%d items)\n", Buffer, Length, Count);
         goto done;
     }
 
@@ -243,7 +247,7 @@ IoctlStoreDirectory(
     if (OutLen < Length)
         goto fail4;
 
-    Info("(\"%s\")=(%d)(%d)\n", Buffer, Length, Count);
+    Trace("(\"%s\")=(%d bytes)(%d items)\n", Buffer, Length, Count);
 #if DBG
     __DisplayMultiSz(Value);
 #endif
@@ -262,11 +266,14 @@ fail4:
     Error("Fail4 (\"%s\")=(%d < %d)\n", Buffer, OutLen, Length);
     XENBUS_STORE(Free, &Fdo->StoreInterface, Value);
 fail3:
-    Error("Fail3 (\"%s\")\n", Buffer);
+    if (!SquashError)
+        Error("Fail3 (\"%s\")\n", Buffer);
 fail2:
-    Error("Fail2\n");
+    if (!SquashError)
+        Error("Fail2\n");
 fail1:
-    Error("Fail1 (%08x)\n", status);
+    if (!SquashError)
+        Error("Fail1 (%08x)\n", status);
     return status;
 }
 
@@ -310,7 +317,7 @@ PXENBUS_STORE_PERMISSION
 __ConvertPermissions(
     __in  ULONG                       NumberPermissions,
     __in  PXENIFACE_STORE_PERMISSION  XenifacePermissions
-)
+    )
 {
     PXENBUS_STORE_PERMISSION          XenbusPermissions;
     ULONG                             Index;
@@ -411,7 +418,9 @@ IoctlStoreSetPermissions(
 
     for (Index = 0; Index < In->NumberPermissions; Index++) {
         Trace("> %lu: Domain %d, Mask 0x%x\n",
-                           Index, Permissions[Index].Domain, 
Permissions[Index].Mask);
+              Index,
+              Permissions[Index].Domain,
+              Permissions[Index].Mask);
     }
 
     status = XENBUS_STORE(PermissionsSet,
diff --git a/src/xeniface/thread.c b/src/xeniface/thread.c
index 4a5d425..4d767a0 100644
--- a/src/xeniface/thread.c
+++ b/src/xeniface/thread.c
@@ -130,7 +130,7 @@ ThreadCreate(
 
     (*Thread) = __ThreadAllocate(sizeof (XENIFACE_THREAD));
 
-    Warning("Create thread %p %p\n", Function, Thread);
+    Trace("Create thread %p %p\n", Function, Thread);
 
     status = STATUS_NO_MEMORY;
     if (*Thread == NULL)
-- 
2.32.0.windows.1




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.