[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH] Add log to Xenfilt DriverAddDevice
On 07/07/2021 09:54, Martin Harvey wrote: From: Owen Smith <owen.smith@xxxxxxxxxx> Log all calls to DriverAddDevice, and the type of the device if possible Any particular reason existent logging is insufficient? I think we need more justification here. Paul Signed-off-by: Owen Smith <owen.smith@xxxxxxxxxx> --- src/xenfilt/driver.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/xenfilt/driver.c b/src/xenfilt/driver.c index 8f14ec8..2c9b54e 100644 --- a/src/xenfilt/driver.c +++ b/src/xenfilt/driver.c @@ -724,6 +724,19 @@ fail1: return status; }+static FORCEINLINE PCHAR+__EmulatedTypeName( + IN XENFILT_EMULATED_OBJECT_TYPE Type + ) +{ + switch (Type) { + case XENFILT_EMULATED_OBJECT_TYPE_UNKNOWN: return "UNKNOWN"; + case XENFILT_EMULATED_OBJECT_TYPE_PCI: return "PCI"; + case XENFILT_EMULATED_OBJECT_TYPE_IDE: return "IDE"; + default: return "InvalidType"; + } +} + static XENFILT_EMULATED_OBJECT_TYPE DriverGetEmulatedType( IN PCHAR Id @@ -805,6 +818,10 @@ DriverAddDevice( } }+ Info("%p %s\n",+ PhysicalDeviceObject, + __EmulatedTypeName(Type)); + status = STATUS_SUCCESS; if (Type == XENFILT_EMULATED_OBJECT_TYPE_UNKNOWN) goto done;
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |