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 length constants

  • From: Ingo Weinhold <bonefish@xxxxxxxxxxxxxxx>
  • To: openbeosstorage@xxxxxxxxxxxxx
  • Date: Tue, 28 Oct 2003 00:15:01 +0100
On 2003-10-27 at 23:49:13 [+0100], you wrote:
> Do y'all mind if I add the following constants somewhere?
> 
> #define B_DISK_DEVICE_TYPE_LENGTH B_FILE_NAME_LENGTH
> #define B_DISK_DEVICE_NAME_LENGTH B_FILE_NAME_LENGTH
> #define B_DISK_SYSTEM_NAME_LENGTH B_OS_NAME_LENGTH
> 
> It's silly (and error prone, as I've discovered :-) to go around and change
> a bunch of constants when we want to change the length of a given type of
> string, and it would make it clearer which sort of string a given variable
> is to be used from when declaring it, a la:
> 
> char name[B_DISK_SYSTEM_NAME_LENGTH];
> 
> is clearly a disk system name, not a partition name.

Sounds like a good idea to me.

> Also, assuming you like the idea, where should I put them? Does
> ddm_userland_interface.h make sense? I could see wanting those constants
> when writing a disk system add-on, but I don't see why you'd want to
> include ddm_userland_interface.h. Maybe we should add a ddm_support.h?

I think they should either go in <disk_device_manager.h> -- a kernel header 
-- or <DiskDeviceDefs.h> -- used by both kernel and userland and probably 
the better choice.

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.