[openbeosstorage] Re: API Extensions

> > > And the user functions:
> > > status=5Ft partition=5Fsession(int deviceFD, int32 sessionIndex,
> > > const
> > > char
> > > *identifier, uint32 version, void *parameters, size=5Ft paramLen);
> > > status=5Ft initialize=5Fpartition(int deviceFD, int32 
> > > sessionIndex,
> > > int32
> > > partitionIndex, const char *identifier, uint32 version, char *
> > > volumeName, void *parameters, size=5Ft paramLen);
> > 
> > I would replace the second with:
> > status=5Ft initialize=5Fvolume(const char *where, const char *
> > fileSystem,
> > const char *volumeName, const char *parameters);
> > 
> > Or something similar, probably in unistd.h (accompanying mount()).
> 
> Mmh, I could live with that, though it doesn't fit with the rest of 
> the
> functions.

Why not have both? If you're using the device API, getting 
session_info's and partition_info's and what not, you're going to be 
really annoyed if you have to convert that info to a path name to 
initialize the partition; thus you want Ingo's version. But if you just 
feel like initializing a volume for whatever reason, Axel's version 
would be nicer (and would probably make sense living in unistd.h).

> Perhaps it's also better to drop that `version' stuff. I thought, it
> could help to deal better with situations when different versions of a
> FS exist, but probably that's a bit too esoteric.

Perhaps set things up so the latest version is used unless specified 
(does C allow for default parameters? I can't remember...)?

> > OTOH we can use this information to display names for partitions 
> > with
> > unknown or initialized file systems - so that Tracker displays "Be
> > volume" or "QNX volume" if the  recognizes a BFS/QNX partition but 
> > it
> > cannot read the file system for whatever reason.
> 
> The extended_partition_info features both the type code
> (`partition_code') and a human readable interpretation
> (`partition_type'). partition_code is uint8 currently -- maybe it
> should be resized to uint32.

Do you know offhand if anyone else has done this yet (and would the 
intel partition specs allow the expansion to happen gracefully?). IIRC, 
there are very few type codes in the 8-bit range that haven't been 
used, so it seems like something will have to be done one of these days.

-Tyler

Other related posts: