xref: /haiku/docs/develop/kits/storage/Annotations (revision 7457ccb4b2f4786525d3b7bda42598487d57ab7d)
1# Annotations
2# ===========
3#
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
10
11OS:          BeOS R5
12Module:      BEntry
13Location:    BEntry(const BDirectory*, const char*),
14             SetTo(const BDirectory*, const char*)
15Description: Crash when passing a NULL BDirectory.
16
17
18OS:          BeOS R5
19Module:      BEntry
20Location:    MoveTo()
21Description: Crashs when passing a NULL BDirectory.
22
23
24OS:          BeOS R5
25Module:      BPath
26Location:    BPath(const BDirectory*, const char*, bool),
27             SetTo(const BDirectory*, const char*, bool)
28Description: Crash when passing a NULL BDirectory.
29
30
31OS:          BeOS R5
32Module:      BPath
33Location:    GetParent()
34Description: Crashs when called on an uninitialized object or when passing
35             a NULL BPath.
36
37
38OS:          BeOS R5
39Module:      BPath
40Location:    operator==(), operator!=()
41Description: Uninitialized paths are not equal. An initialized path equals
42             a (const char*)NULL, an uninitialized path does not.
43
44
45OS:          BeOS R5
46Module:      BPath
47Location:    Flatten()
48Description: Crashs when passing a NULL buffer and doesn't check the buffer
49             size.
50
51
52OS:          BeOS R5
53Module:      BStatable
54Location:    destructor
55Description: Is not virtual.
56
57
58OS:          BeOS R5
59Module:      BStatable
60Location:    GetAccessTime(), SetAccessTime()
61Description: Access time unused.
62
63
64OS:          BeOS R5
65Module:      BStatable
66Location:    GetPermissions()
67Description: Doesn't filter the mode flags, thus not only the permissions are
68             returned.
69
70
71OS:          BeOS R5
72Module:      BStatable
73Location:    Get*()
74Description: Crash when passing a NULL pointer.
75
76
77OS:          OBOS POSIX
78Module:      BStatable
79Location:    SetPermissions/ModificationTime/CreationTime()
80Description: Don't work due to set_stat(FileDescriptor, StatMember)
81             limitations.
82
83
84OS:          OBOS POSIX
85Module:      kernel_interface
86Location:    set_stat(FileDescriptor, StatMember)
87Description: WSTAT_MODE, WSTAT_*TIME can't be implemented due to missing
88             fchmod()/FD time setters.
89
90
91OS:          BeOS R5
92Module:      libroot
93Location:    fchown()
94Description: fchown(file, 0xFFFFFFFF, gid) sets the UID to 0xFFFFFFFF, which
95             is a bug.
96
97
98OS:          BeOS R5
99Module:      libroot
100Location:    readdir(), fs_read_attr_dir()
101Description: 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
105             file system.
106
107
108OS:          OBOS POSIX
109Module:      kernel_interface
110Location:    read_link(FileDescriptor, char*, size_t)
111Description: Can't be implemented due to the lack of an FD readlink() version.
112
113
114OS:          BeOS R5
115Module:      BSymLink
116Location:    MakeLinkedPath(const char*, BPath*)
117Description: 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
120             exists!
121
122
123OS:          BeOS R5
124Module:      BSymLink
125Location:    MakeLinkedPath()
126Description: Crashs when passing a NULL const char* or BDirectory.
127
128
129OS:          BeOS R5
130Module:      BNode
131Location:    GetNextAttrName()
132Description: Crashs when passing a NULL buffer.
133
134
135OS:          BeOS R5
136Module:      BNode
137Location:    Read/WriteAttrString()
138Description: Crash when passing a NULL BString.
139
140
141OS:          BeOS R5
142Module:      BNode
143Location:    Lock()
144Description: 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.
146
147
148OS:          BeOS R5
149Module:      BDirectory
150Location:    BDirectory(const node_ref*), SetTo(const node_ref*)
151Description: Crash when passing a NULL node_ref.
152
153
154OS:          BeOS R5
155Module:      BDirectory
156Location:    GetEntry()
157Description: Crashs when passing a NULL BEntry.
158
159
160OS:          BeOS R5
161Module:      BDirectory
162Location:    FindEntry()
163Description: Crashs when passing a NULL BEntry.
164
165
166OS:          BeOS R5 (OBOS)
167Module:      BDirectory
168Location:    Contains(const char*, int32)
169Description: 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.)
176
177
178OS:          BeOS R5
179Module:      BDirectory
180Location:    Contains(const BEntry*, int32)
181Description: Crashs when passing a NULL BEntry.
182
183
184OS:          BeOS R5
185Module:      BDirectory
186Location:    Contains(const BEntry*, bool)
187Description: 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.
190
191
192OS:          BeOS R5
193Module:      BDirectory
194Location:    GetNextDirents()
195Description: Crashs when passing a NULL buffer.
196
197
198OS:          OBOS
199Module:      BQuery
200Location:    Push*()
201Description: Return status_t instead of void. Fail, if Fetch() has already
202             been called.
203
204
205OS:          BeOS R5
206Module:      BQuery
207Location:    PushOp()
208Description: Crashs when pushing B_CONTAINS/B_BEGINS/ENDS_WITH on an empty
209             stack.
210
211
212OS:          BeOS R5
213Module:      BQuery
214Location:    PushUInt64()
215Description: Doesn't work. Predicates constructed using it are invalid.
216
217
218OS:          BeOS R5
219Module:      BQuery
220Location:    Get/SetPredicate()
221Description: Crash when passing a NULL BString/char*.
222
223
224OS:          BeOS R5
225Module:      BQuery
226Location:    SetVolume()
227Description: Crashs when passing a NULL BVolume.
228
229
230OS:          BeOS R5
231Module:      BQuery
232Location:    GetNextEntry/Ref()
233Description: Crash when passing a NULL BEntry/entry_ref.
234
235
236OS:          BeOS R5
237Module:      BMimeType
238Location:    {Get,Set}LongDescription()
239Description: Crashes when passed a NULL description
240
241
242OS:          BeOS R5
243Module:      BMimeType
244Location:    GetLongDescription()
245Description: The contents of the description string are modified even if
246             the function fails.
247
248
249OS:          BeOS R5
250Module:      BMimeType
251Location:    SetShortDescription()
252Description: 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).
255
256
257OS:          BeOS R5 vs. OBOS
258Module:      BMimeType
259Location:
260Description: 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
263             signature field.
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.
267
268
269OS:          BeOS R5
270Module:      BMimeType
271Location:    SetAppHint()
272Description: 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.
276
277
278OS:          BeOS R5
279Module:      BMimeType
280Location:    SetIcon()
281Description: 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.
284
285
286OS:          BeOS R5
287Module:      BMimeType
288Location:    GetIcon()
289Description: 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.
292
293
294OS:          BeOS R5
295Module:      BMimeType
296Location:    IsValid(const char*), GetSupertype(), Contains()
297Description: Crash when passing NULL.
298
299
300OS:          BeOS R5
301Module:      BMimeType
302Location:    {Get,Set}IconForType(char*, BBitmap*, icon_size)
303Description: 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).
306
307
308OS:          BeOS R5
309Module:      BMimeType
310Location:    SetFileExtensions()
311Description: 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
313             the application :-)
314
315
316OS:          BeOS R5
317Module:      BMimeType
318Location:    GetFileExtensions()
319Description: 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.
325
326
327OS:          BeOS R5
328Module:      BMimeType
329Location:    Install()
330Description: From the Be Book: "Currently, Install() may return a random value
331             if the object is already installed."
332
333
334OS:          BeOS R5
335Module:      BMimeType
336Location:
337Description: MIME Type strings are converted to lowercase before being used
338             as filenames in the MIME database.
339
340
341OS:          BeOS R5
342Module:      BMimeType
343Location:    Start/StopWatching()
344Description: An invalid messenger (BMessenger::Invalid()) is fine as parameter.
345
346
347OS:          BeOS R5
348Module:      Mime.h/cpp
349Location:    get_device_icon()
350Description: KDL when passing a NULL buffer!
351
352
353OS:          BeOS R5
354Module:      BMimeType
355Location:    CheckSnifferRule()
356Description: Crashes when passing a NULL rule.
357
358
359OS:          BeOS R5
360Module:      BMimeType
361Location:    GetSnifferRule()
362Description: Crashes when passing a NULL BString.
363
364
365OS:          BeOS R5
366Module:      BMimeType
367Location:    Check/Get/SetSnifferRule()
368Description: The sniffer rules description in the BeBook deviates considerably
369             from the actual implementation:
370             - + masks
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.
378
379
380OS:          BeOS R5
381Module:      BMimeType
382Location:    GuessMimeType(const entry_ref *, BMimeType *)
383Description: When passing an uninitialized entry_ref, B_OK and
384             "application/octet-stream" are returned.
385
386
387OS:          BeOS R5
388Module:      BMimeType
389Location:    SetAttrInfo
390Description: Crashes when passed a NULL BMessage.
391
392
393OS:          BeOS R5
394Module:      BMimeType
395Location:    GetInstalledTypes(BMessage*)
396Description: 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
406               subdirectory.
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.
412
413
414OS:          BeOS R5
415Module:      BMimeType
416Location:    GetInstalledTypes(char *super, BMessage*)
417Description: 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.
427
428
429OS:          BeOS R5
430Module:      BMimeType
431Location:    GetInstalledSupertypes(BMessage*)
432Description: 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.
437
438
439OS:          BeOS R5
440Module:      BMimeType
441Location:    GetWildcardApps()
442Description: This code:
443               BMessage msg;
444               status_t error = BMimeType::GetWildcardApps(&msg);
445             is the same as:
446               BMessage msg;
447               BMimeType mime("application/octet-stream");
448               status_t error = mime.InitCheck();
449               if (!error)
450                 error = mime.GetSupportingApps(&msg);
451
452
453OS:          BeOS R5
454Module:      BNodeInfo
455Location:    {Set,Get}AppHint()
456Description: The file attribute the path of the "app hint" application
457             ("BEOS:PPATH") is of type B_MIME_STRING_TYPE instead of
458             B_STRING_TYPE.
459
460
461OS:          BeOS R5
462Module:      BNodeInfo
463Location:    GetType()
464Description: 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.
467
468
469OS:          BeOS R5
470Module:      BNodeInfo
471Location:    GetIcon()
472Description: Crashes when passing a NULL BBitmap.
473
474
475OS:          BeOS R5
476Module:      BNodeInfo
477Location:    GetIcon()
478Description: Crashes when getting B_LARGE_ICON and passing a BBitmap with
479             B_RGB32 color space. B_MINI_ICON works just fine.
480
481
482OS:          BeOS R5
483Module:      BAppFileInfo
484Location:    GetSupportedTypes()
485Description: Crashes when passing a NULL BMessage.
486
487
488OS:          BeOS R5
489Module:      BAppFileInfo
490Location:    Supports()
491Description: Crashes when passing a NULL BMimeType.
492
493
494OS:          BeOS R5
495Module:      BAppFileInfo
496Location:    SetSupportedTypes(const BMessage *types, bool syncAll)
497Description: Crashes when passing a NULL BMessage and syncAll = true.
498
499
500OS:          BeOS R5
501Module:      BAppFileInfo
502Location:    SetSupportedTypes()
503Description: 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.
507
508
509OS:          BeOS R5
510Module:      BAppFileInfo
511Location:    SetSupportedTypes(const BMessage *types)
512Description: 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.
515
516
517OS:          BeOS R5
518Module:      BAppFileInfo
519Location:    SetSupportedTypes()
520Description: Don't check whether the supplied types are valid MIME types. And
521             don't fail, if they are not. OBOS checks them.
522
523
524OS:          BeOS R5
525Module:      BAppFileInfo
526Location:    GetIcon(), GetIconForType()
527Description: Crashes when getting B_LARGE_ICON and passing a BBitmap with
528             B_RGB32 color space. B_MINI_ICON works just fine.
529
530
531OS:          BeOS R5
532Module:      BAppFileInfo
533Location:    GetVersionInfo(), SetVersionInfo()
534Description: Crash when passing a NULL version_info.
535
536
537Module:      BTest
538Location:    SetName()
539Description: Should also rename the mount point.
540Priority:    medium
541
542
543