Re: ddm length constants
Ingo Weinhold <bonefish-CFLBMwTPW48UNGrzBIF7/[email protected]> Tue, 28 Oct 2003 00:15:01 +0100
| Newsgroups | gmane.os.openbeos.storage |
|---|---|
| Message-ID | <[email protected]> |
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