# Annotations# ===========## This file contains a list of miscellaneous annotations.# An entry has the following tags:# * OS: the concerned "operating system" (BeOS R5, OBOS POSIX)# * Module: the concerned class or file# * Location: a more precise location, e.g. a function# * Description: a description of the itemOS: BeOS R5Module: BEntryLocation: BEntry(const BDirectory*, const char*),SetTo(const BDirectory*, const char*)Description: Crash when passing a NULL BDirectory.OS: BeOS R5Module: BEntryLocation: MoveTo()Description: Crashs when passing a NULL BDirectory.OS: BeOS R5Module: BPathLocation: BPath(const BDirectory*, const char*, bool),SetTo(const BDirectory*, const char*, bool)Description: Crash when passing a NULL BDirectory.OS: BeOS R5Module: BPathLocation: GetParent()Description: Crashs when called on an uninitialized object or when passinga NULL BPath.OS: BeOS R5Module: BPathLocation: operator==(), operator!=()Description: Uninitialized paths are not equal. An initialized path equalsa (const char*)NULL, an uninitialized path does not.OS: BeOS R5Module: BPathLocation: Flatten()Description: Crashs when passing a NULL buffer and doesn't check the buffersize.OS: BeOS R5Module: BStatableLocation: destructorDescription: Is not virtual.OS: BeOS R5Module: BStatableLocation: GetAccessTime(), SetAccessTime()Description: Access time unused.OS: BeOS R5Module: BStatableLocation: GetPermissions()Description: Doesn't filter the mode flags, thus not only the permissions arereturned.OS: BeOS R5Module: BStatableLocation: Get*()Description: Crash when passing a NULL pointer.OS: OBOS POSIXModule: BStatableLocation: SetPermissions/ModificationTime/CreationTime()Description: Don't work due to set_stat(FileDescriptor, StatMember)limitations.OS: OBOS POSIXModule: kernel_interfaceLocation: set_stat(FileDescriptor, StatMember)Description: WSTAT_MODE, WSTAT_*TIME can't be implemented due to missingfchmod()/FD time setters.OS: BeOS R5Module: librootLocation: fchown()Description: fchown(file, 0xFFFFFFFF, gid) sets the UID to 0xFFFFFFFF, whichis a bug.OS: BeOS R5Module: librootLocation: readdir(), fs_read_attr_dir()Description: The d_reclen field of a dirent structure does not contain thelength of the whole structure (unlike stated inBeBook::BEntryList), but only the length of the d_name field.If the terminating '\0' is counted or not seems to depend on thefile system.OS: OBOS POSIXModule: kernel_interfaceLocation: read_link(FileDescriptor, char*, size_t)Description: Can't be implemented due to the lack of an FD readlink() version.OS: BeOS R5Module: BSymLinkLocation: MakeLinkedPath(const char*, BPath*)Description: The dirPath seems to be converted into a BDirectory, whichcauses links to be resolved, i.e. a "/tmp" dirPath expands to"/boot/var/tmp". That does also mean, that the dirPath mustexists!OS: BeOS R5Module: BSymLinkLocation: MakeLinkedPath()Description: Crashs when passing a NULL const char* or BDirectory.OS: BeOS R5Module: BNodeLocation: GetNextAttrName()Description: Crashs when passing a NULL buffer.OS: BeOS R5Module: BNodeLocation: Read/WriteAttrString()Description: Crash when passing a NULL BString.OS: BeOS R5Module: BNodeLocation: Lock()Description: Given two BNode objects initialized to the same node, it ispossible to Lock() one of them, although the BeBook says it isn't.OS: BeOS R5Module: BDirectoryLocation: BDirectory(const node_ref*), SetTo(const node_ref*)Description: Crash when passing a NULL node_ref.OS: BeOS R5Module: BDirectoryLocation: GetEntry()Description: Crashs when passing a NULL BEntry.OS: BeOS R5Module: BDirectoryLocation: FindEntry()Description: Crashs when passing a NULL BEntry.OS: BeOS R5 (OBOS)Module: BDirectoryLocation: Contains(const char*, int32)Description: If the supplied path is absolute and refers to an existingentry, true is returned, even if the directory does not containthe entry or is not even initialized.(The OBOS implementation makes the behavior more consistentwith the BEntry* version, which returns false when thedirectory is not initialized and true only if the directoryactually contains the entry.)OS: BeOS R5Module: BDirectoryLocation: Contains(const BEntry*, int32)Description: Crashs when passing a NULL BEntry.OS: BeOS R5Module: BDirectoryLocation: Contains(const BEntry*, bool)Description: Bug: Tests with a directory, contained file/dir/symlink andthe respective node kind (B_FILE_NODE/B_DIRECTORY_NODE/B_SYMLINK_NODE) result false.OS: BeOS R5Module: BDirectoryLocation: GetNextDirents()Description: Crashs when passing a NULL buffer.OS: OBOSModule: BQueryLocation: Push*()Description: Return status_t instead of void. Fail, if Fetch() has alreadybeen called.OS: BeOS R5Module: BQueryLocation: PushOp()Description: Crashs when pushing B_CONTAINS/B_BEGINS/ENDS_WITH on an emptystack.OS: BeOS R5Module: BQueryLocation: PushUInt64()Description: Doesn't work. Predicates constructed using it are invalid.OS: BeOS R5Module: BQueryLocation: Get/SetPredicate()Description: Crash when passing a NULL BString/char*.OS: BeOS R5Module: BQueryLocation: SetVolume()Description: Crashs when passing a NULL BVolume.OS: BeOS R5Module: BQueryLocation: GetNextEntry/Ref()Description: Crash when passing a NULL BEntry/entry_ref.OS: BeOS R5Module: BMimeTypeLocation: {Get,Set}LongDescription()Description: Crashes when passed a NULL descriptionOS: BeOS R5Module: BMimeTypeLocation: GetLongDescription()Description: The contents of the description string are modified even ifthe function fails.OS: BeOS R5Module: BMimeTypeLocation: SetShortDescription()Description: When passed a NULL description, doesn't crash, but doesappear to make the result of following calls to SetShortDescriptionunreliable (sometimes they work, sometimes they don't).OS: BeOS R5 vs. OBOSModule: BMimeTypeLocation:Description: R5: The maximal MIME string length, BMimeType accepts isB_MIME_TYPE_LENGTH *not* including terminating null. Note, thatapp_info reserves only B_MIME_TYPE_LENGTH chars for thesignature field.OBOS: That's why we support strings that fit into a buffer ofsize B_MIME_TYPE_LENGTH only. This is consistent with the useof the other *_LENGTH constants.OS: BeOS R5Module: BMimeTypeLocation: SetAppHint()Description: The entry_ref passed to SetAppHint() must be valid but is notrequired to refer to a file that actually exists; furthermore,if it does exist, the MIME type of the file is not required tomatch the BMimeType object's type.OS: BeOS R5Module: BMimeTypeLocation: SetIcon()Description: The BBitmap passed to BMimeType::SetIcon() must be in the B_CMAP8color space, or the application will crash. We should rememberto be smarter about this.OS: BeOS R5Module: BMimeTypeLocation: GetIcon()Description: The BBitmap passed to BMimeType::GetIcon() must be in the B_CMAP8color space. If not, the call returns B_OK but doesn't actuallymodify the bitmap. We should remember to be smarter about this.OS: BeOS R5Module: BMimeTypeLocation: IsValid(const char*), GetSupertype(), Contains()Description: Crash when passing NULL.OS: BeOS R5Module: BMimeTypeLocation: {Get,Set}IconForType(char*, BBitmap*, icon_size)Description: Passing NULL as the first parameter is the same as calling{Get,Set}Icon() with the second two parameters (i.e. {gets,sets}the icon for the type itself).OS: BeOS R5Module: BMimeTypeLocation: SetFileExtensions()Description: Passing a NULL message does not clear the File Extensions fieldfor the MIME type as indicated by the Be Book; instead, it crashesthe application :-)OS: BeOS R5Module: BMimeTypeLocation: GetFileExtensions()Description: A B_STRING_TYPE field of name "type" is *added* to the resultcontaining the MIME type of the BMimeType object. Since theBMessage passed to SetFileExtensions() appears to be simplyflattened into the appropriate attribute, the "type" field isappended to any such "type" fields that may already exist inthe original BMessage.OS: BeOS R5Module: BMimeTypeLocation: Install()Description: From the Be Book: "Currently, Install() may return a random valueif the object is already installed."OS: BeOS R5Module: BMimeTypeLocation:Description: MIME Type strings are converted to lowercase before being usedas filenames in the MIME database.OS: BeOS R5Module: BMimeTypeLocation: Start/StopWatching()Description: An invalid messenger (BMessenger::Invalid()) is fine as parameter.OS: BeOS R5Module: Mime.h/cppLocation: get_device_icon()Description: KDL when passing a NULL buffer!OS: BeOS R5Module: BMimeTypeLocation: CheckSnifferRule()Description: Crashes when passing a NULL rule.OS: BeOS R5Module: BMimeTypeLocation: GetSnifferRule()Description: Crashes when passing a NULL BString.OS: BeOS R5Module: BMimeTypeLocation: Check/Get/SetSnifferRule()Description: The sniffer rules description in the BeBook deviates considerablyfrom the actual implementation:- + masks- + top level ORs: (patterns...) | (patterns...) | ...- - range overriding: [range1] ([range2]pattern)- either no or complete ranges: (pattern1 | pattern2)or ([range1]pattern1 | [range2]pattern2), but not([range1]pattern1 | pattern2)- CheckSnifferRule() doesn't check some of the values, e.g.ranges (negative values, or begin > end) or 0 <= priority <= 1.OS: BeOS R5Module: BMimeTypeLocation: GuessMimeType(const entry_ref *, BMimeType *)Description: When passing an uninitialized entry_ref, B_OK and"application/octet-stream" are returned.OS: BeOS R5Module: BMimeTypeLocation: SetAttrInfoDescription: Crashes when passed a NULL BMessage.OS: BeOS R5Module: BMimeTypeLocation: GetInstalledTypes(BMessage*)Description: The set of types returned by this function is determined as follows:+ All *entries* (files, dirs, or symlinks) in the root MIME databasedirectory treated as MIME types, except those that begin with anunderscore; only dirs are treated as supertypes (unless the dir'sMETA:TYPE attribute is different than its filename, in which caseit's not treated as a supertype).+ For each supertype, all *entries* (files, dirs, or symlinks) in thecorresponding supertype subdirectory are treated as a MIME type, exceptthose that begin with an underscore.+ The MIME type for supertypes is taken from the name of the supertypesubdirectory.+ The MIME type for non-supertypes is take from the entry's META:TYPEattribute. If the entry has no META:TYPE attribute, the MIME type isderived by concatentating the name of the supertype directory to thename of the entry, separated by a "/" character. Either way, the MIMEstring returned is not checked to be valid.OS: BeOS R5Module: BMimeTypeLocation: GetInstalledTypes(char *super, BMessage*)Description: The set of types returned by this function is determined as follows:+ All *entries* (files, dirs, or symlinks) in the MIME database directorycorresponding to the "super" argument are treated as subtypes, *except*those whose filenames begin with an underscore. It does not matter ifthe supertype directory has a META:TYPE attribute or not.+ The MIME type is taken from the entry's META:TYPE attribute. If the entryhas no such attribute, the MIME type is derived by concatentating the nameof the supertype directory (the directory's META:TYPE attribute is ignoredif present) to the name of the entry, separated by a "/" character. Eitherway, the MIME string returned is not checked to be valid.OS: BeOS R5Module: BMimeTypeLocation: GetInstalledSupertypes(BMessage*)Description: The set of types returned by this function is determined as follows:+ All directories in the root MIME database directory are treated assupertypes (even directories beginning with an underscore).+ The MIME type is derived from the directory name, which is notchecked to be a valid MIME string.OS: BeOS R5Module: BMimeTypeLocation: GetWildcardApps()Description: This code:BMessage msg;status_t error = BMimeType::GetWildcardApps(&msg);is the same as:BMessage msg;BMimeType mime("application/octet-stream");status_t error = mime.InitCheck();if (!error)error = mime.GetSupportingApps(&msg);OS: BeOS R5Module: BNodeInfoLocation: {Set,Get}AppHint()Description: The file attribute the path of the "app hint" application("BEOS:PPATH") is of type B_MIME_STRING_TYPE instead ofB_STRING_TYPE.OS: BeOS R5Module: BNodeInfoLocation: GetType()Description: When the string stored in the "BEOS:TYPE" attribute is longerthan B_MIME_TYPE_LENGTH, the returned string is one charactershorter than the actual string.OS: BeOS R5Module: BNodeInfoLocation: GetIcon()Description: Crashes when passing a NULL BBitmap.OS: BeOS R5Module: BNodeInfoLocation: GetIcon()Description: Crashes when getting B_LARGE_ICON and passing a BBitmap withB_RGB32 color space. B_MINI_ICON works just fine.OS: BeOS R5Module: BAppFileInfoLocation: GetSupportedTypes()Description: Crashes when passing a NULL BMessage.OS: BeOS R5Module: BAppFileInfoLocation: Supports()Description: Crashes when passing a NULL BMimeType.OS: BeOS R5Module: BAppFileInfoLocation: SetSupportedTypes(const BMessage *types, bool syncAll)Description: Crashes when passing a NULL BMessage and syncAll = true.OS: BeOS R5Module: BAppFileInfoLocation: SetSupportedTypes()Description: Sometimes installs a supported type, also when the file'ssignature is not installed in the MIME database. This happense.g. when setting two supported types and then setting twodifferent types. The second of the new types is installed.OS: BeOS R5Module: BAppFileInfoLocation: SetSupportedTypes(const BMessage *types)Description: Returns B_ENTRY_NOT_FOUND when the file's signature is notinstalled in the MIME database, although the operation iscarried out successfully.OS: BeOS R5Module: BAppFileInfoLocation: SetSupportedTypes()Description: Don't check whether the supplied types are valid MIME types. Anddon't fail, if they are not. OBOS checks them.OS: BeOS R5Module: BAppFileInfoLocation: GetIcon(), GetIconForType()Description: Crashes when getting B_LARGE_ICON and passing a BBitmap withB_RGB32 color space. B_MINI_ICON works just fine.OS: BeOS R5Module: BAppFileInfoLocation: GetVersionInfo(), SetVersionInfo()Description: Crash when passing a NULL version_info.Module: BTestLocation: SetName()Description: Should also rename the mount point.Priority: medium