Port-macppc archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Native BSD disklabel access



> a few days ago, I had the need to access a sparc disk from a Macintosh G3.
> Same endianness, so no problem, I thought.
> 
> The macppc kernel only gave me a generic, empty disklabel where I expected
> my partitions. 'disklabel -r' gave me the expected list, but unlike
> mbrlabel(8), disklabel(8) has no way of feeding a label to the kernel.
> 
> Looking at macppc/macppc/disksubr.c, I found that the support for reading
> native disklabels I added to the mac68k port twelve years ago had never
> made it across. Prying a disklabel out of an mbr partition, yes (what for?
> It'll be LE, most likely), but no native BSD label.
> 
> In the wake of netbsd-6, I didn't want to be too intrusive (although
> disksubr.c could use some tough love), just plopped in an adapted version
> of the mac68k routine, and was able to access the sparc disk.
> 
> Comments? Okay to commit?

What should happen if writedisklabel() is called
after readdisklabel() reads sparc disklabel?

Should non-native label be readonly?
---
Izumi Tsutsui


Home | Main Index | Thread Index | Old Index