lkml.org 
[lkml]   [2005]   [Feb]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] partitions/msdos.c
>>>>> "Linus" == Linus Torvalds <torvalds@osdl.org> writes:

Linus> On Sat, 26 Feb 2005, Linus Torvalds wrote:
>> Would it not make more sense to just sanity-check the size itself,
>> and throw it out if the partition size (plus start) is bigger than
>> the disk size?

Linus> Something like this (TOTALLY UNTESTED AS USUAL!)?

Yes, no phantom partitions also with your approach.

Linus> What does fdisk and other tools do on that disk? Just out of
Linus> interest..

To be honest:
r50:~ # fdisk /dev/sda

Command (m for help): p

Disk /dev/sda: 65 MB, 65536000 bytes
17 heads, 33 sectors/track, 228 cylinders
Units = cylinders of 561 * 512 = 287232 bytes

Device Boot Start End Blocks Id System
/dev/sda1 1 229 63981+ 6 FAT16
Partition 1 has different physical/logical beginnings (non-Linux?):
phys=(0, 1, 1) logical=(0, 1, 5)
Partition 1 has different physical/logical endings:
phys=(125, 16, 33) logical=(228, 2, 26)
/dev/sda4 3512348 6003585 698791990+ 0 Empty
Partition 4 has different physical/logical beginnings (non-Linux?):
phys=(0, 0, 0) logical=(3512347, 6, 16)
Partition 4 has different physical/logical endings:
phys=(0, 0, 0) logical=(6003584, 7, 6)
Partition 4 does not end on cylinder boundary.


--
Uwe Bonnes bon@elektron.ikp.physik.tu-darmstadt.de

Institut fuer Kernphysik Schlossgartenstrasse 9 64289 Darmstadt
--------- Tel. 06151 162516 -------- Fax. 06151 164321 ----------
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:10    [W:1.890 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site