win-pvdrivers

changeset 356:429f282ecbb3

correct all line terminations to CRLF
author Andy Grover <andy.grover@oracle.com>
date Wed Jul 02 11:35:37 2008 -0700 (2008-07-02)
parents 47f67a52a66f
children 25166765975f
files xenpci/hypercall_x86_mingw.h xenpci/mingw_extras.c xenpci/mingw_extras.h xenpci/xenpci.inx
line diff
     1.1 --- a/xenpci/hypercall_x86_mingw.h	Wed Jul 02 11:34:11 2008 -0700
     1.2 +++ b/xenpci/hypercall_x86_mingw.h	Wed Jul 02 11:35:37 2008 -0700
     1.3 @@ -22,13 +22,13 @@
     1.4  
     1.5  #define __STR(x) #x
     1.6  #define STR(x) __STR(x)
     1.7 -
     1.8 -#if 0
     1.9 +
    1.10 +#if 0
    1.11  #define HYPERCALL_STR(name)                                     \
    1.12  	"mov $stub_addr,%%eax; "                                      \
    1.13  	"add $("STR(__HYPERVISOR_##name)" * 32),%%eax; "              \
    1.14  	"call *%%eax"
    1.15 -#endif
    1.16 +#endif
    1.17  
    1.18  #define HYPERCALL_STR(name)                                     \
    1.19  	"mov %3,%%eax; "                                      \
    1.20 @@ -45,7 +45,7 @@
    1.21      : "memory" );                                               \
    1.22    (type)__res;                                                  \
    1.23  })
    1.24 -
    1.25 +
    1.26  static __inline void __cpuid(uint32_t output[4], uint32_t op)
    1.27  {
    1.28    __asm__("cpuid"
    1.29 @@ -77,8 +77,8 @@ static __inline int
    1.30  HYPERVISOR_sched_op(PXENPCI_DEVICE_DATA xpdd, int cmd, void *arg)
    1.31  {
    1.32    return _hypercall2(int, sched_op, cmd, arg);
    1.33 -}
    1.34 -
    1.35 +}
    1.36 +
    1.37  static __inline int
    1.38  HYPERVISOR_hvm_op(PXENPCI_DEVICE_DATA xpdd, int op, struct xen_hvm_param *arg)
    1.39  {
    1.40 @@ -90,4 +90,4 @@ HYPERVISOR_event_channel_op(PXENPCI_DEVI
    1.41  {
    1.42  	return _hypercall2(int, event_channel_op, cmd, arg);
    1.43  }
    1.44 -
    1.45 +
     2.1 --- a/xenpci/mingw_extras.c	Wed Jul 02 11:34:11 2008 -0700
     2.2 +++ b/xenpci/mingw_extras.c	Wed Jul 02 11:35:37 2008 -0700
     2.3 @@ -15,35 +15,35 @@ RtlStringCbPrintfW(
     2.4    size_t dest_size,
     2.5    win_wchar_t *format,
     2.6    ...)
     2.7 -{
     2.8 +{
     2.9    va_list args;
    2.10 -  int len;
    2.11 -  int i;
    2.12 -  char tmp_buf[512];
    2.13 -  NTSTATUS status = STATUS_SUCCESS;
    2.14 -
    2.15 -  if (dest_size > sizeof(tmp_buf))
    2.16 -    dest_size = sizeof(tmp_buf);
    2.17 -
    2.18 -  /* we don't have a 2-byte version of vsnprintf, so write it to a single-byte
    2.19 -     array using vsnprintf() and then copy result to the wchar buffer.
    2.20 -     This should be seldom executed, so this inefficiency should be ok. */
    2.21 +  int len;
    2.22 +  int i;
    2.23 +  char tmp_buf[512];
    2.24 +  NTSTATUS status = STATUS_SUCCESS;
    2.25 +
    2.26 +  if (dest_size > sizeof(tmp_buf))
    2.27 +    dest_size = sizeof(tmp_buf);
    2.28 +
    2.29 +  /* we don't have a 2-byte version of vsnprintf, so write it to a single-byte
    2.30 +     array using vsnprintf() and then copy result to the wchar buffer.
    2.31 +     This should be seldom executed, so this inefficiency should be ok. */
    2.32    va_start(args, format);
    2.33    len = vsnprintf(tmp_buf, sizeof(tmp_buf), (char *)format, args);
    2.34 -  va_end(args);
    2.35 -
    2.36 -  if (len >= (dest_size * sizeof(win_wchar_t))) {
    2.37 -    /* output buffer truncated */
    2.38 -    status = STATUS_BUFFER_OVERFLOW;
    2.39 -    tmp_buf[sizeof(tmp_buf)-1] = '\0';
    2.40 -  }
    2.41 -
    2.42 -  /* copy byte-string to short_string, incl NULL */
    2.43 -  for (i = 0; i < (len + 1); i++)
    2.44 -  {
    2.45 -    dest_str[i] = tmp_buf[i];
    2.46 -  }
    2.47 -
    2.48 +  va_end(args);
    2.49 +
    2.50 +  if (len >= (dest_size * sizeof(win_wchar_t))) {
    2.51 +    /* output buffer truncated */
    2.52 +    status = STATUS_BUFFER_OVERFLOW;
    2.53 +    tmp_buf[sizeof(tmp_buf)-1] = '\0';
    2.54 +  }
    2.55 +
    2.56 +  /* copy byte-string to short_string, incl NULL */
    2.57 +  for (i = 0; i < (len + 1); i++)
    2.58 +  {
    2.59 +    dest_str[i] = tmp_buf[i];
    2.60 +  }
    2.61 +
    2.62    return status;
    2.63  }
    2.64  
     3.1 --- a/xenpci/mingw_extras.h	Wed Jul 02 11:34:11 2008 -0700
     3.2 +++ b/xenpci/mingw_extras.h	Wed Jul 02 11:35:37 2008 -0700
     3.3 @@ -6,27 +6,27 @@
     3.4  #undef KeGetCurrentProcessorNumber
     3.5  #define KeGetCurrentProcessorNumber() \
     3.6    ((ULONG)KeGetCurrentKPCR()->Number)
     3.7 -
     3.8 -/* mingw-runtime 3.13 is buggy #2 */
     3.9 -#undef KeRaiseIrql
    3.10 -#undef KeLowerIrql
    3.11 -
    3.12 -NTOSAPI
    3.13 -VOID
    3.14 -DDKAPI
    3.15 -KeRaiseIrql(IN KIRQL new_irql, OUT PKIRQL old_irql);
    3.16 -
    3.17 -NTOSAPI
    3.18 -VOID
    3.19 -DDKAPI
    3.20 -KeLowerIrql(IN KIRQL irql);
    3.21 -
    3.22 -extern NTOSAPI CCHAR KeNumberProcessors;
    3.23 -
    3.24 -NTOSAPI
    3.25 -VOID
    3.26 -DDKAPI
    3.27 -KeFlushQueuedDpcs(VOID);
    3.28 +
    3.29 +/* mingw-runtime 3.13 is buggy #2 */
    3.30 +#undef KeRaiseIrql
    3.31 +#undef KeLowerIrql
    3.32 +
    3.33 +NTOSAPI
    3.34 +VOID
    3.35 +DDKAPI
    3.36 +KeRaiseIrql(IN KIRQL new_irql, OUT PKIRQL old_irql);
    3.37 +
    3.38 +NTOSAPI
    3.39 +VOID
    3.40 +DDKAPI
    3.41 +KeLowerIrql(IN KIRQL irql);
    3.42 +
    3.43 +extern NTOSAPI CCHAR KeNumberProcessors;
    3.44 +
    3.45 +NTOSAPI
    3.46 +VOID
    3.47 +DDKAPI
    3.48 +KeFlushQueuedDpcs(VOID);
    3.49  
    3.50  #define RtlStringCbCopyA(dst, dst_len, src) strncpy(dst, src, dst_len)
    3.51  #define RtlStringCbPrintfA(args...) snprintf(args)
     4.1 --- a/xenpci/xenpci.inx	Wed Jul 02 11:34:11 2008 -0700
     4.2 +++ b/xenpci/xenpci.inx	Wed Jul 02 11:35:37 2008 -0700
     4.3 @@ -55,7 +55,7 @@ ServiceType    = 1
     4.4  StartType      = 0
     4.5  ErrorControl   = 1
     4.6  LoadOrderGroup = System Bus Extender
     4.7 -ServiceBinary  = %12%\xenpci.sys
     4.8 +ServiceBinary  = %12%\xenpci.sys
     4.9  AddReg         = XenPCI_Service_AddReg
    4.10  
    4.11  [XenHide_Service]
    4.12 @@ -69,9 +69,9 @@ AddReg         = XenHide_Service_AddReg
    4.13  
    4.14  [XenHide_Service_AddReg]
    4.15  HKLM,SYSTEM\CurrentControlSet\Control\Class\{4D36E97D-E325-11CE-BFC1-08002BE10318},UpperFilters,0x00010008,XenHide
    4.16 -
    4.17 -[XenPCI_Service_AddReg]
    4.18 -HKR,,Security,,"D:P(A;;GA;;;SY)(A;;GA;;;BA)"   ; SDDL_DEVOBJ_SYS_ALL_ADM_ALL
    4.19 +
    4.20 +[XenPCI_Service_AddReg]
    4.21 +HKR,,Security,,"D:P(A;;GA;;;SY)(A;;GA;;;BA)"   ; SDDL_DEVOBJ_SYS_ALL_ADM_ALL
    4.22  
    4.23  [Strings]
    4.24  XenGplPv = "Xen GPL PV Driver Developers"