On Fri, May 04, 2012 at 07:08:30PM +0200, Davidlohr Bueso wrote: > On Fri, 2012-05-04 at 15:53 +0200, Francesco Cosoleto wrote: > > 2012/5/4 Davidlohr Bueso <dave@xxxxxxx>: > > > From: Davidlohr Bueso <dave@xxxxxxx> > > > > > > Commit 8db8295d824cd0c8cba9385e4635d6e311d69d3f added a regression that causes the program to crash when > > > touching the partition structure (pte) for BSD/OSF labels. Since DOS has its own initialization function, > > > allow BSD labels to use it as well. > > > > > > Steps to reproduce: > > > > > > $> fdisk bsd.img (obtained from blkid regression test files) > > > Command (m for help): p > > > ... > > > I/O size (minimum/optimal): 512 bytes / 512 bytes > > > Disk identifier: 0x00000000 > > > > > > Segmentation fault > > > > Thanks Davidlohr for pointing out that regression. Does it occurs with > > the command to print the partition table when the drive has a BSD > > label and hasn't a valid DOS label, and it has no partition? Fdisk > > switches from BSD label to DOS label without initializing DOS > > structures, right? > > From my analysis, yes. Just note that some labels are nested -- for example BSD, minix unixware, ... are subtypes (nested partition tables) within DOS. This parent->child relationship will be also necessary to support in new fdisk API. Karel -- Karel Zak <kzak@xxxxxxxxxx> http://karelzak.blogspot.com -- To unsubscribe from this list: send the line "unsubscribe util-linux" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html