[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Typo in libparted
From: |
Sven Luther |
Subject: |
Re: Typo in libparted |
Date: |
Tue, 14 Dec 2004 11:14:37 +0100 |
User-agent: |
Mutt/1.5.6+20040907i |
On Mon, Dec 13, 2004 at 03:18:27PM -0600, Harley D. Eades III wrote:
> Hello,
> There is a typo in libparted/disk_dos.c:172.
>
> if ((!strncmp (part_table.boot_code + 0x36, "FAT", 3)
> --> && strcmp (part_table.boot_code + 0x36, "FATSBML", 7) != 0)
> || !strncmp (part_table.boot_code + 0x52, "FAT", 3))
> return 0;
>
> Should be:
> if ((!strncmp (part_table.boot_code + 0x36, "FAT", 3)
> && strncmp (part_table.boot_code + 0x36, "FATSBML", 7) != 0)
> || !strncmp (part_table.boot_code + 0x52, "FAT", 3))
> return 0;
>
> Ok for me to go ahead and commit the added 'n'. :)
I guess so, the 'n' was present in the original patch written by Matt Kraai
for the debian package :
diff -urNad /tmp/parted-1.6.11/libparted/disk_dos.c
parted-1.6.11/libparted/disk_dos.c
--- /tmp/parted-1.6.11/libparted/disk_dos.c 2004-03-09 02:17:08.000000000
-0800
+++ parted-1.6.11/libparted/disk_dos.c 2004-09-13 07:23:53.000000000 -0700
@@ -145,7 +145,8 @@
return 0;
/* if this is a FAT fs, fail here */
- if (!strncmp (part_table.boot_code + 0x36, "FAT", 3)
+ if ((!strncmp (part_table.boot_code + 0x36, "FAT", 3)
+ && strncmp (part_table.boot_code + 0x40, "SBML", 4))
|| !strncmp (part_table.boot_code + 0x52, "FAT", 3))
return 0;
I wonder too about the wisdom of of rechecking the FAT part twice in the above
code ?
Friendly,
Sven Luther
- Typo in libparted, Harley D. Eades III, 2004/12/13
- Re: Typo in libparted,
Sven Luther <=