From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1JL5PC-0006Lj-EH for mharc-grub-devel@gnu.org; Fri, 01 Feb 2008 18:34:46 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JL5PA-0006L4-T5 for grub-devel@gnu.org; Fri, 01 Feb 2008 18:34:44 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JL5P9-0006K2-SI for grub-devel@gnu.org; Fri, 01 Feb 2008 18:34:44 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JL5P9-0006Jp-Ou for grub-devel@gnu.org; Fri, 01 Feb 2008 18:34:43 -0500 Received: from ep09.pld-linux.org ([217.73.31.20]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JL5P9-0006r6-5h for grub-devel@gnu.org; Fri, 01 Feb 2008 18:34:43 -0500 Received: from agaran by ep09.pld-linux.org with local (Exim 4.68) (envelope-from ) id 1JL5P7-000459-9i for grub-devel@gnu.org; Sat, 02 Feb 2008 00:34:41 +0100 Date: Sat, 2 Feb 2008 00:34:41 +0100 From: Maciej 'Agaran' Pijanka To: grub-devel@gnu.org Message-ID: <20080201233441.GA15547@ep09.pld-linux.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="NzB8fVQJ5HfG6fxh" Content-Disposition: inline User-Agent: Mutt/1.4.2.3i Sender: PLD Agaran X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) Subject: disk/ata.c changes, repost X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Feb 2008 23:34:45 -0000 --NzB8fVQJ5HfG6fxh Content-Type: message/rfc822 Content-Disposition: inline Hello, this patch just changes output of debug printing ata devices found in machine. i hope now coding style is acceptable -- agaran at pld dash linux dot org :: PLD Linux Developer [#133161] I do not fear computers. I fear the lack of them. [Isaac Asimov] --NzB8fVQJ5HfG6fxh Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="grub2-ata.patch" Index: disk/ata.c =================================================================== RCS file: /sources/grub/grub2/disk/ata.c,v retrieving revision 1.6 diff -u -r1.6 ata.c --- disk/ata.c 5 Nov 2007 16:15:26 -0000 1.6 +++ disk/ata.c 1 Feb 2008 23:29:17 -0000 @@ -204,18 +204,49 @@ grub_ata_dumpinfo (struct grub_ata_device *dev, char *info) { char text[41]; + char *s,*p = 0; /* The device information was read, dump it for debugging. */ + + /* Model */ + grub_ata_strncpy (text, info + 54, 40); + /* Now strip trailing spaces */ + s=text; + while(*s) + { + if(*s != ' ') + p = (char *)s; + s++; + } + p++; + *p = '\0'; + grub_printf("ata%d: Model: %s, (Addr: %d)\n", dev->port * 2 + dev->device, text, dev->addr); + /* serial */ grub_ata_strncpy (text, info + 20, 20); - grub_printf ("Serial: %s\n", text); + /* Now strip trailing spaces */ + s=text; + while(*s) + { + if(*s != ' ') + p = (char *)s; + s++; + } + p++; + *p = '\0'; + grub_printf(" Serial: %s, ", text); + /* Firmware */ grub_ata_strncpy (text, info + 46, 8); - grub_printf ("Firmware: %s\n", text); - grub_ata_strncpy (text, info + 54, 40); - grub_printf ("Model: %s\n", text); - - grub_printf ("Addressing: %d\n", dev->addr); - grub_printf ("#sectors: %d\n", dev->size); - + /* Now strip trailing spaces */ + s=text; + while(*s) + { + if(*s != ' ') + p = (char *)s; + s++; + } + p++; + *p = '\0'; + grub_printf ("Firmware: %s, #sectors: %d\n", text, dev->size); } static grub_err_t --NzB8fVQJ5HfG6fxh--