win-pvdrivers

changeset 100:57ec1a11de8e

xenenum: systemstartoptions was getting truncated (I have a lot) so extend
author Andy Grover <andy.grover@oracle.com>
date Mon Jan 07 19:28:24 2008 -0800 (2008-01-07)
parents ca121c57a360
children bbc88927c82b
files xenenum/xenenum.c
line diff
     1.1 --- a/xenenum/xenenum.c	Mon Jan 07 23:55:36 2008 +1100
     1.2 +++ b/xenenum/xenenum.c	Mon Jan 07 19:28:24 2008 -0800
     1.3 @@ -57,8 +57,8 @@ DriverEntry(PDRIVER_OBJECT DriverObject,
     1.4    UNICODE_STRING RegValueName;
     1.5    HANDLE RegHandle;
     1.6    OBJECT_ATTRIBUTES RegObjectAttributes;
     1.7 -  char Buf[200];
     1.8 -  ULONG BufLen = 200;
     1.9 +  char Buf[300];
    1.10 +  ULONG BufLen;
    1.11    PKEY_VALUE_PARTIAL_INFORMATION KeyPartialValue;
    1.12    int State = 0;
    1.13    int StartPos = 0;
    1.14 @@ -89,7 +89,8 @@ DriverEntry(PDRIVER_OBJECT DriverObject,
    1.15    }
    1.16  
    1.17    RtlInitUnicodeString(&RegValueName, L"SystemStartOptions");
    1.18 -  status = ZwQueryValueKey(RegHandle, &RegValueName, KeyValuePartialInformation, Buf, BufLen, &BufLen);
    1.19 +  status = ZwQueryValueKey(RegHandle, &RegValueName, KeyValuePartialInformation,
    1.20 +    Buf, ARRAY_SIZE(Buf), &BufLen);
    1.21    if(!NT_SUCCESS(status))
    1.22    {
    1.23      KdPrint((__DRIVER_NAME "     ZwQueryKeyValue returned %08x\n", status));