From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11352 invoked by alias); 28 Mar 2008 14:38:14 -0000 Received: (qmail 11342 invoked by uid 22791); 28 Mar 2008 14:38:13 -0000 X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.4) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 28 Mar 2008 14:37:50 +0000 Received: (qmail 6069 invoked from network); 28 Mar 2008 14:37:48 -0000 Received: from unknown (HELO ?192.168.2.222?) (carlos@127.0.0.2) by mail.codesourcery.com with ESMTPA; 28 Mar 2008 14:37:48 -0000 Message-ID: <47ED02B6.8010805@codesourcery.com> Date: Fri, 28 Mar 2008 14:38:00 -0000 From: Carlos O'Donell User-Agent: Mozilla-Thunderbird 2.0.0.9 (X11/20080110) MIME-Version: 1.0 To: gdb-patches Subject: [RFC] Don't assume the name of Windows serial devices? Content-Type: multipart/mixed; boundary="------------040403020405040303090305" Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2008-03/txt/msg00461.txt.bz2 This is a multi-part message in MIME format. --------------040403020405040303090305 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-length: 399 Is there any reason we restrict the Windows serial device names to "COM?" A user could have serial boards, com ports higher than 9 (\\.\COMX), or weird file devices that act like serial ports. The following patch removes the code that rejects devices that don't start with the word "COM". Comments? Cheers, Carlos. -- Carlos O'Donell CodeSourcery carlos@codesourcery.com (650) 331-3385 x716 --------------040403020405040303090305 Content-Type: text/x-patch; name="gdb-serial.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="gdb-serial.diff" Content-length: 796 2008-03-28 Carlos O'Donell * ser-mingw.c (ser_windows_open): Open requested name. Index: gdb/ser-mingw.c =================================================================== RCS file: /cvs/src/src/gdb/ser-mingw.c,v retrieving revision 1.12 diff -u -p -r1.12 ser-mingw.c --- gdb/ser-mingw.c 1 Jan 2008 22:53:12 -0000 1.12 +++ gdb/ser-mingw.c 28 Mar 2008 14:32:56 -0000 @@ -51,13 +51,6 @@ ser_windows_open (struct serial *scb, co struct ser_windows_state *state; COMMTIMEOUTS timeouts; - /* Only allow COM ports. */ - if (strncmp (name, "COM", 3) != 0) - { - errno = ENOENT; - return -1; - } - h = CreateFile (name, GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING, FILE_FLAG_OVERLAPPED, NULL); if (h == INVALID_HANDLE_VALUE) --------------040403020405040303090305--