Alex Ionescu | 11 Feb 00:58 2016
Picon

Re: [ros-diffs] [hbelusca] 70707: [CMLIB]: Implement CmpFreeSecurityDescriptor. See r70609. CORE-10793 CORE-10796

On Wed, Feb 10, 2016 at 5:28 PM,  <hbelusca@...> wrote:
> else // if (SecurityData->ReferenceCount <= 1)

Is the intent to free the data while SecurityData->RefCount will remain at 1?!

Best regards,
Alex Ionescu
James Tabor | 3 Feb 17:59 2016
Picon

[ros-diffs] [jimtabor] 70685: [User32] - Patch by Manuel : Explorer not draw (16 bits) icons. See CORE-10789.

Hello,
Apologies to Carlo Bramini, I listed the wrong author of the patch.
James
_______________________________________________
Ros-dev mailing list
Ros-dev@...
http://www.reactos.org/mailman/listinfo/ros-dev
Alex Ionescu | 2 Feb 06:37 2016
Picon

Re: [ros-diffs] [hbelusca] 70674: [CMLIB]: Demote the DPRINT1 saying that we leak the security block descriptor to a DPRINT. People (Alex & me) working on cmlib already know this. "Fixes" timeout problems of the t...

I think you guys took more time to debug and mess with the DPRINT then
it would've taken to implement the function. Come on guys.
Best regards,
Alex Ionescu

On Mon, Feb 1, 2016 at 3:10 PM,  <hbelusca@...> wrote:
> Author: hbelusca
> Date: Mon Feb  1 23:10:38 2016
> New Revision: 70674
>
> URL: http://svn.reactos.org/svn/reactos?rev=70674&view=rev
> Log:
> [CMLIB]: Demote the DPRINT1 saying that we leak the security block descriptor to a DPRINT. People (Alex &
me) working on cmlib already know this. "Fixes" timeout problems of the testbots due to spamming this dprint.
>
> Modified:
>     trunk/reactos/lib/cmlib/cmkeydel.c
>
> Modified: trunk/reactos/lib/cmlib/cmkeydel.c
> URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/cmlib/cmkeydel.c?rev=70674&r1=70673&r2=70674&view=diff
> ==============================================================================
> --- trunk/reactos/lib/cmlib/cmkeydel.c  [iso-8859-1] (original)
> +++ trunk/reactos/lib/cmlib/cmkeydel.c  [iso-8859-1] Mon Feb  1 23:10:38 2016
>  <at>  <at>  -215,7 +215,7  <at>  <at> 
>      }
>
>      /* FIXME: This leaks the security desriptor! */
> -    DPRINT1("Potentially leaking key security descriptor. Please call CmpFreeSecurityDescriptor\n");
> +    DPRINT("Potentially leaking key security descriptor. Please call CmpFreeSecurityDescriptor\n");
>
>      /* Free the key body itself, and then return our status */
>      if (!CmpFreeKeyBody(Hive, Cell)) return STATUS_INSUFFICIENT_RESOURCES;
>
>
Love Nystrom | 30 Jan 20:38 2016
Picon

Re: [BOOTLIB]: Cleanup, less magic.


On 2016-01-24 19.00, ros-dev-request@... wrote:
> +        if (Length != Length) 

Now that's what we call an unlikely condition :-D
The CPU branch predictor will have no problem.
Magic indeed.. Hope it's not indicative..
L.
Timo Kreuzer | 23 Jan 17:41 2016
Picon

Re: [ros-diffs] [ion] 70633: [BOOTLIB]: Cleanup, less magic.

Am 21.01.2016 um 16:47 schrieb ion@...:
> Author: ion
> Date: Thu Jan 21 15:47:14 2016
> New Revision: 70633
>
> URL: http://svn.reactos.org/svn/reactos?rev=70633&view=rev
> Log:
> [BOOTLIB]: Cleanup, less magic.

Looks like you forgot to cleanup this special piece of extra magic.
> +        if (Length != Length)
> +        {
> +            PartialSum += (unsigned __int8)Buffer[Length];
> +            if (Flags & BL_UTL_CHECKSUM_COMPLEMENT)
> +            {
> +                PartialSum = (unsigned __int16)((PartialSum >> 16) + PartialSum);
> +            }
> +        }
> +

