4 # This file contains a list of miscellaneous annotations.
5 # An entry has the following tags:
6 # * OS: the concerned "operating system" (BeOS R5, OBOS POSIX)
7 # * Module: the concerned class or file
8 # * Location: a more precise location, e.g. a function
9 # * Description: a description of the item
13 Location: BEntry(const BDirectory*, const char*),
14 SetTo(const BDirectory*, const char*)
15 Description: Crash when passing a NULL BDirectory.
21 Description: Crashs when passing a NULL BDirectory.
26 Location: BPath(const BDirectory*, const char*, bool),
27 SetTo(const BDirectory*, const char*, bool)
28 Description: Crash when passing a NULL BDirectory.
34 Description: Crashs when called on an uninitialized object or when passing
40 Location: operator==(), operator!=()
41 Description: Uninitialized paths are not equal. An initialized path equals
42 a (const char*)NULL, an uninitialized path does not.
48 Description: Crashs when passing a NULL buffer and doesn't check the buffer
55 Description: Is not virtual.
60 Location: GetAccessTime(), SetAccessTime()
61 Description: Access time unused.
66 Location: GetPermissions()
67 Description: Doesn't filter the mode flags, thus not only the permissions are
74 Description: Crash when passing a NULL pointer.
79 Location: SetPermissions/ModificationTime/CreationTime()
80 Description: Don't work due to set_stat(FileDescriptor, StatMember)
85 Module: kernel_interface
86 Location: set_stat(FileDescriptor, StatMember)
87 Description: WSTAT_MODE, WSTAT_*TIME can't be implemented due to missing
88 fchmod()/FD time setters.
94 Description: fchown(file, 0xFFFFFFFF, gid) sets the UID to 0xFFFFFFFF, which
100 Location: readdir(), fs_read_attr_dir()
101 Description: The d_reclen field of a dirent structure does not contain the
102 length of the whole structure (unlike stated in
103 BeBook::BEntryList), but only the length of the d_name field.
104 If the terminating '\0' is counted or not seems to depend on the
109 Module: kernel_interface
110 Location: read_link(FileDescriptor, char*, size_t)
111 Description: Can't be implemented due to the lack of an FD readlink() version.
116 Location: MakeLinkedPath(const char*, BPath*)
117 Description: The dirPath seems to be converted into a BDirectory, which
118 causes links to be resolved, i.e. a "/tmp" dirPath expands to
119 "/boot/var/tmp". That does also mean, that the dirPath must
125 Location: MakeLinkedPath()
126 Description: Crashs when passing a NULL const char* or BDirectory.
131 Location: GetNextAttrName()
132 Description: Crashs when passing a NULL buffer.
137 Location: Read/WriteAttrString()
138 Description: Crash when passing a NULL BString.
144 Description: Given two BNode objects initialized to the same node, it is
145 possible to Lock() one of them, although the BeBook says it isn't.
150 Location: BDirectory(const node_ref*), SetTo(const node_ref*)
151 Description: Crash when passing a NULL node_ref.
157 Description: Crashs when passing a NULL BEntry.
162 Location: FindEntry()
163 Description: Crashs when passing a NULL BEntry.
168 Location: Contains(const char*, int32)
169 Description: If the supplied path is absolute and refers to an existing
170 entry, true is returned, even if the directory does not contain
171 the entry or is not even initialized.
172 (The OBOS implementation makes the behavior more consistent
173 with the BEntry* version, which returns false when the
174 directory is not initialized and true only if the directory
175 actually contains the entry.)
180 Location: Contains(const BEntry*, int32)
181 Description: Crashs when passing a NULL BEntry.
186 Location: Contains(const BEntry*, bool)
187 Description: Bug: Tests with a directory, contained file/dir/symlink and
188 the respective node kind (B_FILE_NODE/B_DIRECTORY_NODE/
189 B_SYMLINK_NODE) result false.
194 Location: GetNextDirents()
195 Description: Crashs when passing a NULL buffer.
201 Description: Return status_t instead of void. Fail, if Fetch() has already
208 Description: Crashs when pushing B_CONTAINS/B_BEGINS/ENDS_WITH on an empty
214 Location: PushUInt64()
215 Description: Doesn't work. Predicates constructed using it are invalid.
220 Location: Get/SetPredicate()
221 Description: Crash when passing a NULL BString/char*.
226 Location: SetVolume()
227 Description: Crashs when passing a NULL BVolume.
232 Location: GetNextEntry/Ref()
233 Description: Crash when passing a NULL BEntry/entry_ref.
238 Location: {Get,Set}LongDescription()
239 Description: Crashes when passed a NULL description
244 Location: GetLongDescription()
245 Description: The contents of the description string are modified even if
251 Location: SetShortDescription()
252 Description: When passed a NULL description, doesn't crash, but does
253 appear to make the result of following calls to SetShortDescription
254 unreliable (sometimes they work, sometimes they don't).
260 Description: R5: The maximal MIME string length, BMimeType accepts is
261 B_MIME_TYPE_LENGTH *not* including terminating null. Note, that
262 app_info reserves only B_MIME_TYPE_LENGTH chars for the
264 OBOS: That's why we support strings that fit into a buffer of
265 size B_MIME_TYPE_LENGTH only. This is consistent with the use
266 of the other *_LENGTH constants.
271 Location: SetAppHint()
272 Description: The entry_ref passed to SetAppHint() must be valid but is not
273 required to refer to a file that actually exists; furthermore,
274 if it does exist, the MIME type of the file is not required to
275 match the BMimeType object's type.
281 Description: The BBitmap passed to BMimeType::SetIcon() must be in the B_CMAP8
282 color space, or the application will crash. We should remember
283 to be smarter about this.
289 Description: The BBitmap passed to BMimeType::GetIcon() must be in the B_CMAP8
290 color space. If not, the call returns B_OK but doesn't actually
291 modify the bitmap. We should remember to be smarter about this.
296 Location: IsValid(const char*), GetSupertype(), Contains()
297 Description: Crash when passing NULL.
302 Location: {Get,Set}IconForType(char*, BBitmap*, icon_size)
303 Description: Passing NULL as the first parameter is the same as calling
304 {Get,Set}Icon() with the second two parameters (i.e. {gets,sets}
305 the icon for the type itself).
310 Location: SetFileExtensions()
311 Description: Passing a NULL message does not clear the File Extensions field
312 for the MIME type as indicated by the Be Book; instead, it crashes
318 Location: GetFileExtensions()
319 Description: A B_STRING_TYPE field of name "type" is *added* to the result
320 containing the MIME type of the BMimeType object. Since the
321 BMessage passed to SetFileExtensions() appears to be simply
322 flattened into the appropriate attribute, the "type" field is
323 appended to any such "type" fields that may already exist in
324 the original BMessage.
330 Description: From the Be Book: "Currently, Install() may return a random value
331 if the object is already installed."
337 Description: MIME Type strings are converted to lowercase before being used
338 as filenames in the MIME database.
343 Location: Start/StopWatching()
344 Description: An invalid messenger (BMessenger::Invalid()) is fine as parameter.
349 Location: get_device_icon()
350 Description: KDL when passing a NULL buffer!
355 Location: CheckSnifferRule()
356 Description: Crashes when passing a NULL rule.
361 Location: GetSnifferRule()
362 Description: Crashes when passing a NULL BString.
367 Location: Check/Get/SetSnifferRule()
368 Description: The sniffer rules description in the BeBook deviates considerably
369 from the actual implementation:
371 - + top level ORs: (patterns...) | (patterns...) | ...
372 - - range overriding: [range1] ([range2]pattern)
373 - either no or complete ranges: (pattern1 | pattern2)
374 or ([range1]pattern1 | [range2]pattern2), but not
375 ([range1]pattern1 | pattern2)
376 - CheckSnifferRule() doesn't check some of the values, e.g.
377 ranges (negative values, or begin > end) or 0 <= priority <= 1.
382 Location: GuessMimeType(const entry_ref *, BMimeType *)
383 Description: When passing an uninitialized entry_ref, B_OK and
384 "application/octet-stream" are returned.
389 Location: SetAttrInfo
390 Description: Crashes when passed a NULL BMessage.
395 Location: GetInstalledTypes(BMessage*)
396 Description: The set of types returned by this function is determined as follows:
397 + All *entries* (files, dirs, or symlinks) in the root MIME database
398 directory treated as MIME types, except those that begin with an
399 underscore; only dirs are treated as supertypes (unless the dir's
400 META:TYPE attribute is different than its filename, in which case
401 it's not treated as a supertype).
402 + For each supertype, all *entries* (files, dirs, or symlinks) in the
403 corresponding supertype subdirectory are treated as a MIME type, except
404 those that begin with an underscore.
405 + The MIME type for supertypes is taken from the name of the supertype
407 + The MIME type for non-supertypes is take from the entry's META:TYPE
408 attribute. If the entry has no META:TYPE attribute, the MIME type is
409 derived by concatentating the name of the supertype directory to the
410 name of the entry, separated by a "/" character. Either way, the MIME
411 string returned is not checked to be valid.
416 Location: GetInstalledTypes(char *super, BMessage*)
417 Description: The set of types returned by this function is determined as follows:
418 + All *entries* (files, dirs, or symlinks) in the MIME database directory
419 corresponding to the "super" argument are treated as subtypes, *except*
420 those whose filenames begin with an underscore. It does not matter if
421 the supertype directory has a META:TYPE attribute or not.
422 + The MIME type is taken from the entry's META:TYPE attribute. If the entry
423 has no such attribute, the MIME type is derived by concatentating the name
424 of the supertype directory (the directory's META:TYPE attribute is ignored
425 if present) to the name of the entry, separated by a "/" character. Either
426 way, the MIME string returned is not checked to be valid.
431 Location: GetInstalledSupertypes(BMessage*)
432 Description: The set of types returned by this function is determined as follows:
433 + All directories in the root MIME database directory are treated as
434 supertypes (even directories beginning with an underscore).
435 + The MIME type is derived from the directory name, which is not
436 checked to be a valid MIME string.
441 Location: GetWildcardApps()
442 Description: This code:
444 status_t error = BMimeType::GetWildcardApps(&msg);
447 BMimeType mime("application/octet-stream");
448 status_t error = mime.InitCheck();
450 error = mime.GetSupportingApps(&msg);
455 Location: {Set,Get}AppHint()
456 Description: The file attribute the path of the "app hint" application
457 ("BEOS:PPATH") is of type B_MIME_STRING_TYPE instead of
464 Description: When the string stored in the "BEOS:TYPE" attribute is longer
465 than B_MIME_TYPE_LENGTH, the returned string is one character
466 shorter than the actual string.
472 Description: Crashes when passing a NULL BBitmap.
478 Description: Crashes when getting B_LARGE_ICON and passing a BBitmap with
479 B_RGB32 color space. B_MINI_ICON works just fine.
484 Location: GetSupportedTypes()
485 Description: Crashes when passing a NULL BMessage.
491 Description: Crashes when passing a NULL BMimeType.
496 Location: SetSupportedTypes(const BMessage *types, bool syncAll)
497 Description: Crashes when passing a NULL BMessage and syncAll = true.
502 Location: SetSupportedTypes()
503 Description: Sometimes installs a supported type, also when the file's
504 signature is not installed in the MIME database. This happens
505 e.g. when setting two supported types and then setting two
506 different types. The second of the new types is installed.
511 Location: SetSupportedTypes(const BMessage *types)
512 Description: Returns B_ENTRY_NOT_FOUND when the file's signature is not
513 installed in the MIME database, although the operation is
514 carried out successfully.
519 Location: SetSupportedTypes()
520 Description: Don't check whether the supplied types are valid MIME types. And
521 don't fail, if they are not. OBOS checks them.
526 Location: GetIcon(), GetIconForType()
527 Description: Crashes when getting B_LARGE_ICON and passing a BBitmap with
528 B_RGB32 color space. B_MINI_ICON works just fine.
533 Location: GetVersionInfo(), SetVersionInfo()
534 Description: Crash when passing a NULL version_info.
539 Description: Should also rename the mount point.