[openbeosstorage] Re: ddm questions

> > > + Do I need to copy out the data in the pointer arguments (all of which
> > > are
> > > names) for the _kern_validate_set_partition_{name,content_name,type}()
> > > functions? I can't really see any reason to other than truncating long
> > > names, but I was planning on returning B_NAME_TOO_LONG in those 
> > > instances
> > > anyway.
> > 
> > Well, _kern_validate_set_partition_type()'s argument is a const char*, so 
> > I
> > guess I know the answer for that one already,
> 
> Exactly. :-)
> 
> > but the question stands for
> > the other two.
> 
> Yep, the non-const was chosen intentionally. I had the feeling, that e.g.
> truncating a name wouldn't be too unusual.

So do you not want me to return B_NAME_TOO_LONG if the name is larger than 
B_OS_NAME_LENGTH and instead let the validate function handle things?

> > > + Same question, but for the "parameters" parameter of
> > > _kern_validate_initialize_partition(). I'm guessing no.
> > 
> > Again, parameters is a const char*, so nevermind, but the "name" param is 
> > a
> > regular char*. Is this for name truncation again (I was intending to 
> > return
> > an error if the name were too long)?
> 
> Yep, it was intended, that the disk system would truncate the name here as
> well.
> 
> > > + Do we have a limit on the length of those parameter strings? I'm
> > > currently assuming no.
> > 
> > Still an open question. :-)
> 
> No limit in principle, but I'm with Axel here, that a sanity limit (32 KB
> should be more than enough) should apply.

Okay, I'll just go with 32KB.

-Tyler

Other related posts: