New GEOM module: geom_xboxhd
ed at fxq.nl
Sun Apr 15 07:04:39 UTC 2007
* Rink Springer <rink at freebsd.org> wrote:
> Some comments:
> (1) g_xboxhd_checkmagic(): You look at uint32_t* buf, which you have just
> g_free()'d; this seems wrong. I know this is debugging code, but you
> could just get rid of these lines all the same ;-)
Thanks. Fixed that. :)
> (2) I consider the for-loop in line 125 a bit kludgy - why not add all
> 'standard' partitions (of which you know they are always there) in
> this loop, and if the disk was larger, add a final paritition
> containing the rest? This makes the code prettier to read, in my
I now took a different approach; I added OFF_MAX to the offsets list,
so the scratch space can also be added the same way as the other
> (3) This may be personal preference, but I consider a check of 4 bytes on
> address 0x600 a bit weak - usually, the first 63 sectors or so after the
> boot sector are skipped during partitioning (most general boot
> managers reside there), so there may be no telling what's in there.
> However, there doesn't seem to be a better way to identify Xbox
> harddisks, which makes me wonder whether we should keep this in the XBOX
> kernel config file only, possibly commented out in LINT.
We could also check the magic of the Xbox partitions. The first 4 bytes
of the partitions should always be "FATX". I personally do not favour
this, because that would mean this module won't match if you newfs one
of the Xbox partitions by accident. Adding it to LINT wouldn't hurt,
because LINT is only used for compile-time testing, right?
> Anyway, apart from this, it looks functional and something the xbox port
> could very well use. I'd like to get this in the tree, so people with
> more geom-fu are very welcome to take a look!
> Have you tried what sysinstall(8) does when it sees such a layout? It'd
> be a shame if it nuked the partition table... :-)
Not yet :-)
Ed Schouten <ed at fxq.nl>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-geom/attachments/20070415/0966f3db/attachment.pgp
More information about the freebsd-geom