Attachment (smime.p7s): application/pkcs7-signature, 5008 bytes
_______________________________________________
Ros-dev mailing list
Ros-dev@...
http://www.reactos.org/mailman/listinfo/ros-dev
Timo Kreuzer | 6 Jan 23:41 2016
Picon

http://fs5.d...


For everyone who thinks this looks terrible: don't view it in your 
browser. Instead download it and open it with a proper image viewer. 
Then your eyes stop bleeding and it actually looks good :)

Timo

Am 06.01.2016 um 10:31 schrieb cfinck@...:
> Author: cfinck
> Date: Wed Jan  6 09:31:53 2016
> New Revision: 70507
>
> URL: http://svn.reactos.org/svn/reactos?rev=70507&view=rev
> Log:
> [BOOTVID]
> Change the Blue Screen Font hardcoded into bootvid.dll to the Open Source "Anonymous Pro" font, which
makes a nice 8x13 font.
> Blue Screens now look like this: http://fs5.directupload.net/images/160106/ehv6245t.png
>
> [BOOTVID_FONT_GENERATOR]
> In case you find an even better font, you now have a nice little tool to test that font and generate the
corresponding FontData array for bootvid.
>
> Added:
>      trunk/rosapps/applications/devutils/bootvid_font_generator/
>      trunk/rosapps/applications/devutils/bootvid_font_generator/CMakeLists.txt   (with props)
>      trunk/rosapps/applications/devutils/bootvid_font_generator/bootvid_font_generator.c   (with props)
> Modified:
>      trunk/reactos/drivers/base/bootvid/arm/bootdata.c
>      trunk/reactos/drivers/base/bootvid/i386/bootdata.c
>      trunk/rosapps/applications/devutils/CMakeLists.txt
>
> [This mail would be too long, it was shortened to contain the URLs only.]
>
> Modified: trunk/reactos/drivers/base/bootvid/arm/bootdata.c
> URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/base/bootvid/arm/bootdata.c?rev=70507&r1=70506&r2=70507&view=diff
>
> Modified: trunk/reactos/drivers/base/bootvid/i386/bootdata.c
> URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/base/bootvid/i386/bootdata.c?rev=70507&r1=70506&r2=70507&view=diff
>
> Modified: trunk/rosapps/applications/devutils/CMakeLists.txt
> URL: http://svn.reactos.org/svn/reactos/trunk/rosapps/applications/devutils/CMakeLists.txt?rev=70507&r1=70506&r2=70507&view=diff
>
> Added: trunk/rosapps/applications/devutils/bootvid_font_generator/CMakeLists.txt
> URL: http://svn.reactos.org/svn/reactos/trunk/rosapps/applications/devutils/bootvid_font_generator/CMakeLists.txt?rev=70507
>
> Added: trunk/rosapps/applications/devutils/bootvid_font_generator/bootvid_font_generator.c
> URL: http://svn.reactos.org/svn/reactos/trunk/rosapps/applications/devutils/bootvid_font_generator/bootvid_font_generator.c?rev=70507
>
>
>

Attachment (smime.p7s): application/pkcs7-signature, 5008 bytes
_______________________________________________
Ros-dev mailing list
Ros-dev@...
http://www.reactos.org/mailman/listinfo/ros-dev
Thomas Faber | 1 Jan 16:57 2016

Re: [ros-diffs] [tkreuzer] 70464: [WIN32K] Properly check the bitmap size in IntSetDIBits, taking into account that it might be set to 0, then we have to calculate it ourselves. Fixes a crash when invalid data is ...

Timo, this is causing testbot to freak out since it now crashes during
an apitest. Could you look into it?
Thanks.

