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

  • From: Tyler Dauwalder <tyler@xxxxxxxxxxxxx>
  • To: Storage Kit <openbeosstorage@xxxxxxxxxxxxx>
  • Date: Mon, 27 Oct 2003 14:49:13 -0800
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.

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?

-Tyler





[ 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.