Go to the FreeLists Home Page Home Signup Help Login
 



[openbeosstorage] || [Date Prev] [10-2003 Date Index] [Date Next] || [Thread Prev] [10-2003 Thread Index] [Thread Next]

[openbeosstorage] Re: ddm questions

  • From: Ingo Weinhold <bonefish@xxxxxxxxxxxxxxx>
  • To: openbeosstorage@xxxxxxxxxxxxx
  • Date: Fri, 24 Oct 2003 20:13:43 +0200
On 2003-10-24 at 20:03:28 [+0200], you wrote:
> > > > + 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?

That's what I was trying to say. :-) The string is passed to the disk system, 
which will truncate the name, if necessary, and the syscall just needs to 
copy it back into userland space.

CU, Ingo





[ Home | Signup | Help | Login | Archives | Lists ]

All trademarks and copyrights within the FreeLists archives are owned by their respective owners.
Everything else ©2007 Avenir Technologies, LLC.