On 2015-12-29 21:28, tkreuzer@... wrote:
> Author: tkreuzer
> Date: Tue Dec 29 20:28:23 2015
> New Revision: 70464
> 
> URL: http://svn.reactos.org/svn/reactos?rev=70464&view=rev
> Log:
> [WIN32K]
> Properly check the bitmap size in IntSetDIBits, taking into account that it might be set to 0, then we have
to calculate it ourselves. Fixes a crash when invalid data is passed to NtGdiCreateDIBitmapInternal.
> [GDI32]
> Convert COREINFOHEADER to BITMAPINFOHEADER before passing it to NtGdiCreateDIBitmapInternal, which
doesn't support it.
> CORE-10583 #resolve
> 
> Modified:
>     trunk/reactos/win32ss/gdi/gdi32/objects/bitmap.c
>     trunk/reactos/win32ss/gdi/ntgdi/dibobj.c
> 
> Modified: trunk/reactos/win32ss/gdi/gdi32/objects/bitmap.c
> URL: http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/gdi32/objects/bitmap.c?rev=70464&r1=70463&r2=70464&view=diff
> ==============================================================================
> --- trunk/reactos/win32ss/gdi/gdi32/objects/bitmap.c	[iso-8859-1] (original)
> +++ trunk/reactos/win32ss/gdi/gdi32/objects/bitmap.c	[iso-8859-1] Tue Dec 29 20:28:23 2015
>  <at>  <at>  -408,23 +408,30  <at>  <at> 
>  //  PDC_ATTR pDc_Attr;
>      UINT InfoSize = 0;
>      UINT cjBmpScanSize = 0;
> -    HBITMAP hBmp;
> +    HBITMAP hBmp = NULL;
>      NTSTATUS Status = STATUS_SUCCESS;
> +    PBITMAPINFO pbmiConverted;
> +    UINT cjInfoSize;
> +
> +    /* Convert the BITMAPINFO if it is a COREINFO */
> +    pbmiConverted = ConvertBitmapInfo(Data, ColorUse, &cjInfoSize, FALSE);
>  
>      /* Check for CBM_CREATDIB */
>      if (Init & CBM_CREATDIB)
>      {
>          /* CBM_CREATDIB needs Data. */
> -        if (!Data)
> -        {
> -            return 0;
> +        if (pbmiConverted == NULL)
> +        {
> +            DPRINT1("CBM_CREATDIB needs a BITMAINFO!\n");
> +            goto Exit;
>          }
>  
>          /* It only works with PAL or RGB */
>          if (ColorUse > DIB_PAL_COLORS)
>          {
> +            DPRINT1("Invalid ColorUse: %lu\n", ColorUse);
>              GdiSetLastError(ERROR_INVALID_PARAMETER);
> -            return 0;
> +            goto Exit;
>          }
>  
>          /* Use the header from the data */
>  <at>  <at>  -434,38 +441,48  <at>  <at> 
>      /* Header is required */
>      if (!Header)
>      {
> +        DPRINT1("Header is NULL\n");
>          GdiSetLastError(ERROR_INVALID_PARAMETER);
> -        return 0;
> +        goto Exit;
>      }
>  
>      /* Get the bitmap format and dimensions */
>      if (DIB_GetBitmapInfo(Header, &width, &height, &planes, &bpp, &compr, &dibsize) == -1)
>      {
> +        DPRINT1("DIB_GetBitmapInfo failed!\n");
>          GdiSetLastError(ERROR_INVALID_PARAMETER);
> -        return NULL;
> +        goto Exit;
>      }
>  
>      /* Check if the Compr is incompatible */
>      if ((compr == BI_JPEG) || (compr == BI_PNG) || (compr == BI_BITFIELDS))
> -        return 0;
> +    {
> +        DPRINT1("invalid compr: %lu!\n", compr);
> +        goto Exit;
> +    }
>  
>      /* Only DIB_RGB_COLORS (0), DIB_PAL_COLORS (1) and 2 are valid. */
>      if (ColorUse > DIB_PAL_COLORS + 1)
>      {
> +        DPRINT1("invalid compr: %lu!\n", compr);
>          GdiSetLastError(ERROR_INVALID_PARAMETER);
> -        return 0;
> +        goto Exit;
>      }
>  
>      /* If some Bits are given, only DIB_PAL_COLORS and DIB_RGB_COLORS are valid */
>      if (Bits && (ColorUse > DIB_PAL_COLORS))
>      {
> +        DPRINT1("Invalid ColorUse: %lu\n", ColorUse);
>          GdiSetLastError(ERROR_INVALID_PARAMETER);
> -        return 0;
> +        goto Exit;
>      }
>  
>      /* Negative width is not allowed */
>      if (width < 0)
> -        return 0;
> +    {
> +        DPRINT1("Negative width: %li\n", width);
> +        goto Exit;
> +    }
>  
>      /* Top-down DIBs have a negative height. */
>      height = abs(height);
>  <at>  <at>  -473,13 +490,13  <at>  <at> 
>  // For Icm support.
>  // GdiGetHandleUserData(hdc, GDI_OBJECT_TYPE_DC, (PVOID)&pDc_Attr))
>  
> -    if (Data)
> +    if (pbmiConverted)
>      {
>          _SEH2_TRY
>          {
> -            cjBmpScanSize = GdiGetBitmapBitsSize((BITMAPINFO *) Data);
> -            CalculateColorTableSize(&Data->bmiHeader, &ColorUse, &InfoSize);
> -            InfoSize += Data->bmiHeader.biSize;
> +            cjBmpScanSize = GdiGetBitmapBitsSize(pbmiConverted);
> +            CalculateColorTableSize(&pbmiConverted->bmiHeader, &ColorUse, &InfoSize);
> +            InfoSize += pbmiConverted->bmiHeader.biSize;
>          }
>          _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
>          {
>  <at>  <at>  -490,8 +507,9  <at>  <at> 
>  
>      if (!NT_SUCCESS(Status))
>      {
> +        DPRINT1("Got an exception!\n");
>          GdiSetLastError(ERROR_INVALID_PARAMETER);
> -        return NULL;
> +        goto Exit;
>      }
>  
>      DPRINT("pBMI %p, Size bpp %u, dibsize %d, Conv %u, BSS %u\n", Data, bpp, dibsize, InfoSize,
>  <at>  <at>  -501,9 +519,18  <at>  <at> 
>          hBmp = GetStockObject(DEFAULT_BITMAP);
>      else
>      {
> -        hBmp = NtGdiCreateDIBitmapInternal(hDC, width, height, Init, (LPBYTE) Bits,
> -            (LPBITMAPINFO) Data, ColorUse, InfoSize, cjBmpScanSize, 0, 0);
> -    }
> +        hBmp = NtGdiCreateDIBitmapInternal(hDC, width, height, Init, (LPBYTE)Bits,
> +            (LPBITMAPINFO)pbmiConverted, ColorUse, InfoSize, cjBmpScanSize, 0, 0);
> +    }
> +
> +Exit:
> +
> +    /* Cleanup converted BITMAPINFO */
> +    if ((pbmiConverted != NULL) && (pbmiConverted != Data))
> +    {
> +        RtlFreeHeap(RtlGetProcessHeap(), 0, pbmiConverted);
> +    }
> +
>      return hBmp;
>  }
>  
> 
> Modified: trunk/reactos/win32ss/gdi/ntgdi/dibobj.c
> URL: http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/ntgdi/dibobj.c?rev=70464&r1=70463&r2=70464&view=diff
> ==============================================================================
> --- trunk/reactos/win32ss/gdi/ntgdi/dibobj.c	[iso-8859-1] (original)
> +++ trunk/reactos/win32ss/gdi/ntgdi/dibobj.c	[iso-8859-1] Tue Dec 29 20:28:23 2015
>  <at>  <at>  -259,11 +259,37  <at>  <at> 
>      POINTL		ptSrc;
>      EXLATEOBJ	exlo;
>      PPALETTE    ppalDIB = 0;
> +    ULONG cjSizeImage;
>  
>      if (!bmi) return 0;
>  
> -    if (bmi->bmiHeader.biSizeImage > cjMaxBits)
> -    {
> +    /* Check if the header provided an image size */
> +    if (bmi->bmiHeader.biSizeImage != 0)
> +    {
> +        /* Use the given size */
> +        cjSizeImage = bmi->bmiHeader.biSizeImage;
> +    }
> +    /* Otherwise check for uncompressed formats */
> +    else if ((bmi->bmiHeader.biCompression == BI_RGB) ||
> +             (bmi->bmiHeader.biCompression == BI_BITFIELDS))
> +    {
> +        /* Calculate the image size */
> +        cjSizeImage = DIB_GetDIBImageBytes(bmi->bmiHeader.biWidth,
> +                                           ScanLines,
> +                                           bmi->bmiHeader.biBitCount);
> +    }
> +    else
> +    {
> +        /* Compressed format without a size. This is invalid. */
> +        DPRINT1("Compressed format without a size!");
> +        return 0;
> +    }
> +
> +    /* Check if the size that we have is ok */
> +    if (cjSizeImage > cjMaxBits)
> +    {
> +        DPRINT1("Size too large! cjSizeImage = %lu, cjMaxBits = %lu\n",
> +                cjSizeImage, cjMaxBits);
>          return 0;
>      }
>  
>  <at>  <at>  -273,7 +299,7  <at>  <at> 
>                                       BitmapFormat(bmi->bmiHeader.biBitCount,
>                                                    bmi->bmiHeader.biCompression),
>                                       bmi->bmiHeader.biHeight < 0 ? BMF_TOPDOWN : 0,
> -                                     bmi->bmiHeader.biSizeImage,
> +                                     cjSizeImage,
>                                       (PVOID)Bits,
>                                       0);
>      if (!SourceBitmap)
>  <at>  <at>  -314,6 +340,8  <at>  <at> 
>      rcDst.right = psurfDst->SurfObj.sizlBitmap.cx;
>      ptSrc.x = 0;
>      ptSrc.y = 0;
> +
> +    NT_ASSERT(psurfSrc->SurfObj.cjBits <= cjMaxBits);
>  
>      result = IntEngCopyBits(&psurfDst->SurfObj,
>                              &psurfSrc->SurfObj,
>  <at>  <at>  -1366,7 +1394,11  <at>  <at> 
>              /* Undocumented flag which creates a DDB of the format specified by the bitmap info. */
>              handle = IntCreateCompatibleBitmap(Dc, width, height, planes, bpp);
>              if (!handle)
> +            {
> +                DPRINT1("IntCreateCompatibleBitmap() failed!\n");
>                  return NULL;
> +            }
> +
>              /* The palette must also match the given data */
>              Surface = SURFACE_ShareLockSurface(handle);
>              ASSERT(Surface);
>  <at>  <at>  -1430,6 +1462,7  <at>  <at> 
>          safeBits = ExAllocatePoolWithTag(PagedPool, cjMaxBits, TAG_DIB);
>          if(!safeBits)
>          {
> +            DPRINT1("Failed to allocate %lu bytes\n", cjMaxBits);
>              EngSetLastError(ERROR_NOT_ENOUGH_MEMORY);
>              return NULL;
>          }
>  <at>  <at>  -1452,6 +1485,7  <at>  <at> 
>  
>      if(!NT_SUCCESS(Status))
>      {
> +        DPRINT1("Got an exception! pjInit = %p\n", pjInit);
>          SetLastNtError(Status);
>          goto cleanup;
>      }
>  <at>  <at>  -1498,6 +1532,7  <at>  <at> 
>          hdcDest = NtGdiCreateCompatibleDC(0);
>          if(!hdcDest)
>          {
> +            DPRINT1("NtGdiCreateCompatibleDC failed\n");
>              return NULL;
>          }
>      }
>  <at>  <at>  -1509,6 +1544,7  <at>  <at> 
>      Dc = DC_LockDc(hdcDest);
>      if (!Dc)
>      {
> +        DPRINT1("Failed to lock hdcDest %p\n", hdcDest);
>          EngSetLastError(ERROR_INVALID_HANDLE);
>          return NULL;
>      }
> 
> 
Mohamed MEDIOUNI | 30 Dec 13:32 2015
Picon

Commit access for creating a branch

Can I have commit access to !trunk branches for not forking to Git?
(for reviving the POSIX subsystem with the Newlib C library and adding 
pthreads support)

Thanks,
James Tabor | 29 Dec 21:44 2015
Picon

[ros-diffs] [tkreuzer] 70464: [WIN32K] Properly check the bitmap size in IntSetDIBits, taking into account that it might be set to 0, then we have to calculate it ourselves. Fixes a crash when invalid data is ...

I guess it take a decade to get things done in ReactOS? After a few had reverted some code and stuff.

Like,
Convert COREINFOHEADER to BITMAPINFOHEADER before passing it to NtGdiCreateDIBitmapInternal
Yeah~! Very Original!

Those that do not get it, research it! It's all in the mailing list!
James

_______________________________________________
Ros-dev mailing list
Ros-dev@...
http://www.reactos.org/mailman/listinfo/ros-dev
Thomas Faber | 29 Dec 13:19 2015

Re: [ros-diffs] [gedmurphy] 70408: [NTOSKRNL] - Raise the IRQL when enumerating device lists so it doesn't get edited mid-listing - Don't hardcode the pointer size when checking the buffer size

Uhm... raising the IRQL is not a synchronization mechanism. Should
there be a spinlock involved?

On 2015-12-23 12:26, gedmurphy@... wrote:
> Author: gedmurphy
> Date: Wed Dec 23 11:26:28 2015
> New Revision: 70408
> 
> URL: http://svn.reactos.org/svn/reactos?rev=70408&view=rev
> Log:
> [NTOSKRNL]
> - Raise the IRQL when enumerating device lists so it doesn't get edited mid-listing
> - Don't hardcode the pointer size when checking the buffer size
> 
> Modified:
>     trunk/reactos/ntoskrnl/io/iomgr/device.c
> 
> Modified: trunk/reactos/ntoskrnl/io/iomgr/device.c
> URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/iomgr/device.c?rev=70408&r1=70407&r2=70408&view=diff
> ==============================================================================
> --- trunk/reactos/ntoskrnl/io/iomgr/device.c	[iso-8859-1] (original)
> +++ trunk/reactos/ntoskrnl/io/iomgr/device.c	[iso-8859-1] Wed Dec 23 11:26:28 2015
>  <at>  <at>  -1088,6 +1088,10  <at>  <at> 
>  {
>      ULONG ActualDevices = 1;
>      PDEVICE_OBJECT CurrentDevice = DriverObject->DeviceObject;
> +    KIRQL OldIrql;
> +
> +    /* Raise to dispatch level */
> +    KeRaiseIrql(DISPATCH_LEVEL, &OldIrql);
>  
>      /* Find out how many devices we'll enumerate */
>      while ((CurrentDevice = CurrentDevice->NextDevice)) ActualDevices++;
>  <at>  <at>  -1099,13 +1103,14  <at>  <at> 
>      *ActualNumberDeviceObjects = ActualDevices;
>  
>      /* Check if we can support so many */
> -    if ((ActualDevices * 4) > DeviceObjectListSize)
> +    if ((ActualDevices * sizeof(PDEVICE_OBJECT)) > DeviceObjectListSize)
>      {
>          /* Fail because the buffer was too small */
> +        KeLowerIrql(OldIrql);
>          return STATUS_BUFFER_TOO_SMALL;
>      }
>  
> -    /* Check if the caller only wanted the size */
> +    /* Check if the caller wanted the device list */
>      if (DeviceObjectList)
>      {
>          /* Loop through all the devices */
>  <at>  <at>  -1123,6 +1128,9  <at>  <at> 
>              DeviceObjectList++;
>          }
>      }
> +
> +    /* Return back to previous IRQL */
> +    KeLowerIrql(OldIrql);
>  
>      /* Return the status */
>      return STATUS_SUCCESS;
> 
> 
Timo Kreuzer | 27 Dec 17:40 2015
Picon

Re: [ros-diffs] [hbelusca] 70405: [KDCOM] Do not use the "LoaderBlock->u.I386.CommonDataArea; " hack to use FreeLdr's DbgPrint function inside KDCOM, for the simple reason that while it works when KDCOM just initia...


That doesn't seem to make much sense. Why enumerate from the end? It 
should rather enumerate from the start and skip the KdComPort. So far we 
used COM1 as debug port on MSVC builds and COM2 as terminal debug port 
for both freeldr and KDCOM. Preferably this should configurable. I 
really don't like this unintuitive and quite random behaviour.

> +#ifdef KDDEBUG
> +    /*
> +     * Try to find a free COM port and use it as the KD debugging port.
> +     * NOTE: Inspired by reactos/boot/freeldr/freeldr/comm/rs232.c, Rs232PortInitialize(...)
> +     */
> +    {
> +    /*
> +     * Start enumerating COM ports from the last one to the first one,
> +     * and break when we find a valid port.
> +     * If we reach the first element of the list, the invalid COM port,
> +     * then it means that no valid port was found.
> +     */
> +    ULONG ComPort;
> +    for (ComPort = MAX_COM_PORTS; ComPort > 0; ComPort--)
> +    {
> +        /* Check if the port exist; skip the KD port */
> +        if ((ComPort != ComPortNumber) && CpDoesPortExist(UlongToPtr(BaseArray[ComPort])))
> +            break;
> +    }
> +    if (ComPort != 0)
> +        CpInitialize(&KdDebugComPort, UlongToPtr(BaseArray[ComPort]), DEFAULT_BAUD_RATE);
> +    }
> +#endif
> +
> +    KDDBGPRINT("KdDebuggerInitialize0\n");
>   
>
>

Attachment (smime.p7s): application/pkcs7-signature, 5008 bytes
_______________________________________________
Ros-dev mailing list
Ros-dev@...
http://www.reactos.org/mailman/listinfo/ros-dev

Gmane