win-pvdrivers

changeset 101:bbc88927c82b

prefast complained about excessive stack usage, so change max printf to 512; check status when creating threads (prefast)e
author Andy Grover <andy.grover@oracle.com>
date Mon Jan 07 19:29:28 2008 -0800 (2008-01-07)
parents 57ec1a11de8e
children a1db6a819d41
files xenpci/xenbus.c
line diff
     1.1 --- a/xenpci/xenbus.c	Mon Jan 07 19:28:24 2008 -0800
     1.2 +++ b/xenpci/xenbus.c	Mon Jan 07 19:29:28 2008 -0800
     1.3 @@ -316,10 +316,20 @@ XenBus_Init(WDFDEVICE Device)
     1.4    //InitializeObjectAttributes(&oa, NULL, OBJ_KERNEL_HANDLE, NULL, NULL);
     1.5    //Status = PsCreateSystemThread(&XenBus_ReadThreadHandle, THREAD_ALL_ACCESS, &oa, NULL, NULL, XenBus_ReadThreadProc, NULL);
     1.6    Status = PsCreateSystemThread(&xpdd->XenBus_ReadThreadHandle, THREAD_ALL_ACCESS, NULL, NULL, NULL, XenBus_ReadThreadProc, Device);
     1.7 +  if (!NT_SUCCESS(Status))
     1.8 +  {
     1.9 +    KdPrint((__DRIVER_NAME " Could not start read thread\n"));
    1.10 +    return STATUS_UNSUCCESSFUL;
    1.11 +  }
    1.12  
    1.13    //InitializeObjectAttributes(&oa, NULL, OBJ_KERNEL_HANDLE, NULL, NULL);
    1.14    //Status = PsCreateSystemThread(&XenBus_WatchThreadHandle, THREAD_ALL_ACCESS, &oa, NULL, NULL, XenBus_WatchThreadProc, NULL);
    1.15    Status = PsCreateSystemThread(&xpdd->XenBus_WatchThreadHandle, THREAD_ALL_ACCESS, NULL, NULL, NULL, XenBus_WatchThreadProc, Device);
    1.16 +  if (!NT_SUCCESS(Status))
    1.17 +  {
    1.18 +    KdPrint((__DRIVER_NAME " Could not start watch thread\n"));
    1.19 +    return STATUS_UNSUCCESSFUL;
    1.20 +  }
    1.21  
    1.22    KdPrint((__DRIVER_NAME " <-- " __FUNCTION__ "\n"));
    1.23  
    1.24 @@ -780,7 +790,7 @@ XenBus_Printf(
    1.25  {
    1.26    WDFDEVICE Device = Context;
    1.27    va_list ap;
    1.28 -  char buf[1024];
    1.29 +  char buf[512];
    1.30    char *retval;
    1.31  
    1.32    KdPrint((__DRIVER_NAME " --> " __FUNCTION__ "\n"));