History log of /haiku/src/kits/storage/
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
1ed08f58 01-Jun-2020 Adrien Destugues <pulkomandy@pulkomandy.tk>

Speed up BResource loading

The code to parse the resource table reads one entry at a time because
the table size isn't known. This resulted in a lot of read syscalls,
each reading just 12 bytes. Use a BBufferIO to buffer these and reduce
the number of syscalls. This helps especially when there are lot of
resources, for example in libbe with all the country flags.

It also removes some spam from strace output for all these read calls.

Change-Id: Ib165a0eacc2bc5f3d319c22c2fac4f439efbdef2
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2858
Reviewed-by: Rene Gollent <rene@gollent.com>

e1b7c1c7 19-Apr-2020 Kyle Ambroff-Kao <kyle@ambroffkao.com>

storage/SymLink: Fix Be API regression in ReadLink

After this patch, "UnitTester BSymLink" passes.

BSymLink::ReadLink() in BeOS would always return the length of the
link unless an error occurred. Before this patch, Haiku instead seemed
to emulate posix readlink() behavior, returning the number of bytes
copied into the output buffer.

BeOS also did not guarantee that the string written into the output
buffer is NULL terminated if the output buffer cannot contain the
entire link contents, but the Haiku implementation does since it is is
a basic safety issue.

This patch fixes this and updates the Haiku API docs to describe the
behavior explicitly.

Fixing this required changing behavior in bfs_read_link, which
required changes in many more places.

* Don't return B_BUFFER_OVERFLOW if the provided buffer is not large
enough to hold the link contents.
* Update documentation to clearly describe behavior.

* Change bfs_read_link() to always return the link length. This is
called by common_read_link in the VFS, which is called by

* Update the implementation of read_link for these filesystems. Some
of them were incorrect, and some had just copied the posix behavior of
bfs from before this patch.
* Use user_memcpy in ext2_read_link()
* Use user_memcpy in nfs fs_read_link()
* Use user_memcpy in reiserfs StreamReader::_ReadIndirectItem and
* Remove unused method Volume::ReadObject in reiserfs.

* Update UnpackingLeafNode::ReadSymlink and
PackageSymLink::ReadSymLink() to set the bufferSize out parameter to
the symlink length. Both of these are called by
* Use user_memcpy

* netfs seems mostly unimplemented. Added a FIXME note for future
implementers so that they know to implement the correct behavior.

* readlinkat() was just wrapping _kern_read_link() because before this
patch it had expected posix behavior. But now it does not, so we
need to return the number of bytes written to the output

* Update _kern_read_link() in the compatibility code to emulate the
Haiku behavior on the host system. This is done by using an
intermediate buffer that is guaranteed to fit the link contents and
returning its length. The intermediate buffer is copied into the
output buffer until there is no more room.

* This patch also resolves some test failures similar to those
resolved in ee8cf35f0 which fixed tests for BNode. The tests were
failing because Haiku's error checking is just better.

BeOS allowed constructing a BSymLink with BSymLink(BDirectory*,
const char*) with the entry name of "". The same is true of the
equivilant SetTo() method. The BSymLink object will appear valid
until you attempt to use it by, for example, calling the ReadLink
method, which will return B_BAD_VALUE.

Haiku does a more appropriate thing and returns B_ENTRY_NOT_FOUND,
for this constructor and the equivilant SetTo(BDirectory*, const
char*) method. This patch fixes these test assertions to match Haiku

* Add notes for future filesystem driver implementers to call this
mistake when implementing fs_vnode_ops::read_symlink.

* Fix documentation for fs_vnode_ops::read_symlink

Change-Id: I8bcb8b2a0c9333059c84ace15844c32d4efeed9d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2502
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Reviewed-by: Axel Dörfler <axeld@pinc-software.de>

992ae400 18-Jan-2020 Murai Takashi <tmurai01@gmail.com>

Fix catching by value

Pointed out by LGTM.
Change-Id: I223655c728305f6f45b3738553da5b7d7a69e8c8
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2134
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>

65413546 15-Jan-2020 Kyle Ambroff-Kao <kyle@ambroffkao.com>

support/BPath: Flatten should work on empty BPath

BPath::Flatten() on an empty path returns B_OK in BeOS R5, just
writing an empty entry_ref to the povided buffer. The Haiku
implementation has some additional validation that causes B_NO_INIT to
be returned instead.

This patch attempts to recreate the same behavior of BeOS in this

* Don't check for initialization in BPath::Flatten(). Instead,
just write an empty entry_ref to the provided buffer if the BPath is
* Fix estimation of expected size when testing the return value of
* Clean up warning by removing unecessary forward-declaration of

Change-Id: I88880cbb298bdcb594c9c8fef48314165c49e9e5
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2115
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Reviewed-by: Axel Dörfler <axeld@pinc-software.de>

f1271b64 19-Nov-2019 Axel Dörfler <axeld@pinc-software.de>

BPath: Removed superfluous term

7bdc1a19 29-Jul-2019 Adrien Destugues <pulkomandy@pulkomandy.tk>

PVS V522: PathMonitor: NULL pointer dereference

Change-Id: I77df9c18960eee0183145441d3a1bd4ceb112147
Reviewed-on: https://review.haiku-os.org/c/1662
Reviewed-by: waddlesplash <waddlesplash@gmail.com>

e081b9cd 17-Jul-2019 Murai Takashi <tmurai01@gmail.com>

PVS V611: Use delete [] for memory allocated by new [].

Change-Id: I712350ae7f742aaa8e0ea58186265fac4bbac73e
Reviewed-on: https://review.haiku-os.org/c/1627
Reviewed-by: waddlesplash <waddlesplash@gmail.com>

9d06690e 11-Jul-2019 Augustin Cavalier <waddlesplash@gmail.com>

userland: Pass more sizes with ioctls where we can.

No "functional" change intended.

ebb0db62 04-Jul-2019 Augustin Cavalier <waddlesplash@gmail.com>

kits: Only export private dummy copy constructors for R5 ABI.

Fixes #546 (after all these years!)

a1ad8af6 24-May-2019 Augustin Cavalier <waddlesplash@gmail.com>

Change a number of sprintf to snprintf.

Fixes a number of -Werrors about format overflow from GCC 8.

f1fafe31 12-Apr-2019 Augustin Cavalier <waddlesplash@gmail.com>

kernel/OS.h: Include sys/types.h instead of pthread.h.

This avoids polluting the namespace significantly. Also adjust
all files which depended on this behavior to include pthread.h

1342ec2c 24-Jan-2019 Murai Takashi <tmurai01@gmail.com>

Storage Kit: Fix PVS 692

Merge two if statements that has same conditional expressions
at line 198 and 201.

Change-Id: I797a77d7f2b88ae2cacd8569fdd09c0d1a19d038
Reviewed-on: https://review.haiku-os.org/c/915
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>

9effbd7e 15-Dec-2018 Augustin Cavalier <waddlesplash@gmail.com>

Remove some unused cruft from the early days.

These lines were added in 2002...

901de869 14-Dec-2018 Augustin Cavalier <waddlesplash@gmail.com>

BDirectory: Rewrite some functions for clarity.

No functional change intended. Whoever wrote these functions before
seems to have been allergic to more than one "return" statement
in a function...

26d14a31 14-Dec-2018 Augustin Cavalier <waddlesplash@gmail.com>

BDirectory: GetNextEntry() should unset entry when one is not found.

Fixes #1692.

5475c081 15-Oct-2018 Murai Takashi <tmurai01@gmail.com>

AddResource(): use index instead of count

In AddResource(), parameter 'index' is not used.
It seems AddItem() use index instead of count.

Change-Id: I997ac96b7d32c5705606cdbf23c7fd71550c9aa6
Reviewed-on: https://review.haiku-os.org/630
Reviewed-by: Rene Gollent <rene@gollent.com>

af567e32 13-Oct-2018 Murai Takashi <tmurai01@gmail.com>

storage_support.cpp: add NULL check

check_path_name() had NULL check of path, but its result was not used.
So, add if statement to return B_BAD_VALUE when path is NULL.

Change-Id: I8ceec5d592267bf0f00f606eba44c0ecaef5a209
Reviewed-on: https://review.haiku-os.org/628
Reviewed-by: waddlesplash <waddlesplash@gmail.com>

906af5f5 06-Oct-2018 Augustin Cavalier <waddlesplash@gmail.com>

storage: When fs_mount_volume returns < 0, it's a status_t.

The "mount" command which calls fs_mount_volume direclty handled this
properly, but this class did not; which meant that user-visible error
messages about partitions failing to mount just said "general system error"
instead of the real one.

Fixes #14540.

9216fc01 18-Jun-2018 Augustin Cavalier <waddlesplash@gmail.com>

More class/struct mixup fixes.

Spotted by Clang.

cd6365c7 17-May-2018 Jérôme Duval <jerome.duval@gmail.com>

style fixes

b08627f3 04-May-2018 Murai Takashi <tmurai01@gmail.com>

Fix catching polymorphic type by value

Replace catching polymorphic type std::bad_alloc 'by value'
with 'by reference'.
Pointed by gcc8

b6f76ebe 09-Feb-2017 Augustin Cavalier <waddlesplash@gmail.com>

s/OpenBeOS License/MIT License/ universally, as they're the same thing.

Fixes #8681.

4419d699 22-Dec-2016 Jessica Hamilton <jessica.l.hamilton@gmail.com>

partitioning: pass along reference to parent when uninitializing.

* Fixes problems with setting the partition name after uninitializing
a partition in DriveSetup. Previously, UninitializeJob() was
followed by SetStringJob(), but the kernel was updating the
change counter for the parent partition when uninitializing a
partition, leading to SetStringJob() having an incorrect change
counter for the parent partition. Now the parent change counter
will be correct when SetStringJob() runs.

3db31932 07-Dec-2016 John Scipione <jscipione@gmail.com>

BNode: CID 602323 explicitly ignore fCStatus return value in ctor

This is what it this whole push was all about

f901d7f5 10-Dec-2016 Adrien Destugues <pulkomandy@pulkomandy.tk>

Revert BNode changes resulting in non bootable system

Revert "BNode: CID 602323 explicitly ignore fCStatus return value in ctor"
Revert "BNode: Set fCStatus in SetTo() explicitly"
Revert "BNode: Style fixes, see below for details"

This reverts commit ede463195dee8536628c54ee6a4a888c0683a83f.
This reverts commit 6e3445098abd1d1e4cca69ba2d959fe74fe2cb1b.
This reverts commit 89c0b71c9a5acdbdb4543f025f64937bfbd893e3.

We are due for a release soon. Please keep things working.

ede46319 07-Dec-2016 John Scipione <jscipione@gmail.com>

BNode: CID 602323 explicitly ignore fCStatus return value in ctor

This is what it this whole push was all about

6e344509 07-Dec-2016 John Scipione <jscipione@gmail.com>

BNode: Set fCStatus in SetTo() explicitly

instead of setting it in _SetTo() and then again in SetTo()

fCStatus could be set even fewer times but this is a good compromise
(logically, performance wise it is not an issue).

Update copyright, add myself to Authors

89c0b71c 07-Dec-2016 John Scipione <jscipione@gmail.com>

BNode: Style fixes, see below for details

Remove superfluous parens
Rename result variable to bytesWritten
Sync() Unwrap ternary style fix (for consistency)
* Shouldn't this return fCStatus instead of B_FILE ERROR?
* BeBook says "returning B_OK on success and an appropriate error message otherwise."
* Has returned B_FILE_ERROR since "it is accomplished ..."
Rename result variable to bytesWritten (again)
Remove superfluous space
explictly cast status_t to ssize_t
Remove superfluous parens, remove space, add newline
Explicitly cast status_t to ssize_t (again)
WriteAttrString() cleanup
* rename error to result
* rename sizeWritten to bytesWritten (consistency and clarity)
* check if error cede from WriteAttr and cast to status_t
* > not entirely style but functionaly same
* if length is different then written return B_FILE_ERROR
* > not a style change but a very minor functional change
* add some comments
Tiny documentation fix precede vars with \a
More style fixes
* Rename error to result
* Put parens around conditional of ternary instead of whole thing
* Compare against NULL explicitly
* Don't set fCStatus here, we're going to set it in the calling function instead
* > note that Unset() sets fCStatus to B_NO_INIT but that's ok
80 char limit style fix
More style fixes and don't set fCStatus
* remove superfluous parens
* compare ref to NULL explicitly
* > Also don't set fCStatus here since we will do that in calling function
Unset() sets fCStatus to B_NO_INIT but that's ok
Unwrap ternary style fix (consistency)
Rename error to result (again)

1674f60d 02-Nov-2016 Adrien Destugues <pulkomandy@pulkomandy.tk>

Implement uninitialization for GPT

This makes it possible to format a GPT drive back to MBR without too
much effort.

Fixes #8823.

0dbb85e2 09-Oct-2016 Adrien Destugues <pulkomandy@pulkomandy.tk>

Style fix

069c5697 09-Oct-2016 Adrien Destugues <pulkomandy@pulkomandy.tk>

Fix incorrect use of _SendMonitorUpdate

Icon size is only a boolean here (true for a large icon, false
otherwise). Using B_LARGE_ICON directly is not appropriate.

As found by Murai Takashi, but there was a second case in the same file
which I also fixed.

ticket : #12955

213ddbf6 14-May-2016 Mark Hellegers <mark@firedisk.net>

ResourceFile: Handle version info in resource in other endianness than host.

Fixes #12779.

Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
Includes some minor whitespace fixes by me.

d3628dcd 10-Nov-2015 John Scipione <jscipione@gmail.com>

IK: Move CheckNodeIconHintPrivate to Tracker

* Move BPrivate::BNodeInfo::CheckNodeIconHintPrivate() to Tracker's
Model class.
* Rename HasVectorIconHint(BNode*) to CheckNodeIconHint(BNode*).
and make it check not only for vector icons but also if you have
BOTH large and mini icons.
* Replace instances of CheckNodeIconHintPrivate() with the newly
created CheckNodeIconHint().

ab306fb8 09-Nov-2015 Michael Lotz <mmlr@mlotz.ch>

BPathMonitor: Fix locking order reversal introduced in 8599f4b.

The sLocker was used as an outer lock with the sLooper locked within.
The sLocker therefore can't be used within MessageReceived() as that
could lead to deadlocks due to reversal of the locking order.

Instead of two locks, just use locking the looper for all serialization.
While this has a higher overhead to using a BLocker (due to the looper
list locking and lookups) this shouldn't be too problematic.

c869b2bb 07-Nov-2015 Michael Lotz <mmlr@mlotz.ch>

BPathMonitor: Remove unused headers, some whitespace cleanup.

8599f4b3 07-Nov-2015 Michael Lotz <mmlr@mlotz.ch>

BPathMonitor: Lock on incoming node monitor messages.

The lock was only acquired when paths to watch were added or removed,
protecting the data structures against concurrent modification due
to addition/removal of entries by the API user.

Locking is also required for node monitor messages since these can
trigger the data structures to be modified (due to recursive watching
and new directories becoming available or due to resyncing of modified
ancestor chains).

Previously it was possible to corrupt the data structures when node
monitor messages were received while still starting to watch a directory
structure. This was especially likely in the case of watching devfs
directories, as accessing these can trigger device scanning which in
turn could possibly add new device entries. Either the path monitor
looper or the API user would then trip over the corrupted data

Probably fixes #11280. Although I was only able to reproduce crashes
on the API side, corruption of the hash tables and corresponding endless
loops are quite plausible.

Possibly also fixes #12412 if the input_server was in the process of
starting to watch entries. It's hard to tell due to the lack of a back
trace but would fit the crashes I was able to reproduce with a synthetic
test case.

7895cfc6 26-Jul-2015 Adrien Destugues <pulkomandy@gmail.com>

PVS 114: useless check.

We return a few line above if err is != 0.

0e17424c 26-Jul-2015 Adrien Destugues <pulkomandy@gmail.com>

PVS 112: check result of memcmp against 0.

3ec68008 26-Jul-2015 Adrien Destugues <pulkomandy@gmail.com>

PVS 109: useless check

error was already checked one line above.

67d9a9cb 26-Jul-2015 Adrien Destugues <pulkomandy@gmail.com>

PVS 104: duplicate if check.

c13e346a 26-Jul-2015 Adrien Destugues <pulkomandy@gmail.com>

PVS 95-103: useless error checks

These conditions were always true, remove them.

32a6b045 26-Jul-2015 Adrien Destugues <pulkomandy@gmail.com>

PVS76: useless check of null pointer

Refactor BResources::WriteResource to return early in case of errors,
instead of checking permanently if (error == B_OK). Makes the code more
readable and removes some useless checks.

058d3b82 10-Apr-2015 Michael Lotz <mmlr@mlotz.ch>

BPathFinder: Fix leak of paths from find_paths.

2bdffa61 26-Mar-2015 Axel Dörfler <axeld@pinc-software.de>

BPathFinder::FindPaths() fixed passing flags.

* One variant of FindPaths() replaced the flags with '0'.

9965ac06 14-Sep-2014 Jessica Hamilton <jessica.l.hamilton@gmail.com>

Partition.cpp: fix function prototype.

fd7f53f0 14-Sep-2014 Jessica Hamilton <jessica.l.hamilton@gmail.com>

storage kit: don't expose the dev_t in BPartition::Mount()

Comments to #9672 agree that there's really no need to
expose the dev_t handle, thus simplifying the API.

The dev_t handle, if required, can be retrieved via
BPartition::GetVolume() instead.

8bfb30ce 22-Dec-2013 Puck Meerburg <puck@puckipedia.nl>

BPartition: Move dev_t return value to an optional parameter

Signed-off-by: Jessica Hamilton <jessica.l.hamilton@gmail.com>

3aeed660 07-Aug-2014 Jérôme Duval <jerome.duval@gmail.com>

include strings.h where appriopriate...

instead or additionally to string.h, in preparation for functions move.
* moves str[n]casecmp() functions and others to strings.h.
* strings.h doesn't include string.h anymore.
* this solves #10949

3f2239f6 08-Jul-2014 John Scipione <jscipione@gmail.com>

Storage Kit: Style fixes to mime database

* Update doxygen docs a bit, especially returns.
* Some variable renaming for consistency and clarity, err/error => result.
* Remove some dead code that isn't coming back. (code moved to IconUtils)
* OpenType() returns a status_t, put it in a status_t, not a ssize_t.
and then later create a new ssize_t to hold the read bytes read
and use that, saves a lot of casting and confusion.

9bbfee0f 07-Jul-2014 John Scipione <jscipione@gmail.com>

BNodeInfo: Style fixes

* Remove public method docs, they are in Haiku Book only.
* Format private method docs as doxygen.
* Other style fixes like explicit NULL checks.
* Remove dead code in GetIcon() that isn't coming back.
* Pointer style.

c55a0605 12-Jul-2014 Ingo Weinhold <ingo_weinhold@gmx.de>

Add private class BFdIO

Simple BPositionIO implementation using the POSIX API on a FD. In effect
similar to BFile, but more easily ported to kernel and boot loader (and
the FD is reusable).

cb5ed9c7 09-Jul-2014 Gerasim Troeglazov <3dEyes@gmail.com>

MimeType: fix SetFileExtensions

a30a4a41 18-Jun-2014 John Scipione <jscipione@gmail.com>

Style fixes to Storage Kit classes.

No functional changes intended.

* Some variable renaming for clarity and consistency.
* Pointer style fixes.
* Added private method documentation back to cpp files for some methods.

6077cad8 13-Jun-2014 Ingo Weinhold <ingo_weinhold@gmx.de>

BEntryOperationEngineBase::Entry: Add debug methods

Add GetPathOrName() and PathOrName() methods which try to get some kind
of usable path or at least a file name for the entry. Useful mainly for
debugging and error reporting cases.

9680cf0b 10-Jun-2014 Ingo Weinhold <ingo_weinhold@gmx.de>

BEntryOperationEngineBase::Entry: Add node_ref+path c'tor

902fd96c 26-Jan-2014 Ingo Weinhold <ingo_weinhold@gmx.de>

MimeInfoUpdater: Don't touch the MIME DB

Use the new SetIconForType() and SetSupportedTypes() versions and
request the MIME DB not to be updated. This changes the
update_mime_info() and mimeset (without -a/-A) behavior in that they
only modify the (application) file attributes, now. Addresses #10453.

c41356fa 26-Jan-2014 Ingo Weinhold <ingo_weinhold@gmx.de>

BAppFileInfo: Add method versions that don't touch the MIME DB

Add SetSupportedTypes() and SetIcon[ForType]() versions with an
additional bool updateMimeDB parameter. If false, the method doesn't
update the MIME DB entries for the type.

3b07762c 26-Jan-2014 Ingo Weinhold <ingo_weinhold@gmx.de>

BAppFileInfo: Coding style update

Also remove doxygen comments.

ee2974da 25-Jan-2014 Ingo Weinhold <ingo_weinhold@gmx.de>

mime/Database: Add SetIcon[ForType]() BBitmap* version

When switching AppMetaMimeCreator from BMimeType to Database the
SetIcon[ForType]() calls with a BBitmap* ended up calling the vector
icon version with the icon_size as the data size argument, thus not only
not writing the bitmap icon attributes, but also clobbering the vector
icon attribute.

c71a35bd 22-Jan-2014 Jérôme Duval <jerome.duval@gmail.com>

PathMonitor: check for NULL before dereferencing.

* should fix #10277.

c2dcc4d5 22-Jan-2014 Adrien Destugues <pulkomandy@pulkomandy.tk>

Get test_app_server to run again

* We should have the buildbots compile this to make sure it still works
* I had to split two ServerApp methods to a searate C++ file to link
them in libtestappserver.so
* some fixes related to the switch to PM and better hybrid support in
jam rules; moving of MIME stuff from registrar to storage kit, merge of
Locale Kit and ICU in libbe, and a few more.
* Modified the test_app_server hwinterface and rdef file so it is not a
background app, and the window isn't floating. Otherwise, hiding the
window would leave you without a way to recover it.

701a5d6b 20-Jan-2014 Rene Gollent <rene@gollent.com>

Resolve #10435.

Adjust Database{Location} to only attempt to create a mimetype when
actually necessary, and fail otherwise if a writable version doesn't yet
exist. Correspondingly, adjust callers such as
DatabaseLocation::DeleteAttribute(). Fixes a problem where a caller asking
to perform a mimeset could fail early due to SetSupportedTypes() attempting
to update the read-only mime database entry supplied by a package, and
consequently most of the mimeset operations would be skipped.

d0f2d828 16-Jan-2014 Pawel Dziepak <pdziepak@quarnos.org>

Merge branch 'scheduler'


f466a0b8 05-Jan-2014 noryb009 <noryb009@hotmail.com>

Fix Coverity CID 1108465: Use after free

Signed-off-by: Ingo Weinhold <ingo_weinhold@gmx.de>

77ac2d8d 17-Dec-2013 Jonathan Schleifer <js@webkeks.org>

SnifferRules.cpp: Make the arguments for operator< const.

It is used on const versions of sniffer_rule and thus it needs to be
declared with const.

35c76fab 22-Nov-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

TextSnifferAddon: Move includes out of namespaces

4981e776 22-Nov-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

TextSnifferAddon: Fix warnings

6140f897 21-Nov-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

TextSnifferAddon: Use MIME DB directly

A DatabaseLocation is passed to the constructor and used to verify that
the sniffed MIME type is installed instead of BMimeType::IsInstalled().
This makes the add-on independent of the default MIME DB.

85835e41 22-Nov-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

registrar: Move more classes to libstorage_kit_mime.a

Move MimeSnifferAddon, MimeSnifferAddonManager, and TextSnifferAddon to
libstorage_kit_mime.a, so we can reuse them.

62b164bd 21-Nov-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

BPathFinder: Add BPackageResolvableExpression initialization

Add a constructor and a SetTo() method with a
BPackageResolvableExpression parameter instead of a path. The path of
the package satisfying the expression is used.

The new functionality lives in libpackage as it uses the package kit.

0eb197d4 18-Nov-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

BPathFinder: Coding style improvements

60b39cd7 16-Nov-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

Add get_*architecture() API, extend find_path*() API

* Add get_architecture(), get_primary_architecture(),
get_secondary_architectures(), guess_architecture_for_path() to get
the caller's architecture, the primary architecture, all secondary
architectures, or the architecture associated with a specified path
* Rename the find_path*() functions to find_path*_etc() and add an
optional architecture parameter. Add simplified find_path*()
* BPathFinder: Add FindPath[s]() versions with an architecture

8afbcbeb 05-Nov-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

Add class BPathFinder

It's a more convenient C++ wrapper for the new find_path*() C functions.

a712cdd0 05-Nov-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

image.h: Add B_{APP,CURRENT}_IMAGE_SYMBOL macros

* Those can be used in cases where a pointer to an image symbol is
* Adjust BResources::SetToImage() accordingly.

916be2df 16-Oct-2013 John Scipione <jscipione@gmail.com>

Consolidate adding add-on directories

This builds off of hrev46243 adding add-on directories all in one place
in AddOnMonitorHandler instead of repeating the code 3 times in
IndexServer, AddOnManager, and MediaAddOnServer.

The safe mode checking in InputServer is now redundant since it all
gets funneled into AddOnMonitorHandler::AddAddOnDirectories()
and the safe mode flags are checked there.

We should probably remove the InputServer::SafeMode() method, but,
I didn't want to break anything that depended on it so I left it.

38fa81bf 03-Oct-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

Remove B_COMMON*_DIRECTORY and kCommon*Directory constants

* This does intentionally break source compatibility, so that a review
of concerned code is forced.
* Binary compatibility should be maintained in most cases. The values
of the constants for the writable directories are now used for the
writable system directories. The values for the non-writable
directories are mapped to "/boot/system/data/empty/...", an empty or
non-existent directory, so that they will simply be skipped in search
paths. Only code that explicitly expects to find something in a
B_COMMON_* directory, will fail.

4b7e2196 03-Oct-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

Remove /boot/common for good

* Remove support for the "common" installation location from packagefs,
package kit, package daemon, package managers.
* Rename the B_COMMON_*_DIRECTORY constants referring to writable
directories to B_SYSTEM_*_DIRECTORY.
* Remove/adjust the use of various B_COMMON_*_DIRECTORY constants.
I'm sure some occurrence still remain. They can be adjusted when the
remaining B_COMMON_*_DIRECTORY constants are removed.

c8f47aea 26-Sep-2013 Rene Gollent <anevilyak@gmail.com>

Fix build.

0ee677e7 26-Sep-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

Add BRemoveEngine

Similar to BCopyEngine, but it (surprise!) removes an entry.

4cf3529c 26-Sep-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

BCopyEngine: Add base class BEntryOperationEngineBase

It contains a helper class Entry, which allows to generalize the
BCopyEngine::CopyEntry() parameters.

cf70d345 12-Sep-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

Merge remote-tracking branch 'haiku/master' into package-management

This reverts 8f7f28a7c3db28711920ad5d15df401fae90bcf1 (OpenGL: Upgrade
Mesa 9.2).


617be97d 27-Aug-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

Add private storage kit class BCopyEngine

It provides the functionality to copy file system entries (also
recursively). The code originates from the copyattr sources. Some
copyattr specific functionality has been removed and the code has been
adjusted for library use (i.e. no exit()s or fprintf()s). An optional
controller object can be set to customize the behavior.

418071ba 17-Aug-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

MIME DB support: avoid static initialization order issue

040a8141 05-Aug-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

Add node_ref::operator <

Moved from VirtualDirectoryManager. Defining the operator static doesn't
work with gcc 4 and it's useful to have globally available anyway.

a36a1666 04-Aug-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

MergedDirectory: missing include

b0944c78 01-Aug-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

More work towards hybrid support

* All packaging architecture dependent variables do now have a
respective suffix and are set up for each configured packaging
architecture, save for the kernel and boot loader variables, which
are still only set up for the primary architecture.
and TARGET_LIBSTDC++ are set to the respective values for the primary
packaging architecture by default.
* Introduce a set of MultiArch* rules to help with building targets for
multiple packaging architectures. Generally the respective targets are
(additionally) gristed with the packaging architecture. For libraries
the additional grist is usually omitted for the primary architecture
(e.g. libroot.so and <x86>libroot.so for x86_gcc2/x86 hybrid), so that
Jamfiles for targets built only for the primary architecture don't
need to be changed.
* Add multi-arch build support for all targets needed for the stage 1
cross devel package as well as for libbe (untested).

7f98c665 27-Jul-2013 Murai Takashi <tmurai01@gmail.com>

Fix double free

Signed-off-by: Ingo Weinhold <ingo_weinhold@gmx.de>

c09ec54a 01-Jul-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

Fix MIME type creation error

DatabaseLocation::OpenOrCreateType(): BNode::WriteAttr() returns the
number of bytes written, not just an error code., so we erroneously
reported an error on success.

Fixes the first part of #9845.

207389a0 30-Jun-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

BResources::SetTo(): try opening read-only on error

Fixes #9843.

e19f9091 29-Jun-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

BPathMonitor: add "from path" to B_ENTRY_MOVED notifications

b5b9388a 29-Jun-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

Add C++ API for driver settings

Copied from the userlandfs utility classes, adjusted coding style, did
some renaming and small interface changes.

04382d49 27-Jun-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

BPathMonitor: rewrite

This resolves all issues the test suite uncovered. It should also deal
with hard links correctly, though that hasn't been tested. Still
unsupported are:
* changes due to mounting/unmounting a volume,
* tracking of symlinks in the path components.

38afe232 23-Jun-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

BPathMonitor: pass BMessenger by reference

7b198d81 23-Jun-2013 Ingo Weinhold <ingo_weinhold@gmx.de>


Stick to the nomenclature generally used in the public API.

3209bc40 22-Jun-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

BPathMonitor: PathHandler::_NotifyTarget(): simplify

* Add optional entry_ref return parameter to _HasFile().
* Simplify _NotifyTarget() by using _HasDirectory() and _HasFile().

77ca66cd 20-Jun-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

BPathMonitor: make the node watching mechanism configurable

Add inner class BWatchingInterface and method SetWatchingInterface().
This abstracts the calls to watch_node() and stop_watching(), thus
making it possible to use the path monitor in Tracker.

ad1875fd 20-Jun-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

BPathMonitor: use pthread_once for initialization

6ca95bd8 20-Jun-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

PathMonitor.cpp: some style cleanup

2752612b 19-Jun-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

BMergedDirectory::GetNextDirents(): fix end-of-list return value

826a109f 09-May-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

MimeInfoUpdater: Fix is_shared_object_mime_type()

The comparison must be case insensitive.

5fb33483 08-May-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

MimeEntryProcessor: Add DoRecursively()

While Do() only process the specified entry, DoRecursively() also
recurses into directories.

865ab281 08-May-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

Pull class MimeInfoUpdater out of UpdateMimeInfoThread

* Pull out base class MimeEntryProcessor out of AppMetaMimeCreator.
* Pull class MimeInfoUpdater out of UpdateMimeInfoThread and derive it
from MimeEntryProcessor.
* MimeInfoUpdater: Instead of BMimeType::GuessMimeType(), use
Database::GuessMimeType() directly.

57a7a6b9 07-May-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

mime/database_support: Make buildable for host platform

ed92790c 07-May-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

mime/Database::Install(): Fix subtype without supertype case

If the supertype directory for a given subtype didn't exist yet, the
method would fail.

dcb21588 07-May-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

storage/mime: Some host platform build fixes

b6a89f41 07-May-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

Pull class AppMetaMimeCreator out of CreateAppMetaMimeThread

Instead of using a BMimeType to set the MIME type properties, it
operates directly on the Database object, though.

b94857b3 07-May-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

Refactor MIME DB access

* Add class DatabaseLocation. It contains a list of the MIME DB
directory paths plus methods to access type files.
* Move all low-level MIME DB access functions from
database_{support,access} to DatabaseLocation. All code that formerly
used those now requires a DatabaseLocation object. In BMimeType and in
the registrar the default object is used, but the low-level classes
can now be reused with different locations.
* Move get_icon_data() from database_access to database_support and
delete the former, which is now empty.

9cda9c99 07-May-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

Move MIME DB code back from registrar to src/kits/storage/mime

* Together with database_{access,support}.cpp it is built into a static
* Add new interfaces MimeSniffer and Database::NotificationListener for
plugging in registrar specific functionality (the sniffer add-on
support and the notification mechanism).

59a653b5 06-May-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

Support multiple MIME DB directories

Each installation location (system, common, common/non-packaged,
~/config, ~/config/non-package) can now have a read-only data/mime_db
directory. ~/config/settings/beos_mime is now named mime_db as well. The
contents of all directories makes up the MIME DB. Entries in more
specific locations shadow entries in more general locations. Only the
directory in ~/config/settings is where the registrar writes changes to.

The new layout allows packages to contribute entries to the MIME DB by
simply providing the respective files in data/mime_db. Consequently the
user settings directory is supposed to contain only the things the user
has actually changed.

Seems to work fine as far as tested. A few issues, though:
* The registrar doesn't monitor the directories yet, so it doesn't
notice entry changes due to package de-/activation.
* ATM it is not possible to remove a MIME type that is not in the user
settings directory, although the FileTypes GUI suggests that it is.
We'd have to work with white-outs, since we cannot remove the files in
the data/mime_db directories. Or, alternatively, the API has to be
extended and the FileTypes GUI adjusted to disable the "Remove" button
in such a case.

38e3973e 06-May-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

Add private class BMergedDirectory to storage kit

An arbitrary number of directories can be added, which the implemented
BEntryList interface presents as a single merged entry list. Three
different merge policies are supported which define how entries that
appear in more than one directory are treated.

25a7b01d 05-May-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

Merge branch 'master' into package-management

Additional changes:
* Add src/system/kernel/lib/zlib, which builds a kernel version of zlib,
needed by packagefs.
* BuildFeatures: Add a build feature "gcc2" to allow for easier checks.
* Referenceable.cpp: Include <OS.h> instead of <debugger.h>. The latter
is not needed and prevents building for the build platform.
* zlib/zutil.h: Fix gcc 2 build. We really should use the external
package instead.


2d8ec1d5 06-Apr-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

Add the obvious node_ref constructor

5dd07610 22-Feb-2013 John Scipione <jscipione@gmail.com>

Move BVolumeRoster docs to Haiku Book.

With this commit every class in the storage kit is now documented
in the Haiku book!

Thanks to Ingo, Axel, Vincent Dominguez, Tyler Dauwalder, and
everyone who helped document these classes.

9d5f5318 21-Feb-2013 John Scipione <jscipione@gmail.com>

Move BVolume docs to the Haiku book

434716ce 20-Feb-2013 John Scipione <jscipione@gmail.com>

Add BSymLink class docs to Haiku Book

5bff846d 19-Feb-2013 John Scipione <jscipione@gmail.com>

Move BStatable docs to Haiku Book.

6d5fae2a 15-Feb-2013 John Scipione <jscipione@gmail.com>

Move resources docs to Haiku Book

* Remove docs from Resources.cpp (leaving the brief description).
* Reformat Resources.h to style it like so many other header files.
* There is one not-entirely style based change. I renamed the outSize
parameter or the LoadResource method to _size as is our convention for out

0a9ac70a 14-Feb-2013 John Scipione <jscipione@gmail.com>

Move BQuery docs into Haiku Book.

... removing the docs from the .cpp and .h files and cleaning up as usual.

0ec23178 12-Feb-2013 Axel Dörfler <axeld@pinc-software.de>


* Removed superfluous redundant comments.

4c064a84 08-Feb-2013 John Scipione <jscipione@gmail.com>

Move documentation from Path.cpp to Path.dox

And clean it up a bit. Kept brief description in source.
* Also added Axel to authors in Path.dox and Path.cpp because his name
appears in git blame as working on the docs and code for the file.
I hope he doesn't mind.

fc982701 08-Feb-2013 John Scipione <jscipione@gmail.com>

Moved NodeMonitor docs to Haiku Book.

81c42a76 07-Feb-2013 John Scipione <jscipione@gmail.com>

Move documentation from NodeInfo into the API docs.

* Delete the docs from NodeInfo.cpp and NodeInfo.h
* I snuck a couple of style fixes into NodeInfo.cpp
* I had to make a small modification to MimeType.dox to prevent it
from overriding the docs of one of the methods in NodeInfo.dox.

44352255 01-Feb-2013 Axel Dörfler <axeld@pinc-software.de>

Fixed design issues in BPartitionParameterEditor.

* The user of an editor needed knowledge about the editor in order to make
use of it.
* Furthermore, the BPartitionParameterEditor exposed type specific
functionality that it shouldn't know anything about, either.
* We may now define a number of known parameters per editor type; right now
there is only "type" as it's needed by DriveSetup.
* Adapted all disk systems, and DriveSetup to the new API.
* Renamed CreateParamsPanel, and InitializeParamsPanel to *ParametersPanel
in DriveSetup.
* They now share a common base class AbstractParametersPanel.

b7733e06 31-Jan-2013 John Scipione <jscipione@gmail.com>

Move Mime.h documentation to the API docs.

856f538b 28-Jan-2013 Axel Dörfler <axeld@pinc-software.de>

Minor cleanup.

d0ecb6da 28-Jan-2013 Axel Dörfler <axeld@pinc-software.de>

BPartition::CanInitialize() now returns false if the size is 0.

* This should fix #9405; I cannot test it right now due to a missing

e9191cc2 22-Dec-2012 John Scipione <jscipione@gmail.com>

Add BFile documentation to the Haiku Book.

Remove the documentation from the cpp file also. Keep the brief
description as a regular comment though.

11c9f9a1 18-Nov-2012 Alex Smith <alex@alex-smith.me.uk>

Merge branch 'master' into x86_64


b2007372 12-Nov-2012 Axel Dörfler <axeld@pinc-software.de>

Added BEntry::Name() method.

* GetName() is a bad API, and should be deprecated.

9e42a44c 04-Nov-2012 Axel Dörfler <axeld@pinc-software.de>

Added BPath::IsAbsolute() method.

423d8dfe 18-Aug-2012 Alex Smith <alex@alex-smith.me.uk>

CID 714424: Operands don't affect result.

Storing size_t result of std::string::find_first_of in a uint32 then
checking against std::string::npos would never be true.

e6b3188f 01-Aug-2012 Alex Smith <alex@alex-smith.me.uk>

Merge branch 'master' into x86_64

f7010474 01-Aug-2012 Alex Smith <alex@alex-smith.me.uk>

Changed resource alignment behaviour for ELF64 binaries.

The current behaviour of aligning to the maximum value of p_align seen
is problematic for x86_64, as the default segment alignment is 2MB.
This causes all x86_64 binaries to be padded to at least 2MB when
resources are added to them. There is no need to align to p_align in
the file itself (it's only an in-memory requirement), therefore
instead just align up to an 8-byte boundary. The current behaviour is
retained for ELF32, so this won't cause any compatibility problems
(there are no existing ELF64 BeOS/Haiku binaries to worry about).

9be774b5 30-Jul-2012 Alex Smith <alex@alex-smith.me.uk>

Compilation and 64-bit fixes to libbe.so sources.

Fixed the usual issues - printf format strings, uint32 instead of
addr_t, etc. One thing that isn't so nice is several places where
BList is used to store (u)int32, these require a double cast to addr_t
then void* to silence a warning on x86_64.

84c93bfb 04-Apr-2012 Oliver Tappe <zooey@hirschkaefer.de>

Attempt at #1586 (queries not being case-insensitive for umlauts):

* adjust corresponding query predicate to use BUnicodeChar instead
of ctype-functions

Alas, this does not help as of now, since BUnicodeChar is missing
support for any codepoints above 0x9f ...

12c10314 17-Mar-2012 John Scipione <jscipione@gmail.com>

Remove MimeType docs from MimeType.cpp and cleanup style issues in that file. Create a MimeType.dox file and add the docs there.

84bfb380 15-Mar-2012 John Scipione <jscipione@gmail.com>

Update the behavior of uninitialized and NULL BMimeType objects.

* Two uninitialized BMimeType objects are considered to be equal,
this is a purposeful break from BeOS R5.

* An uninitialized BMimeType object is considered to be equal to a
BMimeType object initialized to NULL. This is a purposeful break from
BeOS R5.

* Update the doxygen documentation comments to reflect this change which
will hopefully make there way into the Haiku Book at some point.

* In BMimeType::SetTo() replace an instance of strcpy() with strlcpy()
CID #something probably.

* Store the result of a few more strlen() function in size_t instead of
int to prevent overflow bugs.

* Make sure BMimeType::GetSupertype() returns either B_OK or B_BAD_VALUE.

* Undo my previous "optimization" in IsValid() to declare ch outside the
for loop.

4b4e2164 14-Mar-2012 John Scipione <jscipione@gmail.com>

Fix another overflow bug in BMimeType

* The static toLower() method had the same overflow bug that isValid()
had. However, since it is a private static method, rather than fix the
method I replaced with a call to strcasecmp() in the operator== overload.
When this method was written strcasecmp() must not have been available.

* Declare ch outside of the the loop in IsValid() so that it only gets
initialized once.

39516707 14-Mar-2012 John Scipione <jscipione@gmail.com>

* Fix a bug where a string longer than INT_MAX can cause IsValid() to falsely
report a valid mimetype because strlen() returns a result than when stored
in an int is treated as a negative number.

* Style fixes in the same method

d4fa97f8 18-Dec-2011 John Scipione <jscipione@gmail.com>

Moved documentation for the BEntry class into a dox file to include it into the Haiku book.

2ac1eb67 18-Dec-2011 John Scipione <jscipione@gmail.com>

Move the doxygen documentation comments from src/kits/storage/Directory.cpp to docs/user/storage/Directory.dox and update it both the language, fix a few errors, and bring the syntax up to snuff. The documentation for the BDirectory class is now added to the Haiku Book.

4d5d8090 27-Nov-2011 Philippe Saint-Pierre <stpere@gmail.com>

No functional changes. Improve readability.

Thanks Axel!

8e844f63 27-Nov-2011 Philippe Saint-Pierre <stpere@gmail.com>

Fix bogus argument validation

* The comparaison couldn't ever not match. Based on the comment above the
function, I made it so that flags must contain at least one of B_WATCH_NAME,

CID 2586

323b6546 21-Nov-2011 Oliver Tappe <zooey@hirschkaefer.de>

Filtered flat import of Oliver's svn package management branch

Bring the changes that aren't package management related and the ones
that are but don't take effect as long as they are ignored by the build
system into the master.

Summary of changes:
* Introduce private header <directories.h> with constants for a good
deal of paths that should usually be retrieved via find_directory().
* Replace hard-coded paths by using find_directory() or the
<directories.h> constants (e.g. in drivers and the kernel).
* Add find_directory() constants needed for package management.
* src/apps/deskbar: BeMenu.* -> DeskbarMenu.*,
DeskBarUtils.* -> DeskbarUtils.*
* Change deskbar menu settings directory from ~/config/be to
* Other smaller cleanups, changes, and fixes.

19ae20e6 05-Nov-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Merge branch 'master' into pm-flat


6ac7032d 02-Nov-2011 John Scipione <jscipione@gmail.com>

Update the style of the Haiku Book to resemble the User Guide.
If you have never seen this before you are in for a bit of a shock.
Update the Doxyfile to 1.7.3 (the version that gets auto-generated).

Update the book.dox front page with some nice introductory text.

Add new documentation for the following classes:
BView (preliminary)

Remove redundant documentation from src/kits/storage/EntryList.cpp

Minor documentation update for the following classes:

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@43096 a95241bf-73f2-0310-859d-f6bbb57e9c96

7f1880dc 29-Oct-2011 Niels Sascha Reedijk <niels.reedijk@gmail.com>

Apply patch for ticket #8008:
* Remove BNode documentation from the source code and add it to Node.dox
* Rewrite some of the existing documents

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42986 a95241bf-73f2-0310-859d-f6bbb57e9c96

f1383bbf 10-Aug-2011 Axel Dörfler <axeld@pinc-software.de>

* Fixed build; should have been part of r42620.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42621 a95241bf-73f2-0310-859d-f6bbb57e9c96

3dfd9cb9 16-Jun-2011 Oliver Tappe <zooey@hirschkaefer.de>

Flat commit of all changes from package-management branch in svn

6031eb57 15-Jun-2011 Axel Dörfler <axeld@pinc-software.de>

* Send an initial message to handle the pending entries instead of waiting for
a whole second until the message runner kicks in.
* This should further reduce the time the mouse pointer sits uselessly on the
* This is not a fix of #917, but makes it hopefully less annoying.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42199 a95241bf-73f2-0310-859d-f6bbb57e9c96

45ec6bf3 14-Jun-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

BResources::SetToImage(): Compile conditionally based on
HAIKU_TARGET_PLATFORM_HAIKU, so the file can also be compiled for the host

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42178 a95241bf-73f2-0310-859d-f6bbb57e9c96

e53a1e0f 12-Jun-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Removed unnecessary (and broken) hack.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42136 a95241bf-73f2-0310-859d-f6bbb57e9c96

173a47a5 09-Jun-2011 Jérôme Duval <korli@users.berlios.de>

revert r41986

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42070 a95241bf-73f2-0310-859d-f6bbb57e9c96

b2dfb801 06-Jun-2011 Jérôme Duval <korli@users.berlios.de>

Second try at fixing #7572 (after r41842). Please review.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41986 a95241bf-73f2-0310-859d-f6bbb57e9c96

e1b526b9 18-Apr-2011 Jonas Sundström <jonas@kirilla.com>

Code style correction by Barret, ticket #7453. Thanks!

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41263 a95241bf-73f2-0310-859d-f6bbb57e9c96

82e7ef67 07-Mar-2011 Jonas Sundström <jonas@kirilla.com>

Add app filename localization catalog entry support to BAppFileInfo, registrar and mimeset. Need help to understand why the build-version of UpdateMimeInfoThread.cpp does not compile with the added code, currently commented out. Sorry about the arbitrary B_MIME_TYPE_LENGTH*3. Advice and review welcome.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40858 a95241bf-73f2-0310-859d-f6bbb57e9c96

4153964a 25-Feb-2011 Stephan Aßmus <superstippi@gmx.de>

Moved IconUtils.h to Interface Kit and therefor made it an "official" header. Since the class has no
virtual but only static methods, it is not so likely that binary compatibility issues may arrise
from using it in new apps. Adjusted all the Jamfiles that included the private libicon headers. Note
that it was never necessary to link against libicon.a, since it's part of libbe anyway. There was one
instance where that was done. Hopefully it does not break the build, but I did this change a while ago,
tested it and then the harddrive began failing.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40679 a95241bf-73f2-0310-859d-f6bbb57e9c96

d4f0eca6 22-Feb-2011 Jonas Sundström <jonas@kirilla.com>

Unsafe use of strncpy replaced by strlcpy. CID 2264, 2265.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40625 a95241bf-73f2-0310-859d-f6bbb57e9c96

245df7ab 09-Feb-2011 Jérôme Duval <korli@users.berlios.de>

added exFAT partition type

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40410 a95241bf-73f2-0310-859d-f6bbb57e9c96

ef83c283 22-Jan-2011 Rene Gollent <anevilyak@gmail.com>

CID 10351: Fix incorrect indentation that resulted in
DiskSystemAddOnManager::PutAddOn() being broken in various ways
due to incorrect curly brace placement. Among other things this
probably led to add-ons not being unloaded correctly when they should
have been.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40265 a95241bf-73f2-0310-859d-f6bbb57e9c96

84f05bd0 20-Jan-2011 Oliver Tappe <zooey@hirschkaefer.de>

* fix build problem on Haiku hosts caused by recent move of
ObjectList.h into public header space

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40255 a95241bf-73f2-0310-859d-f6bbb57e9c96

27d38ee9 23-Dec-2010 Marcus Overhagen <marcusoverhagen@gmail.com>

Drop into debugger if the looper can't be locked.
This gets triggered randomly by net_server.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39934 a95241bf-73f2-0310-859d-f6bbb57e9c96

c3e066cf 16-Dec-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

Replaced uses of obsolescent BReference[able] API.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39869 a95241bf-73f2-0310-859d-f6bbb57e9c96

445751e1 05-Dec-2010 Stephan Aßmus <superstippi@gmx.de>

Refactored AddOnMonitor to allow an alternative constructor which does not
yet take the AddOnMonitorHandler (and also does not Run() the looper
automatically). Added SetHandler() method which allows to set the handler
afterward. Does not require updates in existing clients.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39740 a95241bf-73f2-0310-859d-f6bbb57e9c96

4a5a077f 24-Oct-2010 Clemens Zeidler <clemens.zeidler@googlemail.com>

Add a private B_ATTR_CHANGE_NOTIFICATION flag to the open query syscall to tell the query to send notifications when an entry attribute changed and the entry stays in the query. Previously you only get created and removed messages, now you can also get updated messages. Only implement it for bfs.
Fix copy right.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39131 a95241bf-73f2-0310-859d-f6bbb57e9c96

2f3ce2bf 23-Oct-2010 Bryce Groff <bgroff@hawaii.edu>

- File system is now only displayed when the partition actually has a filesystem.
- Now checks if the DiskSystem supports initializing.
- Updated the *ParamsPanels, as well as, the Disk System add-ons to use the new storage api changes (see below).

Storage Kit:
- Simplified the parameters editor system. Now all parameter editor requests go through a single function, GetParameterEditor, and pass a B_PARAMETER_EDITOR_TYPE to request a particular parameter editor.
- Moved DiskDeviceAddOnManager.h to the headers directory, as it is now required by InitParamsPanel.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39115 a95241bf-73f2-0310-859d-f6bbb57e9c96

bfff9df5 23-Oct-2010 Clemens Zeidler <clemens.zeidler@googlemail.com>

As suggested by Ingo use a B_WATCH_VOLUME flag to tell the kernel to watch
the whole volume. Kernel part follows.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39106 a95241bf-73f2-0310-859d-f6bbb57e9c96

01929b0c 23-Oct-2010 Jérôme Duval <korli@users.berlios.de>

added a mapping for 0x83 to BTRFS

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39069 a95241bf-73f2-0310-859d-f6bbb57e9c96

d01ea8ec 20-Oct-2010 Clemens Zeidler <clemens.zeidler@googlemail.com>

Add stat fields to StatChanged hook.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39028 a95241bf-73f2-0310-859d-f6bbb57e9c96

e4644818 20-Oct-2010 Clemens Zeidler <clemens.zeidler@googlemail.com>

Fix coding style, thanks Axel.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39027 a95241bf-73f2-0310-859d-f6bbb57e9c96

9a986950 20-Oct-2010 Clemens Zeidler <clemens.zeidler@googlemail.com>

Update NodeMonitorHandler to use all haiku specific fields.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39022 a95241bf-73f2-0310-859d-f6bbb57e9c96

4d476e46 19-Oct-2010 Clemens Zeidler <clemens.zeidler@googlemail.com>

Forgot to commit this, thanks Jérôme!

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39021 a95241bf-73f2-0310-859d-f6bbb57e9c96

588b796b 29-Aug-2010 Clemens Zeidler <clemens.zeidler@googlemail.com>

Add the possibility to load all add-ons in a directory immediately.
Rename _HandlePulse to _HandlePendingEntries.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38433 a95241bf-73f2-0310-859d-f6bbb57e9c96

1f50b439 19-Aug-2010 Rene Gollent <anevilyak@gmail.com>

Make gcc2 happy.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38284 a95241bf-73f2-0310-859d-f6bbb57e9c96

2faa1532 19-Aug-2010 Stephan Aßmus <superstippi@gmx.de>

* Refactored a lot of repetitive code and made
everything more readible.
* Once I understood better how everthing is supposed
to work, I've fixed some bugs.
* The most important problem was that AddDirectory()
placed the wrong entry (resolved symlinks) into the
entry list it keeps for each directory. This resulted
in the mechanisms not working at all when an add-on
was a symlink.
* There was a hidden TODO, which would mean that moving
an add-on from one watched directory into another,
like from home/config/add-ons/... into common/add-ons/...
would drop the client application (media_server,
input_server, ...) into the debugger.
* The fFormerEntries list did not seem to serve any
purpose. Basically it would not disable add-ons
removed from a watched directory unless it changed
it's name at the same time. I've removed it completely,
since it didn't seem to be an optimization
(entry cache) either.
* Each actual add-on file is now node-monitored for
stat changes. So if you have a link in the add-on
folder, and the linked to add-on changes, it triggers
a reload of the add-on now. This will make it much
more pleasant to develop add-ons and have them affective

I tested with a fresh image, but there are no immediate
regressions I am aware of. I could imagine that messing
with certain add-ons can have a bad effect now, like
removing the keyboard input_server add-on may trigger the
keyboard to stop working immediately without an input_server
restart, but Tracker should warn before it happens.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38280 a95241bf-73f2-0310-859d-f6bbb57e9c96

3c3dac1a 18-Aug-2010 Stephan Aßmus <superstippi@gmx.de>

Fixed the build.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38238 a95241bf-73f2-0310-859d-f6bbb57e9c96

3f918dc3 18-Aug-2010 Stephan Aßmus <superstippi@gmx.de>

Fixed a race condition that could corrupt memory: Usually, clients of this
API will call AddDirectory() in whatever random thread, not in the AddOnMonitor
looper thread however. The looper thread will try to process pending node
monitor events every second which may happen concurrently to the thread
adding to the fPendingEntries list for initial processing of new directories.
Could have affected any of the AddOnMonitor clients, like media_server and

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38235 a95241bf-73f2-0310-859d-f6bbb57e9c96

c6077ae7 18-Aug-2010 Stephan Aßmus <superstippi@gmx.de>

Cleanup: No need to check the BMessenger status twice. No need to
keep the BMessageRunner message around.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38234 a95241bf-73f2-0310-859d-f6bbb57e9c96

c411bbc0 07-Jun-2010 Stephan Aßmus <superstippi@gmx.de>

Resolved TODO about recursively removing watched files and folders when a
directory is moved outside the watched hierarchy or deleted entirely. It
involves another TODO, because the generated notifications are B_ENTRY_REMOVED,
while B_ENTRY_MOVED is probably more correct.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37049 a95241bf-73f2-0310-859d-f6bbb57e9c96

89dc7e48 15-Apr-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

Added private BPositionIO derived classes BFileIO and BFileDescriptorIO which
wrap a FILE* respectively a file descriptor.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36324 a95241bf-73f2-0310-859d-f6bbb57e9c96

8f2d34d9 12-Apr-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

Fix test_app_server again due to Coding Sprint changes

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36195 a95241bf-73f2-0310-859d-f6bbb57e9c96

8bc3360b 11-Apr-2010 Stephan Aßmus <superstippi@gmx.de>

Hopefully fixed the GCC2 build without changing the workings of the code.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36151 a95241bf-73f2-0310-859d-f6bbb57e9c96

a9fb9013 11-Apr-2010 Rene Gollent <anevilyak@gmail.com>

Slight simplification and fix gcc2 build.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36150 a95241bf-73f2-0310-859d-f6bbb57e9c96

8cf2d646 11-Apr-2010 Stephan Aßmus <superstippi@gmx.de>

Fixed GCC 4 error about breaking strict aliasing rules. Hope this fix is correct,
but perhaps I am overlooking something, so please review.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36146 a95241bf-73f2-0310-859d-f6bbb57e9c96

9546aa51 21-Feb-2010 Rene Gollent <anevilyak@gmail.com>

Style cleanup.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35555 a95241bf-73f2-0310-859d-f6bbb57e9c96

cf139460 21-Feb-2010 Rene Gollent <anevilyak@gmail.com>

Initialize members for all constructors. Otherwise using those constructors can potentially crash in Unset().

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35552 a95241bf-73f2-0310-859d-f6bbb57e9c96

cee04e80 08-Feb-2010 Artur Wyszynski <aljen-mlists@o2.pl>

Fixed various errors/warnings reported by cppcheck:
* memory leaks
* resource leaks
* added const's to getters
* removed a few reundant conditions

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35433 a95241bf-73f2-0310-859d-f6bbb57e9c96

133da790 16-Jan-2010 Axel Dörfler <axeld@pinc-software.de>

* Cleanup.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35102 a95241bf-73f2-0310-859d-f6bbb57e9c96

3e6fa229 13-Jan-2010 Stephan Aßmus <superstippi@gmx.de>

Patch by Humdinger:
Switched strings to sentence case in servers and kits. This is the
case-servers+kits.diff applied from #5169. Couldn't spot any possibly
problematic changes.
Thanks a lot!

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35044 a95241bf-73f2-0310-859d-f6bbb57e9c96

861f2ade 18-Dec-2009 Axel Dörfler <axeld@pinc-software.de>

* Rewrote header.
* Cleaned up private method names as much as possible (it's probably not a good
idea to rename BStatable::set_stat() for compatibility reasons).
* Cleaned up sources.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34690 a95241bf-73f2-0310-859d-f6bbb57e9c96

125a95f1 05-Dec-2009 Axel Dörfler <axeld@pinc-software.de>

* Reduced default stable time.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34509 a95241bf-73f2-0310-859d-f6bbb57e9c96

81eee41e 01-Dec-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Don't read() the individual program and section headers, but rather read()
the respective tables at once.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34405 a95241bf-73f2-0310-859d-f6bbb57e9c96

bc0693b2 01-Dec-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* Construct the MIME data base directories lazily.
* Automatic whitespace cleanup.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34399 a95241bf-73f2-0310-859d-f6bbb57e9c96

b429df54 30-Nov-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Use pthread_once() to guard the singleton initialization.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34384 a95241bf-73f2-0310-859d-f6bbb57e9c96

4b9cf09f 29-Nov-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* Got rid of is_running_on_haiku(). It was used for the test environment,
but wouldn't work when running it on Haiku anyway. At any rate, it was
relatively expensive (uname()) and used already in the libbe
* Got rid of the non-Haiku support of main_thread_for().

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34371 a95241bf-73f2-0310-859d-f6bbb57e9c96

d3ed58a7 25-Nov-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Added ELF64 support to BResources.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34250 a95241bf-73f2-0310-859d-f6bbb57e9c96

ff4d0f1c 25-Nov-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* Style cleanup.
* Removed AutoDeleter class and use the shared one instead.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34244 a95241bf-73f2-0310-859d-f6bbb57e9c96

d0f1a687 18-Nov-2009 Stephan Aßmus <superstippi@gmx.de>

Added method BlockSize() to get the block size of the underlying file system.
Untested but with good chances to actually work.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34106 a95241bf-73f2-0310-859d-f6bbb57e9c96

d6778355 30-Sep-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* <DiskDeviceTypes.h>: Removed kPartitionTypeIntel{Primary,Logical} constants.
* Added new header headers/private/system/disk_device_types.h, which defines
the <DiskDeviceTypes.h> constants as macros and which can be used where the
constants cannot be used. The constants are defined using the macros, so now
there's only one place where the string literals should be specified.
* Use the macros in the partitioning systems. I was too lazy to also adjust the
file systems -- most of them seem to hard-code the string literal yet.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33386 a95241bf-73f2-0310-859d-f6bbb57e9c96

23f83f8c 23-Sep-2009 Stephan Aßmus <superstippi@gmx.de>

BEntry and BDirectory also needed stat related symbols defined when compiling
the test environment for GCC4.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33251 a95241bf-73f2-0310-859d-f6bbb57e9c96

32bf3ca5 23-Sep-2009 Stephan Aßmus <superstippi@gmx.de>

Added GetStat() symbol when compiling the test environment on GCC4.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33249 a95241bf-73f2-0310-859d-f6bbb57e9c96

0d44df45 29-Aug-2009 Stephan Aßmus <superstippi@gmx.de>

The code didn't follow the comment above it. For the /boot partition, a link
in / is created with the partition content name, pointing to /boot, where the
volume is actually mounted for real. The code is supposed to rename the link
in this case, not the actual folder. Added a note about the special case when
the boot volume is actually named "boot", in which case there will not be a
separate link. Then renaming /boot is prevented in the kernel now.

This commit completes the fix for ticket #4365.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32807 a95241bf-73f2-0310-859d-f6bbb57e9c96

2c69b5b6 19-Aug-2009 Axel Dörfler <axeld@pinc-software.de>

* Made the libbe_test environment basically working under Haiku - to actually
make it work, one would need to use versioning for all libbe symbols. This is
worth an 8k price per file that links against libbe.so, so I didn't want to
commit this as is. An alternative to this solution would be to write a
separate application that is responsible for the app_server's window. Comments
* Removed BeOS compatbility of the libbe_test stuff.
* Renamed the libbe_test targets from *haiku* to *test*, ie. libbe_haiku.so is
now called libbe_test.so, haiku_registrar is now test_registrar, etc.
* This also removes BeOS compatibility from tracker/FSUtils.cpp (all BeOS
compatibility should be removed, but I don't want to make Alexandre more work
in his branch, and it's not urgent at all).
* Replaced the former "run" scripts for the test environment with a single
run script (see updated NOTES file).
* Removed the libbe_test target from some applications - this was only to help
developing them under BeOS, and is thus no longer necessary.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32521 a95241bf-73f2-0310-859d-f6bbb57e9c96

de863b2c 28-Jul-2009 Axel Dörfler <axeld@pinc-software.de>

* Removed superfluous .notes file - if it had contained useful information, it
should have been a comment in Node.cpp anyway.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31882 a95241bf-73f2-0310-859d-f6bbb57e9c96

f75b8de3 26-Jul-2009 Axel Dörfler <axeld@pinc-software.de>

* Discarded the "parametersSize" parameter from various disk device manager
* Since we now use UserStringParameter, this fixes the missing null termination
of the parameter string, and thus bug #4045.
* Removed UserMemoryParameter, as it's no longer in use.
* Adjusted syscalls accordingly.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31779 a95241bf-73f2-0310-859d-f6bbb57e9c96

b8e5a675 23-Jul-2009 Axel Dörfler <axeld@pinc-software.de>

* Implemented missing date parsing; queries like "last_modified > %-5 minutes%"
are now working as they should.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31711 a95241bf-73f2-0310-859d-f6bbb57e9c96

8315ac24 23-Jul-2009 Axel Dörfler <axeld@pinc-software.de>

* Cleanup.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31710 a95241bf-73f2-0310-859d-f6bbb57e9c96

7f96148c 20-Jul-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Patch by Bryce Groff with changes by myself:
* Added missing name parameter to the partitioning system module child creation
and child creation validation hooks. Pass the name to them.
* Added BPartitionParameterEditor interface, which is/will be used for editing
disk system specific parameters.
* Implemented partition parameter editors for BFS initialization and Intel
partition map child creation.
* Fixed the incorrect supported child partition type iteration in the Intel
partition map add-on. It does now return actual types.
* Handle the "active" flag parameter in the Intel partitioning system module.
* DriveSetup:
- Replaced the "Create" submenu by a simple menu item. The type can now by
chosen in the dialog.
- Make use of initialization and child creation parameter editors. Some
non-generic code has been moved to the respective editor implementations
(BFS, intel partitioning system).

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31658 a95241bf-73f2-0310-859d-f6bbb57e9c96

10b5c101 16-Jul-2009 Stephan Aßmus <superstippi@gmx.de>

Reverted r31604.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31606 a95241bf-73f2-0310-859d-f6bbb57e9c96

52464b8f 15-Jul-2009 Stephan Aßmus <superstippi@gmx.de>

Couldn't get this to compile with current GCC4 on Haiku without this change,
please someone review.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31604 a95241bf-73f2-0310-859d-f6bbb57e9c96

6eb9c264 25-Jun-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Patch by Bryce Groff with changes by myself:
* Added missing creation and initialization of the child's fData.
* Name and parameters were set on the parent, not the child.
* Fixed leak on error.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31236 a95241bf-73f2-0310-859d-f6bbb57e9c96

160f2d10 17-Jun-2009 Axel Dörfler <axeld@pinc-software.de>

* Added private header defining __gUmask which is now used everywhere where
* Some cleanup in Directory.cpp, and File.cpp.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31086 a95241bf-73f2-0310-859d-f6bbb57e9c96

0bb8521b 17-Jun-2009 Axel Dörfler <axeld@pinc-software.de>

* create_directory() did not take the umask into account.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31085 a95241bf-73f2-0310-859d-f6bbb57e9c96

6a004bd3 30-May-2009 Rene Gollent <anevilyak@gmail.com>

When we dynamically create a mount point directory, add a special marker subdirectory in it so the disk system knows the directory was not created by the user. When unmounting, look for the marker and remove the mountpoint directory if found. This fixes the issue where mount / unmount / mounting a volume via Tracker would result in extra empty dirs in the rootfs. Ideally I'd rather solve this by being able to tag the mount points with attributes, but this isn't currently possible since the attribute overlay is a module and thus not available when mounting the rootfs.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30934 a95241bf-73f2-0310-859d-f6bbb57e9c96

42c9b01a 25-May-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* {BEntry,BNode}::GetStat() were still passing the BeOS struct stat size to
the syscall. Anything beyond st_mtim was therefore not filled in. Fixes
the incorrectly shown creation times in Tracker.
* The BStatable::GetStat() solution was not sufficient yet. We still have to
provide the old GetStat() symbol for BNode and BEntry, since those could be
used by old applications/libraries. We also still have to implement the old
GetStat() slots in the derived classes, but don't need to implement it in
the base class (was purely virtual before and is private now).
* The old BStatable::_OhSoStatable1() slot function was not implemented
correctly. Calling the virtual function at the vtable slot obviously results
in an infinite recursion. The correct implementation would make use of the
Perform() method, but Be didn't provide one for BStatable, so we have to use
the old GetStat() method. Fixed #3960.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30851 a95241bf-73f2-0310-859d-f6bbb57e9c96

bcfe344c 22-May-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* Made our struct stat POSIX compliant again -- the time_t fields have been
replaced by timespec fields. Via macros the structure is still source
compatible with the old one.
* Introduced header <compat/sys/stat.h> that defines the old stat structure
(as stat_beos) and conversion functions
* Introduced versions for [l,f]stat().
* Added symbol versions for BDirectory::GetStatFor() for sake of binary
* BStatable::GetStat(): Renamed the old method, changed its parameter to
stat_beos*, and and made it private. Added a new version (using up a
reserved vtable slot). It remains source and binary compatible.
* BRefFilter::Filter(): Changed the struct stat* parameter to struct stat_beos*
for sake of binary compatibility. This breaks source compatibility, though,
which we can't help, since the class doesn't have reserved vtable slots.
* Fixed several issues with the stat structure change, mostly adjusted uses of

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30830 a95241bf-73f2-0310-859d-f6bbb57e9c96

49fb9a2e 18-May-2009 Axel Dörfler <axeld@pinc-software.de>

* Flatten() would create an invalid entry ref if the path did not exist, or the
path was not yet initialized. It will now fail instead.
* Got rid of EBadInput - _MustNormalize() can now return an error code instead.
* Style cleanup.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30787 a95241bf-73f2-0310-859d-f6bbb57e9c96

270b97c8 10-May-2009 Stephan Aßmus <superstippi@gmx.de>

Added tracing facilities and more tracing in some error code paths.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30693 a95241bf-73f2-0310-859d-f6bbb57e9c96

acc632c7 22-Apr-2009 Stephan Aßmus <superstippi@gmx.de>

Make it clear from the API that the volume passed in is not touched by the

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30326 a95241bf-73f2-0310-859d-f6bbb57e9c96

0af6bceb 15-Apr-2009 Oliver Tappe <zooey@hirschkaefer.de>

closing #3773:
* in BEntry::SetTo and BFile::SetTo, we now support entry-refs with
absolute names, too, just like R5 does

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30183 a95241bf-73f2-0310-859d-f6bbb57e9c96

4fba3522 11-Apr-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* Removed src/kits/tracker/OpenHashTable.h. The shared version in
headers/private/shared is newer, though with small interface changes.
* Removed the unnecessary Debug.h include in
* Adjusted sources using these headers, mostly by adding missing includes.
* Lots of automatic whitespace cleanup.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30123 a95241bf-73f2-0310-859d-f6bbb57e9c96

22920adf 21-Mar-2009 Stephan Aßmus <superstippi@gmx.de>

Added a way to remove the application flags from the BAppFileInfo. The
flags would not tell anything, since B_SINGLE_LAUNCH equals 0.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29636 a95241bf-73f2-0310-859d-f6bbb57e9c96

3f78b216 18-Mar-2009 Axel Dörfler <axeld@pinc-software.de>

* Implemented a basic notification mechanism. Right now, only media changes and
device additions/removals can be monitored.
* Minor cleanup.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29582 a95241bf-73f2-0310-859d-f6bbb57e9c96

77e9b775 17-Mar-2009 Axel Dörfler <axeld@pinc-software.de>

* Cleanup, no functional change.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29573 a95241bf-73f2-0310-859d-f6bbb57e9c96

6eb09230 01-Feb-2009 Michael Lotz <mmlr@mlotz.ch>

* Resolve further warnings on GCC4.
* Enable -Werror on GCC4 builds as well (limited to the same selected targets).

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29118 a95241bf-73f2-0310-859d-f6bbb57e9c96

fb3e35fc 22-Jan-2009 Michael Lotz <mmlr@mlotz.ch>

Fixing all headers/namespaces/name lookup problems that hinder a GCC 4.3.2
build. I sure hope that this doesn't break the build for anyone else.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28992 a95241bf-73f2-0310-859d-f6bbb57e9c96

18cd67c7 22-Jan-2009 Michael Lotz <mmlr@mlotz.ch>

Add missing headers (malloc/free, string functions, memcpy, etc. undeclared).

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28982 a95241bf-73f2-0310-859d-f6bbb57e9c96

91da3218 01-Dec-2008 Rene Gollent <anevilyak@gmail.com>

Remove unnecessary length check, and add a clarifying comment.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28758 a95241bf-73f2-0310-859d-f6bbb57e9c96

4ebaf16f 01-Dec-2008 Rene Gollent <anevilyak@gmail.com>

We need to check if we have an exact match in order to match BeOS's behavior (a directory is considered to contain itself on R5). Nice catch Axel!

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28757 a95241bf-73f2-0310-859d-f6bbb57e9c96

6020e8a4 01-Dec-2008 Rene Gollent <anevilyak@gmail.com>

When comparing paths, we need to ensure that the entry's path does in fact have a path separator at the same position as the original, otherwise we incorrectly indicate containment in some cases. Fixes ticket #3186.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28754 a95241bf-73f2-0310-859d-f6bbb57e9c96

c5662f2f 28-Nov-2008 Axel Dörfler <axeld@pinc-software.de>

* Changed the StringNode to replace spaces with '*' (used with "contains",
"starts with", and "ends with") to give results that mirror those of other
search engines a bit more.
* Cleanup.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28743 a95241bf-73f2-0310-859d-f6bbb57e9c96

ac0a3e87 01-Nov-2008 Axel Dörfler <axeld@pinc-software.de>

* Turned off debug output.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28439 a95241bf-73f2-0310-859d-f6bbb57e9c96

dd68fdb5 01-Nov-2008 Axel Dörfler <axeld@pinc-software.de>

* Calmed down debug output.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28436 a95241bf-73f2-0310-859d-f6bbb57e9c96

a8e8efef 01-Nov-2008 Axel Dörfler <axeld@pinc-software.de>

* Made repairing partitions work theoretically.
* Implemented a small app "checkfs" to check partitions and put it on the image.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28435 a95241bf-73f2-0310-859d-f6bbb57e9c96

a58e2ed8 27-Oct-2008 Axel Dörfler <axeld@pinc-software.de>

* Added functions FindPartitionByVolume() and FindPartitionByMountPoint()
that conveniently bridge BVolumes/mount points with BPartitions.
* Minor cleanup.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28346 a95241bf-73f2-0310-859d-f6bbb57e9c96

2ec100b7 27-Oct-2008 Axel Dörfler <axeld@pinc-software.de>

* Implemented Eject().

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28345 a95241bf-73f2-0310-859d-f6bbb57e9c96

c1e7c02d 19-Oct-2008 Axel Dörfler <axeld@pinc-software.de>

* If only files are watched, PathHandler::_AddFile() will now notify the target
when it was called from a notification function.
* This means you'll no longer have to watch (and scan) directories when you're
interested in new files alone. Maybe this functionality could be used for
other cases as well, or be activated only via an additional flag.
Opinions? Stippi? :-)
* TRACE() no goes to /dev/dprintf by default, added a bit more trace output.
* Automatic whitespace cleanup.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28237 a95241bf-73f2-0310-859d-f6bbb57e9c96

8f2be9ef 18-Oct-2008 Axel Dörfler <axeld@pinc-software.de>

* Cleanup, no functional change.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28229 a95241bf-73f2-0310-859d-f6bbb57e9c96

c7cf50a4 13-Oct-2008 Axel Dörfler <axeld@pinc-software.de>

* Added a handy BDiskSystem::SupportsWriting().

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28066 a95241bf-73f2-0310-859d-f6bbb57e9c96

38bbc957 13-Oct-2008 Axel Dörfler <axeld@pinc-software.de>

* Made the use of file devices more convenient and complete by adding
the methods IsFile() and GetFilePath() to BDiskDevice, and
* Added new syscalls to implement this functionality.
* Added new flag B_DISK_DEVICE_IS_FILE.
* Fixed wrong operator precedence assumption in the BDiskDevice class at
several places.
* Minor cleanup.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28052 a95241bf-73f2-0310-859d-f6bbb57e9c96

e84abff2 12-Oct-2008 Michael Lotz <mmlr@mlotz.ch>

Fix strange validity check in BDirectory::Contains(). If either path ends up as
invalid it must not be used.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28015 a95241bf-73f2-0310-859d-f6bbb57e9c96

260da902 12-Oct-2008 Stephan Aßmus <superstippi@gmx.de>

Rewrote BNodeInfo::GetTrackerIcon().
* Exit the function early in case of error, instead of maintaining the error
until the end.
* Separate more clearly the condition that a file type is available at all
versus not. This removes a redundancy when falling back to the generic
file icon.
* Add retrieving the icon from the super type. Even check if there is a
preferred app for the super type that supplies an icon before using the
icon of the super type itself.

Hopefully I didn't introduce new errors, but that the super type icon was not
used was the main problem I tried to fix.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27990 a95241bf-73f2-0310-859d-f6bbb57e9c96

868b22c5 12-Oct-2008 Stephan Aßmus <superstippi@gmx.de>

Honour line 80 chars per line limit.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27989 a95241bf-73f2-0310-859d-f6bbb57e9c96

062952ad 13-Sep-2008 Michael Lotz <mmlr@mlotz.ch>

Initialize fFile to NULL.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27485 a95241bf-73f2-0310-859d-f6bbb57e9c96

43209917 10-Sep-2008 Axel Dörfler <axeld@pinc-software.de>

* BDirectory::CreateDirectory() and CreateSymlink() now both use __gUmask to
correct the permission mask. This fixes bug #2670.
* Minor cleanup.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27414 a95241bf-73f2-0310-859d-f6bbb57e9c96

9fb13d58 03-Sep-2008 Stefano Ceccherini <stefano.ceccherini@gmail.com>

the virtual version is const

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27297 a95241bf-73f2-0310-859d-f6bbb57e9c96

1dfa5a7d 18-Aug-2008 Stephan Aßmus <superstippi@gmx.de>

size is actually icon_size, not data size, thanks Axel for pointing out!

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27053 a95241bf-73f2-0310-859d-f6bbb57e9c96

98667757 18-Aug-2008 Stephan Aßmus <superstippi@gmx.de>

* Puh, there was quite a confusion with variable names here, Axel.
Don't we have this "blah shadows a parameter" warning enabled?
* data was leaked in the error code path when allocating the bitmaps
* I've added a check if the provided buffer even has the right
size before copying the B_CMAP8 bitmap data into it.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27044 a95241bf-73f2-0310-859d-f6bbb57e9c96

0d37df64 18-Aug-2008 Axel Dörfler <axeld@pinc-software.de>

* The old Be version of get_device_icon() now also supports retrieving the
vector icon in case B_GET_ICON is not supported by the device anymore.
(This makes B_GET_ICON deprecated API.)
* Use B_BITMAP_NO_SERVER_LINK flag, as our bitmap is only used internally.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27036 a95241bf-73f2-0310-859d-f6bbb57e9c96

d9b93b82 18-Aug-2008 Axel Dörfler <axeld@pinc-software.de>

* The bitmap variant of get_device_icon() should now support getting all sizes
even if the icon is not available in that size (ie. is not a vector icon).

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27034 a95241bf-73f2-0310-859d-f6bbb57e9c96

aac75076 18-Aug-2008 Stephan Aßmus <superstippi@gmx.de>

* r27001 left some parameter checks which need to be ommited
for vector icons. Simplified the checks and moved them to
where the old B_CMAP8 icon is retrieved. The bitmap is allowed
to have another color space, in which case the icon data is
converted (code was already in place).
* Added a NOTE comment to how the new B_GET_VECTOR_ICON ioctl
knows about the correct buffer size for the icon data.
I've tested setting the desktop icon size to something else than
16x16 or 32x32 and it works fine now.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27032 a95241bf-73f2-0310-859d-f6bbb57e9c96

8ce6cfc9 17-Aug-2008 Axel Dörfler <axeld@pinc-software.de>

* Added two more public functions: get_named_icon().
* Implemented B_GET_ICON_NAME in get_device_icon().
* Comments welcome.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27004 a95241bf-73f2-0310-859d-f6bbb57e9c96

0eddadb9 17-Aug-2008 Maurice Kalinowski <mauricek@nowhere.fake>

fix gcc4 build

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27002 a95241bf-73f2-0310-859d-f6bbb57e9c96

06ba3f0a 17-Aug-2008 Axel Dörfler <axeld@pinc-software.de>

* Added two new ways to retrieve an icon from a device:
- B_GET_ICON_NAME: returns the name of an icon. This will then be read from
a predefined location on disk (not yet implemented). This would also allow
to add specifiers like "-boot", or "-fat|bfs|ntfs|...", and have special
icons for those.
- B_GET_VECTOR_ICON: retrieves the vector icon of a device, if any.
* get_device_icon(BBitmap*, ...) now supports other color spaces than B_CMAP8.
* Added get_device_icon(), BPartition::GetIcon(), and BVolume::GetIcon()
variants that can also retrieve the icon data directly (like
* Reenabled the previous BPartition::GetIcon(), based on a patch by
Justin O'Dell - this fixes #1391.
* Tracker's MountMenu class now uses B_RGBA32 icons, instead of B_CMAP8.
* Added vector icon to scsi_disk, and scsi_cd. The former doesn't have any
special removable icon, though.
* Header cleanup, added/updated license, whitespace cleanup.
* Marked deprecated/obsolete driver ioctls in Drivers.h.
* Removed OpenBeOS namespace in the headers I touched that still had them.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27001 a95241bf-73f2-0310-859d-f6bbb57e9c96

3f953c83 12-Aug-2008 Stephan Aßmus <superstippi@gmx.de>

Added clarifying comment for something that puzzled me at first.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26946 a95241bf-73f2-0310-859d-f6bbb57e9c96

8a0be4ed 12-Aug-2008 Stephan Aßmus <superstippi@gmx.de>

* I misunderstood the previous of adding fPath.Path() to the message. It was
meant to be able to tell which monitor the message came from. So I added it
back in. Since I used "path" already for the entry, I renamed the field to
"watched_path". No code was using it yet, so this should be ok and the
purpose more clear anyways.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26945 a95241bf-73f2-0310-859d-f6bbb57e9c96

2bf5ba05 12-Aug-2008 Stephan Aßmus <superstippi@gmx.de>

Minor style cleanups.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26944 a95241bf-73f2-0310-859d-f6bbb57e9c96

afbd081a 11-Aug-2008 Stephan Aßmus <superstippi@gmx.de>

* TRACE macro no longer needs double parenthesis.
* The global BPathMonitor looper is now always used, no more optional looper
and no more BApplication looper usage. This way we know how the looper behaves
and PathHandler::Quit() can be synchronous. In the end, the bug I was
observing was not caused by the previous asynchronous node monitor stopping,
but this should be safer anyways. When BPathMonitor::StopWatching() returns,
you have really stopped watching and not some time later.
* Introduced "FileEntry" which is an entry_ref plus node id. This is now used
instead of the node_ref for the "watched files set". The whole point
is to really be able to add the "path" field to the B_PATH_MONITOR message.
Previously, the initial path that was passed to StartWatching() was added,
regardless if the message was for an entry somewhere down the hierarchy when
watching recursively. The downside of the new method is that it uses a lot
more RAM per entry. Another option would be to store the node id of the parent
directory and iterate the directory always when in need to construct the path.
* Watching a folder recursively now really adds all the existing subfolders
as well as all the files if not watching for folders only. The tests for the
old implementation only tested what happens when the watched folder was newly
created and then subfolders were created. Those where already added by the
code. Now it also adds the subfolders of folder that appear in a watched
TODO: Remove folders and files recursively when they dissappear. More testing
for B_ENTRY_MOVED. Optimizations are possible when some information is
retrieved twice. I am also planning to add a way for the BPathMonitor user to
filter the automatically watched files/folders in B_WATCH_RECURSIVELY mode.

I grepped the entire Haiku tree for usage of BPathMonitor. Only net_server
and Mail were using it, but both in a way that is not affected by these
changes. Anyways, TextSearch works more reliable now, even for entries in

Feedback very welcome! :-)

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26936 a95241bf-73f2-0310-859d-f6bbb57e9c96

872c3d3f 11-Aug-2008 Axel Dörfler <axeld@pinc-software.de>

* Fixed the broken nodeFlags semantics in BDirectory::Contains() (they are
flags, after all).
* This fixes the "Command-Tab" ie. switch to source/header command in Pe.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26932 a95241bf-73f2-0310-859d-f6bbb57e9c96

5ef86fce 08-Aug-2008 Stephan Aßmus <superstippi@gmx.de>

* Rename the private structs to use the same scheme as for classes, which seems
to be the habbit now.
* Improve PathHandler::Quit() to delete the object in case the BMessenger was
not valid or failed to send the Quit message. This should handle the corner
case that the PathHandler's looper was already Quit(). There could still be
a race condition, although I don't know if it affects local message targets
in Haiku. I added a TODO note for that, but I believe it can be neglected.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26877 a95241bf-73f2-0310-859d-f6bbb57e9c96

f7c226f4 06-Aug-2008 Stephan Aßmus <superstippi@gmx.de>

* StartWatching() now takes an optional BLooper pointer. This looper will
then be used for receiving node monitoring messages.
* Reenabled using be_app as default BLooper if the API user does not provide
one. I think the problem that Stefano needed to work aroung in r23995 was
actually caused by the incorrect locking (an never unlocking) of the looper
before calling PathHandler::Quit().
->If I understand correctly, this code as supposed to work around the possible
situation that the looper holding those PathHandlers may have already quit,
leaving stale PathHandler pointers behind. But that case was not prevented
by the old code anyways, since one would have had to access freed memory to
even get the stale BLooper pointer. The real fix would be to store the
BLooper pointer with each PathHandler so that the possible gone-ness of
those loopers could be checked independent of accessing the PathHandler
pointer. (The whole problem is that PathHandler adds itself to the BLooper
and if the looper quits, it will free all its attached handlers.)
* Introduced a global fallback BLooper for the case that no BApplication is
running, which resolves a TODO.

All this is yet untested, but should have a good chance of working.
(Famous last words...)

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26843 a95241bf-73f2-0310-859d-f6bbb57e9c96

a9ab16e2 04-Aug-2008 Stephan Aßmus <superstippi@gmx.de>

* Move the LockLooper() call before PathHandler::Quit() into Quit().
* The B_QUIT_REQUESTED message never arrived for me unless I unlock the
BLooper again, then it works as expected.
* The B_QUIT_REQUESTED handling accessed fOwnsLooper after deleting the
(Review much welcome - I don't understand the purpose of locking the BLooper
at all before trying to use a BMessenger to send it a message.)

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26805 a95241bf-73f2-0310-859d-f6bbb57e9c96

e8f39ce9 04-Aug-2008 Stephan Aßmus <superstippi@gmx.de>

Don't choke in BPathMonitor::StopWatch(...) if the client never called
StartWatching() before and the BPathMonitor stuff is therefor not initialized.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26792 a95241bf-73f2-0310-859d-f6bbb57e9c96

b5bc41de 04-Aug-2008 Stephan Aßmus <superstippi@gmx.de>

* Use new header layout in PathMonitor.h
* Honor 80 char/line limit in PathMonitor.cpp

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26788 a95241bf-73f2-0310-859d-f6bbb57e9c96

ad50b122 26-Jul-2008 Stephan Aßmus <superstippi@gmx.de>

Use same structure of whitespace as in rest of comment.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26646 a95241bf-73f2-0310-859d-f6bbb57e9c96

d970f8e4 26-Jul-2008 Stephan Aßmus <superstippi@gmx.de>

Extended the doxygen method comment of CommitModifications() to mention
that BPartition children are recreated.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26645 a95241bf-73f2-0310-859d-f6bbb57e9c96

316bce45 26-Jul-2008 Stephan Aßmus <superstippi@gmx.de>

Small simplification.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26644 a95241bf-73f2-0310-859d-f6bbb57e9c96

3be7d009 12-Jul-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

Don't fail, when no userland add-on could be found for partition. We
won't be able to edit the partition in any way, but we shouldn't cause
the whole BDiskDevice::PrepareModifications() to fail. Should fix bug
#2470 -- haven't tested this, though.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26397 a95241bf-73f2-0310-859d-f6bbb57e9c96

cf7e57ef 06-Jun-2008 Stephan Aßmus <superstippi@gmx.de>

Small coding style fix.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25839 a95241bf-73f2-0310-859d-f6bbb57e9c96

fe760203 14-May-2008 Stephan Aßmus <superstippi@gmx.de>

GetDiskSystem() is supposed to find the system by name, it should not influence
the internal enumaration for GetNextDiskSystem(). The compiler spotted that
one actually... :-)

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25490 a95241bf-73f2-0310-859d-f6bbb57e9c96

6b202f4e 13-May-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

* Introduced new header directory headers/private/system which is supposed
to contain headers shared by kernel and userland (mainly libroot).
* Moved quite a few private kernel headers to the new location. Split
several kernel headers into a shared part and one that is still kernel
private. Adjusted all affected Jamfiles and source in the standard x86
build accordingly. The build for other architectures and for test code
may be broken.
* Quite a bit of userland code still includes private kernel headers.
Mostly those are <util/*> headers. The ones that aren't strictly
kernel-only should be moved to some other place (maybe

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25486 a95241bf-73f2-0310-859d-f6bbb57e9c96

1da9f5ce 10-May-2008 Axel Dörfler <axeld@pinc-software.de>

* Added BDiskSystem::ShortName() and everything needed to get it there.
* Added BDiskDeviceRoster::GetDiskSystem() method, that can get a disk system
by short/pretty/module name - since they should all be unique, I put them
in a single namespace, please complain if you don't like that :-)
* Cleaned up DiskSystem.h and DiskDeviceRoster.h according to the updated
header guidelines.
* Renamed ntfs pretty name from "ntfs File System" to "Windows NT File System".

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25414 a95241bf-73f2-0310-859d-f6bbb57e9c96

26791a6b 04-May-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

Changed the semantics of create_app_meta_mime(): Like update_mime_info()
it does now accept directories and doesn't ignore the "recursive"
parameter anymore.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25308 a95241bf-73f2-0310-859d-f6bbb57e9c96

fc1ca2da 25-Apr-2008 Jérôme Duval <korli@users.berlios.de>

style cleanup

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25177 a95241bf-73f2-0310-859d-f6bbb57e9c96

3dd2f066 25-Apr-2008 Bruno G. Albuquerque <bga@bug-br.org.br>

Shame on me. The node is actually unlocked in close_fd().

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25159 a95241bf-73f2-0310-859d-f6bbb57e9c96

8ce1d517 25-Apr-2008 Bruno G. Albuquerque <bga@bug-br.org.br>

From the BeBook:

Node Locking

Another feature provided by the BNode class is "node locking": Through BNode's
Lock() function you can restrict access to the node. The lock is removed when
Unlock() is called, or when the BNode object is deleted.

There is still something wrong with locking though. For example, it looks like
WriteAttr() fails on the node when we lock it (File Busy) but it should not.
The lock acquirer should be able to call WriteAttr() on it.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25158 a95241bf-73f2-0310-859d-f6bbb57e9c96

58228478 07-Apr-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

If the entry leaf name is "." or ".." we need to resolve it.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24860 a95241bf-73f2-0310-859d-f6bbb57e9c96

b4080297 26-Mar-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

Addressed memory leaks in the MIME sniffer code. Fixes bug #1660.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24604 a95241bf-73f2-0310-859d-f6bbb57e9c96

a121b8c8 24-Mar-2008 Axel Dörfler <axeld@pinc-software.de>

* Added a new flag for write stat: B_STAT_SIZE_INSECURE that allows a
file system to not fill newly created space with zeros.
BFile::SetSize() now uses this, while [f]truncate() does not. This
is only a temporary work-around until BFS supports sparse files.
* Apps that want to reserve space to fill up later should use
BFile::SetSize() for now, as this will be a lot faster than
* cache_io() and the functions below now use a special mode when you
pass in a NULL buffer: for read access, the cache is only populated
(useful for prefetching), for write access, the file is filled with
* Implemented BFS's Inode::FillGapWithZeros() using this method now.
* Removed extraneous white space.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24555 a95241bf-73f2-0310-859d-f6bbb57e9c96

1b32947d 17-Mar-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

* Aligned the semantics of the read_symlink() FS module hook with the
readlink() function. It is no longer required to null-terminate the
string, shall not fail, if the buffer is too small, and shall return
the length of the string actually written into the buffer.
* Adjusted rootfs, devfs, and bfs accordingly. Also adjusted their
read_stat() hooks to return the correct symlink length in st_size.
* Our readlink() does now comply to the standard (and BeOS).
Additionally if the buffer is big enough it is nice to non-conforming
apps and null-terminates it.
* BSymLink::ReadLink() explicitly null-terminates the string now.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24425 a95241bf-73f2-0310-859d-f6bbb57e9c96

2586d10e 09-Mar-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

CreateFile() didn't specify the B_ERASE_FILE, hence the file wouldn't be
truncated, if already existing. This problem could be experienced when
saving in Pe.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24329 a95241bf-73f2-0310-859d-f6bbb57e9c96

2e0ba90d 18-Feb-2008 Stefano Ceccherini <stefano.ceccherini@gmail.com>

We can't use the be_app looper, since it can be already locked from
another thread (for example, when quitting the app/window), and that
would cause a deadlock. Fixes bug #1645.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23995 a95241bf-73f2-0310-859d-f6bbb57e9c96

e0b3fc97 05-Feb-2008 Stephan Aßmus <superstippi@gmx.de>

IMHO these are a little better error codes. If fDelegate is NULL, it means
the BDiskDevice of a BPartiton has not been prepared for modifications. To
me, it means the initialization status of the object does not support the
operation, hence B_NO_INIT. B_BAD_DATA hints to me that I have passed invalid
data to a function.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23875 a95241bf-73f2-0310-859d-f6bbb57e9c96

5905a0ae 02-Feb-2008 Axel Dörfler <axeld@pinc-software.de>

* Fixed _{kern|user}_{read|write}[v]() functions to not move the descriptor's
file position in case an offset was specified.
* Reverted r23828-r23830 in File.cpp: don't fix the symptoms but the cause
of the problem (hey, that has to be in the kernel, right? :))
* Cleanup of File.cpp, removed OpenBeOS namespace.
* Moved user_fd_kernel_ioctl() to the section where it belongs to (that
function should be renamed, though).

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23832 a95241bf-73f2-0310-859d-f6bbb57e9c96

40da55c3 02-Feb-2008 Stephan Aßmus <superstippi@gmx.de>

* the BeBook documents WriteAt() and Write() to differ analogous to
ReadAt() and Read() with regards to the file position. Ie, WriteAt()
is not supposed to modify the data pointer.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23830 a95241bf-73f2-0310-859d-f6bbb57e9c96

835b8e68 02-Feb-2008 Bruno G. Albuquerque <bga@bug-br.org.br>

This fixes my previous fix. The position to read can be completelly random so I have to first cache the current
position before calling _kern_read() and reset it afterwards.

*NOW* this fixes bug #1200 in all cases.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23829 a95241bf-73f2-0310-859d-f6bbb57e9c96

3debfe51 02-Feb-2008 Bruno G. Albuquerque <bga@bug-br.org.br>

ReadAt() should not change the file position. Tested under R5 and Zeta. This fixes bug #1200 (Received emails are
missing attributes).

I hope nothing relies on the previously broken behaviour.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23828 a95241bf-73f2-0310-859d-f6bbb57e9c96

96418817 01-Feb-2008 Stephan Aßmus <superstippi@gmx.de>

* added a PrintToStream() method
* added optional tracing for the main operations
* fixed bad pointer arithmetic when reallocating/moving the object's data
* it was impossible to remove the very first space via _RemoveSpaces()
* added a little more variaty to error return codes for some
functions to make them a little more helpful

-> This fixes the bogus space values in DriveSetup (#1737)

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23824 a95241bf-73f2-0310-859d-f6bbb57e9c96

816fc921 17-Jan-2008 Jérôme Duval <korli@users.berlios.de>

fixed GetVolume()

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23590 a95241bf-73f2-0310-859d-f6bbb57e9c96

86914dfa 15-Jan-2008 Stephan Aßmus <superstippi@gmx.de>

* fix typo in the documentation for GetVolume()

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23539 a95241bf-73f2-0310-859d-f6bbb57e9c96

f82c11c0 11-Jan-2008 Michael Lotz <mmlr@mlotz.ch>

* Move most of MIME database support out of libbe and into registrar
* Use the (async) MessageDeliverer instead of a synchronous SendMessage in _SendMonitorUpdate

This fixes a deadlock when the message port of a MIME database watching
application gets full as documented in bug #1311.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23423 a95241bf-73f2-0310-859d-f6bbb57e9c96

27872144 08-Jan-2008 Stephan Aßmus <superstippi@gmx.de>

* VisitEachPartition() was not working correctly, terminatedEarly was not

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23292 a95241bf-73f2-0310-859d-f6bbb57e9c96

5ac3152d 10-Nov-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

* Added some debug output.
* Don't generate an uninitialize job, when there's the partition wasn't
initialized anyway (the syscall would fail in this case).

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22883 a95241bf-73f2-0310-859d-f6bbb57e9c96

54a5f0b7 10-Nov-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

Implemented BPartition::_IsModified(), so that BDiskDevice::IsModified()
does actually work now.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22882 a95241bf-73f2-0310-859d-f6bbb57e9c96

17fdd1f0 10-Nov-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

Initialize ref count.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22881 a95241bf-73f2-0310-859d-f6bbb57e9c96

53715fe0 01-Nov-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

* Got rid of the B_PARTITION_DESCENDANT_BUSY flag.
* Added CheckAndMarkBusy() and UnmarkBusy() methods to KPartition.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22801 a95241bf-73f2-0310-859d-f6bbb57e9c96

8354dac7 01-Nov-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

Folded KPhysicalPartition into KPartition. Removed the notion of shadow
partitions from the disk device manager.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22800 a95241bf-73f2-0310-859d-f6bbb57e9c96

300868ce 31-Oct-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

* Removed no longer needed disk device related syscalls
(_kern_{supports,validate}_*(), etc.).
* Adjusted the prototypes of the disk device modification syscalls.
Commented out their implementations for the time -- they'll mostly
have to be rewritten completely.
* Implemented the userland disk device jobs.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22781 a95241bf-73f2-0310-859d-f6bbb57e9c96

3ca9267c 31-Oct-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

* The BMutablePartition setters adjust the change flags accordingly.
* PartitionDelegate::Uninitialize() uninitializes the mutable partition.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22779 a95241bf-73f2-0310-859d-f6bbb57e9c96

96d028bd 29-Oct-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

Missed in the previous commit.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22768 a95241bf-73f2-0310-859d-f6bbb57e9c96

25ab0d1a 29-Oct-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

* Fixed typos in the disk device job constants.
* Added missing job classes (they don't do anything yet, though) and
completed the implementation of the job generator.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22767 a95241bf-73f2-0310-859d-f6bbb57e9c96

20b56fdd 24-Oct-2007 Stephan Aßmus <superstippi@gmx.de>

* actually initialize the static sLocker with NULL too...

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22700 a95241bf-73f2-0310-859d-f6bbb57e9c96

c70623fa 18-Oct-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

* Added base class of job classes DiskDeviceJob and job container class
* Basic synchronous implementation of BDiskDevice::CommitModifications(),
ignoring the given parameters, though.
* Some more work on DiskDeviceJobGenerator: Added class
PartitionReference which will reference a partition while the jobs are
executed. The generator manages the mapping of partitions to those
references now. Also exemplarily implemented the generation of the
* Moved support functionality to private header DiskDeviceUtils.h.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22620 a95241bf-73f2-0310-859d-f6bbb57e9c96

0cd5e043 17-Oct-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

Beginnings of the class that analyzes the changes done to a BDiskDevice
and generates jobs that perform the individual actions transforming the
current state of the disk device into the desired one. Most code was
taken and adapted from the soon to be gone kernel class
KDiskDeviceJobGenerator. The methods creating the job objects are only
stubs ATM.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22611 a95241bf-73f2-0310-859d-f6bbb57e9c96

9417631f 17-Oct-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

* Made _CountDescendants() public.
* Added private _ChildAt() and _CountChildren(), which don't ask the
delegate, thus reflecting the hierarchy as it was before changes.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22610 a95241bf-73f2-0310-859d-f6bbb57e9c96

013e7894 17-Oct-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

We need flags to track what properties of the partition change.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22609 a95241bf-73f2-0310-859d-f6bbb57e9c96

23b03456 17-Oct-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

Moved disk device API into subdirectory disk_device.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22607 a95241bf-73f2-0310-859d-f6bbb57e9c96

1573b626 17-Oct-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

* Removed the BDiskDeviceJob class. Jobs won't be generated and executed
in the kernel anymore. The respective functionality will be moved into
the userland. Depending on how we want the API user to interface with
it, we may want to reintroduce a similar class later.
* Cleared remaining references to shadow partitions.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22606 a95241bf-73f2-0310-859d-f6bbb57e9c96

8c0dd568 17-Oct-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

Added some debug output.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22604 a95241bf-73f2-0310-859d-f6bbb57e9c96

a3a0e88e 17-Oct-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

Load the disk system add-ons in PrepareModifications(). Otherwise the
delegates wouldn't be able to get them.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22603 a95241bf-73f2-0310-859d-f6bbb57e9c96

27d7c366 17-Oct-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

* Reimplemented BDiskDevice::IsModified()/
{Prepare,Commit,Cancel}Modifications() using the userland add-on
backend. IsModified() and CommitModifications() are little more than
stubs ATM.
* Made BPartition::VisitEachChild()/VisitEachDescendant() const.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22602 a95241bf-73f2-0310-859d-f6bbb57e9c96

46b93b2c 17-Oct-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

Style cleanup.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22600 a95241bf-73f2-0310-859d-f6bbb57e9c96

c9518b62 16-Oct-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

Removed some now obsolete methods.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22593 a95241bf-73f2-0310-859d-f6bbb57e9c96

fe6bd3b5 16-Oct-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

* Moved GetNextSupportedType() and IsSubSystemFor() from
BDiskSystem to BPartition and reimplemented them using the userland
add-on backend instead of syscalls. As a side effect this solves the
TODO I recently added in GetNextSupportedType().
* Reimplemented BDiskSystem::GetTypeForContentType() using the userland
add-on backend instead of a syscall.
* Moved GetTypeForContentType() and IsSubSystemFor() from
BPartitionHandle to BDiskSystemAddOn. They were misplaced.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22592 a95241bf-73f2-0310-859d-f6bbb57e9c96

d712d042 16-Oct-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

Style cleanup.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22591 a95241bf-73f2-0310-859d-f6bbb57e9c96

b62085b9 15-Oct-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

Coding style cleanup.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22587 a95241bf-73f2-0310-859d-f6bbb57e9c96

28541dea 14-Oct-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

Beginning of the integration with the new userland disk system add-on
based code. Small API changes.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22561 a95241bf-73f2-0310-859d-f6bbb57e9c96

7322bd7a 13-Oct-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

gcc 4 fix.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22548 a95241bf-73f2-0310-859d-f6bbb57e9c96

08baf63a 13-Oct-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

Decided that BPartition::ImmutableDelegate would basically be a big
collection of no-op methods, which could as well be implemented in
BPartition itself. This makes the Delegate hierarchy unnecessary:
MutableDelegate becomes Delegate, and we save a few casts as a side

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22547 a95241bf-73f2-0310-859d-f6bbb57e9c96

ade9d403 13-Oct-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

Implemented loading/unloading of add-ons.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22544 a95241bf-73f2-0310-859d-f6bbb57e9c96

350043e7 13-Oct-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

* Initialization of BPartition::Delegate is now two-phased. The first phase
builds the object hierarchy, the second will (in case of MutableDelegate)
let the disk systems do their initialization. This way the disk systems
already find a fully functional object hierarchy they can work with.
* Child creation also takes a partition name as a parameter, now.
* Implemented BMutablePartition child creation/deletion.
* The BDiskSystemAddOn/BPartitionHandle::Validate*() methods return a
status_t instead of a bool, now.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22540 a95241bf-73f2-0310-859d-f6bbb57e9c96

103ca6a3 13-Oct-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

The info about partitionable space will be provided by the userland disk
system add-ons. First work to make this class usable for them.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22539 a95241bf-73f2-0310-859d-f6bbb57e9c96

b3e7c4a4 13-Oct-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

* Added fDelegate member.
* Removed private AutoDeleter class. The shared ArrayDeleter is used instead.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22538 a95241bf-73f2-0310-859d-f6bbb57e9c96

15ed7c71 10-Oct-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

More fleshing out the disk system add-on interface and related classes.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22503 a95241bf-73f2-0310-859d-f6bbb57e9c96

98b97f96 07-Oct-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

First draft of the userland disk system add-on interface. A good deal of
functionality of the kernel add-ons will be moved into userland, which
will simplify the kernel-side significantly.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22481 a95241bf-73f2-0310-859d-f6bbb57e9c96

04adb291 07-Oct-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

Clear the user_partition_data::user_data fields before updating the
BPartition structure with the data retrieved from the kernel. For new
partitions the field is not set in the next step and later code would
use an initialized pointer.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22471 a95241bf-73f2-0310-859d-f6bbb57e9c96

7ede8e44 07-Oct-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

Added [Content]Parameters() getters.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22470 a95241bf-73f2-0310-859d-f6bbb57e9c96

11e9c398 07-Oct-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

Changed semantics of GetNextSupportedType(): It expects a pointer to the
parent (not the child) partition, now. A method with the old semantics
is probably needed, too, but before creating a child partition, one
obviously doesn't have a child to pass yet.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22469 a95241bf-73f2-0310-859d-f6bbb57e9c96

9d337ccc 07-Oct-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

Aesthetical changes.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22467 a95241bf-73f2-0310-859d-f6bbb57e9c96

aa4d8ee6 05-Oct-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

* Allow NULL name argument on initialization.
* Some code beautification on the way.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22454 a95241bf-73f2-0310-859d-f6bbb57e9c96

2a74c553 02-Oct-2007 Stephan Aßmus <superstippi@gmx.de>

* when a vector icon was present, BAppFileInfo::GetIcon() would return an
error if the provided bitmap was B_CMAP8, now BIconUtils will convert the
icon to B_CMAP8
-> this behaviour is a little inconsistent compared to what happens when
reading icons from attributes, there, the CMAP8 icon is prefered in case
such a bitmap is passed, even if a vector icon exists. I am not really
sure which behaviour is better. For a consistent UI, maybe it is better
to prefer the vector icon always. I've added a note to BAppFileInfo.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22414 a95241bf-73f2-0310-859d-f6bbb57e9c96

085296e8 12-Sep-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

R5's WriteAttrString() also writes the terminating null. So does ours now.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22224 a95241bf-73f2-0310-859d-f6bbb57e9c96

26529811 22-Aug-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

Added Supports[Content]Name() methods.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22044 a95241bf-73f2-0310-859d-f6bbb57e9c96

d0c290bf 20-Aug-2007 Axel Dörfler <axeld@pinc-software.de>

BAppFileInfo would crash if the resources failed to initialize, but SetInfoLocation()
forced it to use them. Now, it will filter out B_USE_RESOURCES when the resources
are invalid.
Also, _WriteData() and _RemoveData() will now fail if neither source is specified
with B_NO_INIT.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22015 a95241bf-73f2-0310-859d-f6bbb57e9c96

d22f48c9 02-Aug-2007 Stephan Aßmus <superstippi@gmx.de>

* fix the build of the app_server test environment (libbe_test) after
the change to the nodemonitor syscall

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21791 a95241bf-73f2-0310-859d-f6bbb57e9c96

9e12e9a7 01-Aug-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

* Added mapping of dup() in the FS shell.
* Adjusted the FS initialize() hook to have FD and partition_id
parameters like the other hooks instead of the partition path.
* Adjusted initialization in BFS accordingly.
* Implemented the FS initialization method in KFileSystem.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21788 a95241bf-73f2-0310-859d-f6bbb57e9c96

edb15b55 01-Aug-2007 Axel Dörfler <axeld@pinc-software.de>

* Simplified the notification framework: removed the updater stuff completely;
it was only there to account for some peculiarities of the node monitor which
we now solved differently.
* NotificationListener no longer includes a doubly linked list link for convenience;
it might want to listen to more than just one service.
* NotificationService cannot have an abstract destructor.
* Changed the _user_stop_watching() syscall to mirror the Be API; ie. it's no
longer possible to just remove some flags separately, just to stop listening
* Adapted the node monitor implementation to live in the NodeMonitorService class
that uses the new notification framework.
* Removed the public kernel node monitor API - it wasn't useful that way since you
couldn't do a lot with the KMessage in the kernel without using a private API.
Now you will have to use the (private) notification manager to use the node monitor
from inside the kernel. At a later point, we might introduce a public API for that,

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21780 a95241bf-73f2-0310-859d-f6bbb57e9c96

04ed91ac 28-Jul-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

Added copy constructor and assignment operator.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21729 a95241bf-73f2-0310-859d-f6bbb57e9c96

619c1705 27-Jul-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

Some documentation. Courtesy of Jan Matejek.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21722 a95241bf-73f2-0310-859d-f6bbb57e9c96

c41c3f9b 06-Jul-2007 Marcus Overhagen <marcusoverhagen@gmail.com>

gcc4 compile fix, but C++ predicates are ugly

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21579 a95241bf-73f2-0310-859d-f6bbb57e9c96

896aa538 06-Jul-2007 Marcus Overhagen <marcusoverhagen@gmail.com>

gcc4 fix

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21578 a95241bf-73f2-0310-859d-f6bbb57e9c96

d2d75366 05-Jul-2007 Axel Dörfler <axeld@pinc-software.de>

* Renamed "EFI GUID Partition Table" to "EFI GUID Partition Map" to be consistent
with the other partition types.
* Added kPartitionTypeEFI to the constants.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21574 a95241bf-73f2-0310-859d-f6bbb57e9c96

2702a877 04-Jul-2007 Axel Dörfler <axeld@pinc-software.de>

* Added a work-around if the file to be watched does actually exist when starting
to watch it.
* Now adds the path to be watched to the update message (not the path of the
file that actually changed, though).
* Made debug output conditionally compiled in when TRACE_PATH_MONITOR is defined.
* Added PathMonitor.cpp to libbe.so

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21554 a95241bf-73f2-0310-859d-f6bbb57e9c96

618b37dc 05-Jun-2007 Axel Dörfler <axeld@pinc-software.de>

Fixed various incorrect uses of the erase() method of several STL containers I introduced before. Thanks to Stefano for the hint!

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21332 a95241bf-73f2-0310-859d-f6bbb57e9c96

5d2e4044 16-May-2007 Axel Dörfler <axeld@pinc-software.de>

* All functions returning a message will now return an empty message in case there is
none yet, instead of returning an error.
* Cleanup.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21152 a95241bf-73f2-0310-859d-f6bbb57e9c96

d00539e3 07-May-2007 Axel Dörfler <axeld@pinc-software.de>

* Revamped BPathMonitor API as suggested by Ingo - we could rename it to BNodeMonitor
and add wrappers for watch_node() as well, though.
* Implemented more or less all what is needed for the path monitoring to work.
* Added a test application: works fine under Haiku, but somewhat flaky under BeOS,
dunno why yet.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21066 a95241bf-73f2-0310-859d-f6bbb57e9c96

ed1589a5 04-May-2007 Axel Dörfler <axeld@pinc-software.de>

Fixed binary compatibility problem I introduced yesterday.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21031 a95241bf-73f2-0310-859d-f6bbb57e9c96

e5bc3cb9 04-May-2007 Axel Dörfler <axeld@pinc-software.de>

Added virtual desctructor to calm down GCC 4.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21021 a95241bf-73f2-0310-859d-f6bbb57e9c96

f30198a0 04-May-2007 Axel Dörfler <axeld@pinc-software.de>

* Implemented PathMonitor class - untested, but compiles.
* The API is just a proposal at this time, please comment.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21020 a95241bf-73f2-0310-859d-f6bbb57e9c96

d87dc169 02-May-2007 Jérôme Duval <korli@users.berlios.de>

fixed a typo was U instead of O

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20981 a95241bf-73f2-0310-859d-f6bbb57e9c96

b8ba8f58 28-Mar-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

Added the disk device API to the libbe_haiku.so, so that libtracker.so builds
again for target libbe_test. Added respective syscall stubs and other functions
to libhaikucompat.a.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20447 a95241bf-73f2-0310-859d-f6bbb57e9c96

2b2ec438 26-Mar-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

* Moved the AutoLocker class out of the kernel/utils/AutoLock.h header
into its own shared/AutoLocker.h. It can be used by userland code too.
* Removed headers/private/shared/ObjectLocker.h and replaced all uses of
BObjectLocker by AutoLocker.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20432 a95241bf-73f2-0310-859d-f6bbb57e9c96

d8de23cd 23-Feb-2007 Axel Dörfler <axeld@pinc-software.de>

BDirectory::Contains() would return "true" if the entry being tested for existed,
but the BDirectory was not initialized correctly. Thanks to Jonas who also provided
a patch for this (which I didn't use directly, though, for some minor reasons).
This fixes bug #1034.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20221 a95241bf-73f2-0310-859d-f6bbb57e9c96

93532677 21-Jan-2007 Axel Dörfler <axeld@pinc-software.de>

fs_unmount_volume() gets a path to the mount point, not the (eventual) device
behind the mount point; BPartition::Unmount() would never unmount a volume.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19894 a95241bf-73f2-0310-859d-f6bbb57e9c96

9f507806 15-Nov-2006 Stephan Aßmus <superstippi@gmx.de>

* fixed a couple of remaining issues with vector icons,
there is some unfortunate code duplication in AppFileInfo,
because it cannot use BMimeType/BNode alone to retrieve icons,
now it works closer to the code in BIconUtils, this fixes
R5 icons not displaying for other icon sizes
* implemented a bilinear scaling function, I don't know if
it is very fast, but I hope it is reasonable. Now that I
see the results though, I wonder if R5 icons should be
scaled with nearest neighbor instead...
* corrected a small bug in the icon format stuff...
7 bit coords are -32-+95, not 96
* improved comment for BIconUtils function

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19302 a95241bf-73f2-0310-859d-f6bbb57e9c96

c8a97620 15-Nov-2006 Stephan Aßmus <superstippi@gmx.de>

* added new icon specific verions of GetIcon and SetIcon

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19300 a95241bf-73f2-0310-859d-f6bbb57e9c96

8c34572b 15-Nov-2006 Axel Dörfler <axeld@pinc-software.de>

Somehow the vector icon version of GetIconForType() was missing.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19295 a95241bf-73f2-0310-859d-f6bbb57e9c96

bae87c91 06-Nov-2006 Axel Dörfler <axeld@pinc-software.de>

Added a new type for the vector icon format 'VICN' or B_VECTOR_ICON_TYPE.
It's hopefully now used everywhere instead of B_RAW_TYPE where appropriate.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19219 a95241bf-73f2-0310-859d-f6bbb57e9c96

e1e2b03b 04-Nov-2006 Axel Dörfler <axeld@pinc-software.de>

* Added TODO comment about missing vector icon support
* Minor cleanup.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19201 a95241bf-73f2-0310-859d-f6bbb57e9c96

134f3f10 13-Oct-2006 Axel Dörfler <axeld@pinc-software.de>

Fixed GCC 4 warnings.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19055 a95241bf-73f2-0310-859d-f6bbb57e9c96

e2ba090e 25-Sep-2006 Jérôme Duval <korli@users.berlios.de>

fixed some gcc4 warnings

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18935 a95241bf-73f2-0310-859d-f6bbb57e9c96

59deaf10 11-Sep-2006 Stephan Aßmus <superstippi@gmx.de>

various changes to improve integration of vector icons
* Deskbar uses 32 bit icons now
* vector icons are now correctly converted to B_CMAP8 bitmaps
if no B_CMAP8 icon is available
* small fixes in Tracker (window mode menu)

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18803 a95241bf-73f2-0310-859d-f6bbb57e9c96

7fb6186f 29-Aug-2006 Stephan Aßmus <superstippi@gmx.de>

* integration of vector icons with the registrar and the mime data base
* additional versions of SetIcon[ForType] and GetIcon[ForType] in BMimeType
and BAppFileInfo, which handle flat vector icon data
* changes in Tracker to support scalable icons (currently broken for
non-vector icons and needs cleanup) and drawing icons correctly with alpha
channel (large parts of this work done by Michael Lotz)

If someone feels like looking over the changes, that would be much
appreciated! :-)

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18699 a95241bf-73f2-0310-859d-f6bbb57e9c96

9ecf9d1c 26-Aug-2006 Ingo Weinhold <ingo_weinhold@gmx.de>

Merge from layout management branch.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18649 a95241bf-73f2-0310-859d-f6bbb57e9c96

ed0d15ba 11-Aug-2006 Axel Dörfler <axeld@pinc-software.de>

* Use max_c() instead of max() in C++ files.
* Updated license header.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18491 a95241bf-73f2-0310-859d-f6bbb57e9c96

7b3d36e5 21-Jun-2006 Axel Dörfler <axeld@pinc-software.de>

* BEntry::GetStat() and BNode::GetStat() used sizeof(struct stat) for the kernel
syscall, but they could not know if R5 code called them (in which case the stat
size has a different size). We now always only return the R5 stat structure here.
This fixes bug #420. We might want to find a different solution to this problem,
* Be got SYMLINK_MAX wrong - it's not the maximum number of links (that's SYMLOOP_MAX),
but the maximum size of a symlink buffer. Added missing SYMLOOP_MAX and SYMLINK_MAX
constants to limits.h.
* Fixes MAXSYMLINKS to use SYMLOOP_MAX, instead of SYMLINKS_MAX (which doesn't exist
in POSIX specs, but we (intentionally) break source compatibility here).
* Reenabled the Haiku versions of stat(), fstat(), and lstat() when build for Haiku.
* Removed OpenBeOS namespace stuff from the files I touched.
* Removed superfluous StorageDefs.Private.h, whyever that ended up in a public header
is beyond me.
* Cleanup.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17894 a95241bf-73f2-0310-859d-f6bbb57e9c96

c4dde2f7 13-Jun-2006 Axel Dörfler <axeld@pinc-software.de>

* No need to create a BPath object for the leaf name in CreateAppMetaMimeThread.
* The preferred application is now written with the case preserved. This fixes
bug #635.
* Minor cleanup.
* BApplication::_InitData() now also corrects a pre-registered application signature
if the case is different. Note, however, that the application watching mechanism
doesn't seem to work correctly with this, maybe sending out those should be postponed
until the registration is completed?

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17836 a95241bf-73f2-0310-859d-f6bbb57e9c96

1b0c0ad7 14-Jun-2006 Axel Dörfler <axeld@pinc-software.de>

* InstalledTypes did not preserve the case of the MIME types, and thus, Tracker queries
for some types (like "application/x-vnd.Be-elfexecutable") would fail. This fixes
bug #666 (no, I'm not the exorcist :-)).
* Renamed private methods to have the '_' prefix.
* Cleanup, added license.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17832 a95241bf-73f2-0310-859d-f6bbb57e9c96

e4f35acf 09-Jun-2006 Ingo Weinhold <ingo_weinhold@gmx.de>

* Added new (currently private) API class BMimeSnifferAddon,
representing the interface for, well, MIME sniffer add-ons.
* Implemented the respective add-on manager and make use of it in
the MIME database code. Unfortunately the MIME DB code completely
lives in libbe.so and hence I had to put my code there too.
IMHO we should (one day) remove the direct (read-only) MIME DB
access from libbe and move everything into the registrar.
Currently the add-on manager supports built-in add-ons only; it
doesn't really load anything from disk ATM.
* Added a built-in text sniffer add-on to the registrar. It's based
upon the BSD file tool code.

This closes bug #250 (plain text files are identified as such, now).

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17784 a95241bf-73f2-0310-859d-f6bbb57e9c96

2d0c5e0a 07-Jun-2006 Axel Dörfler <axeld@pinc-software.de>

* Made updating the MIME info more safe, this was just one source the registrar
could use as an excuse to die.
* Minor cleanup

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17765 a95241bf-73f2-0310-859d-f6bbb57e9c96

f998d297 31-May-2006 Axel Dörfler <axeld@pinc-software.de>

BMimeType::GetInstalledTypes() will no longer try to add a NULL string to a
message - and even return the error message it got from BMessage::AddString()
for trying so.
This fixes bug #585.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17671 a95241bf-73f2-0310-859d-f6bbb57e9c96

8aebe2c4 31-May-2006 Axel Dörfler <axeld@pinc-software.de>

Tracker compared B_APP_MIME_TYPE case sensitively - we now export the same case as
is used at other places, and all of a sudden, the "Open With..." menu in Tracker is
working now :-)

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17666 a95241bf-73f2-0310-859d-f6bbb57e9c96

373d946f 30-May-2006 Axel Dörfler <axeld@pinc-software.de>

* create_app_meta_mime() now preserves the case when installing the
MIME type.
* We now write the META:TYPE attribute that contains the type with
preserved case (as in BeOS). We even currently check this whenever
a type is opened, but that can be removed later, again.
* BMimeType::GetSupportingApps() was broken for applications that
only support the super type.
* Also BMimeType::GetSupportingApps() preserves the case of the
* Why on earth would we want to preserve the case of case insensitive
MIME types? Simple, this let's you query for those apps using case
sensitive queries, as Tracker uses for its "open with" functionality.
Strangely enough, that one still doesn't work, even though the query
predicate is now correct.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17661 a95241bf-73f2-0310-859d-f6bbb57e9c96

7f20062d 29-May-2006 Jérôme Duval <korli@users.berlios.de>

BAppFileInfo::SetSupportedTypes now works even when there is no signature
A consequence is the FileType tracker addon (which hasn't a signature) has now its attributes set on Linux builds

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17642 a95241bf-73f2-0310-859d-f6bbb57e9c96

0b10fd48 26-May-2006 Axel Dörfler <axeld@pinc-software.de>

The large icon wouldn't be written correctly (or at all) into the MIME type, due
to a copy&paste bug.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17596 a95241bf-73f2-0310-859d-f6bbb57e9c96

39c991c0 26-May-2006 Stephan Aßmus <superstippi@gmx.de>

Added BPositionIO::GetSize() and implemented it by means of Seek() and
Position(). This used up a virtual slot of BPositionIO. GetSize() needed to be
implemented in BFile, which uses the BStatable version as before. This should
hopefully be binary compatible. The only problem could be in source
compatibility when there are classes inheriting from BPositionIO implementing
their own GetSize().

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17593 a95241bf-73f2-0310-859d-f6bbb57e9c96

c2a2369d 15-May-2006 Axel Dörfler <axeld@pinc-software.de>

BAppFileInfo::SetTo() no longer fails in case the resources couldn't be initialized.
This allows it to read the attributes (if any) from scripts as well.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17473 a95241bf-73f2-0310-859d-f6bbb57e9c96

aa8265a5 07-May-2006 Ingo Weinhold <ingo_weinhold@gmx.de>

Fixed copy'n'paste error. It caused update_mime_info() to remove the signature
of an object file, if the file's resources didn't specify supported
types. Both under Haiku itself and for the Linux build. This finally closes
bug 170 (AboutHaiku not being startable from Deskbar when built under

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17354 a95241bf-73f2-0310-859d-f6bbb57e9c96

6a8e3dec 03-May-2006 Stephan Aßmus <superstippi@gmx.de>

* compile fix for the test environment

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17306 a95241bf-73f2-0310-859d-f6bbb57e9c96

3e54c13a 01-May-2006 Axel Dörfler <axeld@pinc-software.de>

* Fixed BDirectory::SetTo(BDirectory*, path) constructor in case the target
directory was "this".
* Fixed storage_support.h header - didn't include all needed headers.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17288 a95241bf-73f2-0310-859d-f6bbb57e9c96

31dc79a1 03-Apr-2006 Axel Dörfler <axeld@pinc-software.de>

* Added B_MINI_ICON_TYPE and B_LARGE_ICON_TYPE to TypeConstants.h.
* Cleanup.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16996 a95241bf-73f2-0310-859d-f6bbb57e9c96

8da77437 03-Apr-2006 Axel Dörfler <axeld@pinc-software.de>

No longer "abuses" the provided message to send the request to the registrar.
Minor cleanup.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16989 a95241bf-73f2-0310-859d-f6bbb57e9c96

e83935e5 03-Apr-2006 Axel Dörfler <axeld@pinc-software.de>

It no longer appears as if you need to delete file types twice until they
disappear. This fixes a part of bug #279.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16988 a95241bf-73f2-0310-859d-f6bbb57e9c96

bf5e1167 03-Apr-2006 Axel Dörfler <axeld@pinc-software.de>

* Improved BMimeType::GetSupportingApps(): no longer uses the provided message to
send the request, and it now checks if the object is valid.
* Fixed building supporting apps table: now all types are converted to lower case,
so that it works reliable now. This fixes bug #278.
* Minor cleanup.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16987 a95241bf-73f2-0310-859d-f6bbb57e9c96

5351ff06 26-Mar-2006 Axel Dörfler <axeld@pinc-software.de>

Implemented CheckNodeIconHintPrivate() - this missing call was responsible for the
wrong icons Tracker showed.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16883 a95241bf-73f2-0310-859d-f6bbb57e9c96

2297a36b 22-Mar-2006 Stephan Aßmus <superstippi@gmx.de>

* added functions to improve binary compatibility with old apps
-> Guido (for which there is source available though) is now
running fine on Haiku.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16860 a95241bf-73f2-0310-859d-f6bbb57e9c96

d51ecfd2 11-Mar-2006 Axel Dörfler <axeld@pinc-software.de>

Made helper functions static.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16698 a95241bf-73f2-0310-859d-f6bbb57e9c96

e389ac9d 11-Mar-2006 Axel Dörfler <axeld@pinc-software.de>

* Removed superfluous Delete*() methods.
* Invocations like SetShortDescription("") will now remove the description as
well, not only SetShortDescription(NULL).
* Cleanup.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16697 a95241bf-73f2-0310-859d-f6bbb57e9c96

bf2657c5 08-Mar-2006 Axel Dörfler <axeld@pinc-software.de>

Database::Delete() now supports deleting super types as well (by deleting all
sub types first).
Also, if removing the type from the supporting application lists fails, this
is no longer propagated to the user - the MIME type got deleted after all,
and that's the purpose of this function.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16651 a95241bf-73f2-0310-859d-f6bbb57e9c96

bb674499 03-Mar-2006 Axel Dörfler <axeld@pinc-software.de>

* Finally implemented B_WATCH_MOUNT, ie. Tracker now shows newly mounted volumes
(mounting still only works from the Terminal).
* Shuffled functions in node_monitor.cpp around to clearly differentiate between
private, private kernel, and public kernel functions.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16575 a95241bf-73f2-0310-859d-f6bbb57e9c96

208a6ce1 27-Feb-2006 Axel Dörfler <axeld@pinc-software.de>

We now set the preferred application of MIME types that are installed from
the supported types of an application to the one responsible.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16542 a95241bf-73f2-0310-859d-f6bbb57e9c96

7500f294 27-Feb-2006 Axel Dörfler <axeld@pinc-software.de>

CreateAppMetaMimeThread::DoMimeUpdate() now also updates the supported types
of an application as well as the their icons.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16541 a95241bf-73f2-0310-859d-f6bbb57e9c96

98d9f1b4 16-Feb-2006 Axel Dörfler <axeld@pinc-software.de>

* Only allowed application hints of B_MIME_TYPE_LENGTH instead of B_PATH_NAME_LENGTH.
* Introduced a _SetStringValue() to avoid code duplication.
* The string types now check the original value, and don't write anything if the
contents stay unchanged (with the current exception of the sniffer rules).
* The monitor notfication methods no longer "clobber" the status result.
* Major cleanup.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16432 a95241bf-73f2-0310-859d-f6bbb57e9c96

b1970bb8 09-Feb-2006 Ingo Weinhold <ingo_weinhold@gmx.de>

When only the app version_info was contained in the resources/attribute we
read from (and the system version_info missing) GetVersionInfo() always
failed. Given that rc only writes the app version_info, mimeset never
created a BEOS:APP_VERSION attribute (nor ones for supported types icons).
The version attribute was usually created nevertheless, as a side effect
of the subsequent setversion invocation.

Under Linux the attribute emulation can accidentially pick up the
attributes of an earlier deleted node that had the the same node ID as the
file in question, which in this case could cause an invalid
BEOS:APP_VERSION attribute (the app version_info part at least).

Now GetVersionInfo() doesn't fail anymore, when only one info could be
read (the other one is zeroed). Not sure, if that is what BeOS does, but
it shouldn't harm. This fixes bug #100.

Also made SetVersionInfo() zero out what couldn't be read before writing it

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16320 a95241bf-73f2-0310-859d-f6bbb57e9c96

1cac47bf 31-Jan-2006 Ingo Weinhold <ingo_weinhold@gmx.de>

Added a few more constructors and initialization methods. Among them two
SetToImage() variants for initializing the object to the resources of
the shared object file belonging to a loaded image. Should be handy for
libraries and add-ons.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16176 a95241bf-73f2-0310-859d-f6bbb57e9c96

29d7e9cd 30-Jan-2006 Ingo Weinhold <ingo_weinhold@gmx.de>

Our FS is case sensitive, and the create_app_meta_mime() implementation
didn't bring the app signature into its canonical lower-case form when
using it as path to the MIME DB file. Thus an application signature
MIME type didn't get any attributes, not even the path to the app's
executable, which led to all kinds of problems when finding or starting
applications by signature. Among them, Clock not finding its resources
(bug #74).

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16163 a95241bf-73f2-0310-859d-f6bbb57e9c96

9ff556c3 28-Jan-2006 Ingo Weinhold <ingo_weinhold@gmx.de>

Even better use the type guaranteed to be the correct one for the platform.
Thanks to John Drinkwater for pointing that out.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16132 a95241bf-73f2-0310-859d-f6bbb57e9c96

b4598d95 28-Jan-2006 Ingo Weinhold <ingo_weinhold@gmx.de>

Fixed nasty bug in BAppFileInfo::_ReadData(). When an attribute
or resource to be read did not exist and the method was told to
allocate a buffer, it would try to allocate the buffer with an
uninitialized size value. This basically concerned SetSupportedTypes()
and methods using that one (IsSupportedType(), Supports()).

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16131 a95241bf-73f2-0310-859d-f6bbb57e9c96

de3b6032 28-Jan-2006 Ingo Weinhold <ingo_weinhold@gmx.de>

There's even a constant for the ELF executable type.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16125 a95241bf-73f2-0310-859d-f6bbb57e9c96

15424f3d 28-Jan-2006 Ingo Weinhold <ingo_weinhold@gmx.de>

Finally fixed update_mime_info(). As Be's version it understands two
different "force" levels now and updates the app file info attributes
for shared object files.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16123 a95241bf-73f2-0310-859d-f6bbb57e9c96

c43a6c50 25-Jan-2006 Axel Dörfler <axeld@pinc-software.de>

Moved _kern_shutdown() to the registrar's R5Compatiblity.cpp where it belongs.
(but maybe that file should be moved into libhaikucompat.a?)

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16096 a95241bf-73f2-0310-859d-f6bbb57e9c96

5da78399 25-Jan-2006 Axel Dörfler <axeld@pinc-software.de>

* _kern_remove_dir() didn't even compile... (test environment (of which
LibBeAdapter is a part of) isn't part of the build.
* Added _kern_shutdown() function, so that the registrar still compiles
even though __HAIKU__ is now defined for the target libbe_test.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16095 a95241bf-73f2-0310-859d-f6bbb57e9c96

979aeaf7 25-Jan-2006 Axel Dörfler <axeld@pinc-software.de>

Fixed bug #97:
* BEntry::Remove() now uses _kern_remove_dir() for directories.
* Added fd parameter to _kern_remove_dir().
* Fixed LibBeAdapter's _kern_unlink() to only work on files, and
added _kern_remove_dir() for directories.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16078 a95241bf-73f2-0310-859d-f6bbb57e9c96

e4b4a992 20-Jan-2006 Ingo Weinhold <ingo_weinhold@gmx.de>

Update the BDiskDevice object after mounting/unmounting a partition.
Untested, but should fix bug #92.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16012 a95241bf-73f2-0310-859d-f6bbb57e9c96

50f4cc43 16-Jan-2006 Ingo Weinhold <ingo_weinhold@gmx.de>

Added TODO. Just in case someone wants to tackle it. :-)

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15990 a95241bf-73f2-0310-859d-f6bbb57e9c96

4eeeeea9 03-Jan-2006 Axel Dörfler <axeld@pinc-software.de>

* watch_node() now returns B_BAD_VALUE if it's used with a NULL node and
flags unequal B_WATCH_MOUNT/B_STOP_WATCHING set.
* Changed watch_node() and stop_watching() to be messenger based instead
of handler/looper - that greatly simplifies the code.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15828 a95241bf-73f2-0310-859d-f6bbb57e9c96

509798f9 30-Dec-2005 Axel Dörfler <axeld@pinc-software.de>

Minor cleanup.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15743 a95241bf-73f2-0310-859d-f6bbb57e9c96

7b730235 30-Dec-2005 Axel Dörfler <axeld@pinc-software.de>

* Fixed the attribute string error in other places as well.
* Now always returns B_BAD_DATA in case of attributes with the wrong size.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15741 a95241bf-73f2-0310-859d-f6bbb57e9c96

762eb223 30-Dec-2005 Axel Dörfler <axeld@pinc-software.de>

* NodeInfo::GetType() now returns B_BAD_DATA instead of B_BAD_VALUE if the
attribute is longer than B_MIME_TYPE_LENGTH.
* NodeInfo::GetType() now null terminates the attribute; you cannot expect
that strings in attributes are null terminated (it already wrote the null
byte to B_MIME_TYPE_LENGTH - 1 for safety, but why not do it right?).

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15740 a95241bf-73f2-0310-859d-f6bbb57e9c96

c729b012 07-Dec-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

The <arch_config.h> header is needed in <syscalls.h>, since we're using
the atomic functions related macros.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15404 a95241bf-73f2-0310-859d-f6bbb57e9c96

773be699 26-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

Fixed AppFileInfo::_ReadData(): it was always returning B_BAD_VALUE in case
it read the data from attributes.
Deskbar should now display all those application icons under Haiku as well :-)

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15159 a95241bf-73f2-0310-859d-f6bbb57e9c96

758b1d0e 12-Nov-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

Fixes that make Haiku build with gcc 4. Mainly out of the following
* Missing includes (like <stdlib.h> and <string.h>).
* Linking against $(TARGET_LIBSTDC++) instead of libstdc++.r4.so.
* Local variables shadowing parameters.
* Default parameters in function definitions (as opposed to function
* All C++ stuff (nothrow, map, set, vector, min, max,...) must be imported
explicitly from the std:: namespace now.
* "new (sometype)[...]" must read "new sometype[...]", even if sometype is
something like "const char *".
* __FUNCTION__ is no longer a string literal (but a string expression), i.e.
'printf(__FUNCTION__ ": ...\n")' is invalid code.
* A type cast results in a non-lvalue. E.g. "(char *)buffer += bytes"
is an invalid expression.
* "friend class SomeClass" only works when SomeClass is known before.
Otherwise the an inner class with that name is considered as friend.
gcc 4 is much pickier about scopes.
* gcc 4 is generally stricter with respect to type conversions in C.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14878 a95241bf-73f2-0310-859d-f6bbb57e9c96

ca9e5772 07-Nov-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

* Reintroduced third LinkAgainst parameter <mapLibs>, defaulting to true.
Library names are now mapped for all targets but "host" (not only for
"haiku") -- added one more level of indirection to achieve that.
* Renamed build/HaikuBuildCompatibility.h to BeOSBuildCompatibility.h
(auto-included when compiling something that uses the Be API for platform
"host" on anon-BeOS platform), and introduced build/HaikuBuildCompatibility.h,
which can be included when compiling something that can be built for both,
Haiku and BeOS compatible platforms.
* Introduced libhaikucompat.a, a library that adds a few functions existing
under Haiku, but not under BeOS.
* New rule AddSubDirSupportedPlatforms.
* Renamed libopenbeos.so to libbe_haiku.so.
* Introduced new target platform "libbe_test", which is basically equivalent
to a BeOS compatible host platform target, with the exception, that instead
of the host platform's libbe.so a special build of Haiku's libbe.so
(libbe_haiku.so (formerly known as libopenbeos.so)) is used. Furthermore
Haiku's public app, interface, storage, and support kit headers are used
when compiling. This replaces the less nice way in which the test app server
and applications for this test environment were built.
When building for platform "libbe_test", the library name "be" is
autotranslated to "libbe_haiku.so". Thus most applications don't need
special fiddling when them building them for the app server test environment;
usually an "AddSubDirSupportedPlatforms libbe_test ;" will suffice.
* Reduced the dependencies of <syscalls.h> and fixed problems caused by this
(e.g. source files not including the needed headers directly).

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14749 a95241bf-73f2-0310-859d-f6bbb57e9c96

89bdf573 04-Nov-2005 Marcus Overhagen <marcusoverhagen@gmail.com>

assigned names to "some BLocker"s to aid debugging

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14702 a95241bf-73f2-0310-859d-f6bbb57e9c96

4b2397d1 02-Nov-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

Removed obsolete header <Session.h>.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14647 a95241bf-73f2-0310-859d-f6bbb57e9c96

338b8dc3 29-Oct-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

Merged changes from branch build_system_redesign at revision 14573.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14574 a95241bf-73f2-0310-859d-f6bbb57e9c96

32a4f869 24-Oct-2005 Jérôme Duval <korli@users.berlios.de>

updated types to match the one in src/add-ons/kernel/file_systems/bfs/kernel_interface.cpp
I suppose these types should be moved in a common place one day

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14486 a95241bf-73f2-0310-859d-f6bbb57e9c96

da6d1a70 20-Oct-2005 Axel Dörfler <axeld@pinc-software.de>

fs_mount_volume() now returns a dev_t as well - changed mount/mountvolume to take
that into account as well (they were reporting an error even though everything
went fine).

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14450 a95241bf-73f2-0310-859d-f6bbb57e9c96

4b9ec73e 12-Aug-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

We need to override the virtual close_fd() in BFile for binary compatibility
(bug #43).

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13937 a95241bf-73f2-0310-859d-f6bbb57e9c96

04010070 05-Aug-2005 Michael Lotz <mmlr@mlotz.ch>

Fix build of libopenbeos.so

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13908 a95241bf-73f2-0310-859d-f6bbb57e9c96

459a7cfc 05-Aug-2005 Philippe Houdoin <philippe.houdoin@gmail.com>

Removed obsoleted .src includes files.
Removed Interface's kit BTextView Jamfile, as it's build right from src/kits/interface/Jamfile now.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13902 a95241bf-73f2-0310-859d-f6bbb57e9c96

cb5da7de 05-Aug-2005 Philippe Houdoin <philippe.houdoin@gmail.com>

Cleanup libbe.so build system, using MergeObject power:
a) Make main Jamfile more easier to understand to new (and old even) developers.
Currently it looks a little too messy compared to usual Haiku's jamfiles.
b) Get ride of app.src, interface.src, storage.src and support.src includes files.
c) Move each kit objects files built back to their respective
objects/x86.R1/kits/{app|interface|storage|support} location.
d) Move private headers and source search hints back to each respective kit
Jamfiles. Most of them, at least.

{app|interface|storage|support}.src files effective deletion will come soon.
Hope I didn't break all *again* :-\

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13901 a95241bf-73f2-0310-859d-f6bbb57e9c96

0f8af9d8 05-Jul-2005 Axel Dörfler <axeld@pinc-software.de>

Removed extra version of find_directory() - it is supposed to live in libroot.so,
and in fact, already does it for quite some time :)

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13456 a95241bf-73f2-0310-859d-f6bbb57e9c96

290bc091 28-Jun-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

We use B_BITMAP_NO_SERVER_LINK BBitmaps internally now. This should remove the only app_server dependency the registrar has before shutdown.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13307 a95241bf-73f2-0310-859d-f6bbb57e9c96

a1a86b03 14-Jun-2005 Jérôme Duval <korli@users.berlios.de>

added error information

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13118 a95241bf-73f2-0310-859d-f6bbb57e9c96

7c17001c 26-May-2005 Axel Dörfler <axeld@pinc-software.de>

Implemented BPartition::GetPath() much like KPartition::GetPath().
The "mountvolume" command can now actually mount file systems :-)

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12853 a95241bf-73f2-0310-859d-f6bbb57e9c96

88706bbe 22-May-2005 Axel Dörfler <axeld@pinc-software.de>

Added some compatibility exports for libtracker.so; not yet sure if we
will keep those two, though, as I don't think they are widely used.
Note, BPrivate::CheckNodeIconHintPrivate() is not implemented.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12769 a95241bf-73f2-0310-859d-f6bbb57e9c96

75e4e6ee 02-May-2005 Axel Dörfler <axeld@pinc-software.de>

Fixed a small bug: the proposed name of a file system was always "unnamed volume"
in case BPartition::Name() was NULL or empty (ContentName() was ignored).

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12549 a95241bf-73f2-0310-859d-f6bbb57e9c96

219dacab 06-Apr-2005 Axel Dörfler <axeld@pinc-software.de>

Changed our read link syscall and FS interface call to make it easily possible to be POSIX compliant.
Also changed readlink() to be POSIX compliant with those changes.
"ls -l" does now resolve links properly again (the new coreutils version outlined the problems).

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12263 a95241bf-73f2-0310-859d-f6bbb57e9c96

2727bdcf 14-Mar-2005 Axel Dörfler <axeld@pinc-software.de>

Added HFS/plus partition type strings.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11730 a95241bf-73f2-0310-859d-f6bbb57e9c96

b38c9e18 02-Feb-2005 Axel Dörfler <axeld@pinc-software.de>

Now uses the new B_STAT_* constants rather than the one from fs_interface.h
(which will be removed soon).

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11232 a95241bf-73f2-0310-859d-f6bbb57e9c96

2ee2b3d7 02-Feb-2005 Axel Dörfler <axeld@pinc-software.de>

umask is negated before it's applied, so S_IUMSK wouldn't quite do what you'd
expect from it. Changed to the default 022.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11221 a95241bf-73f2-0310-859d-f6bbb57e9c96

c02a7b0d 02-Feb-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

Fixed build of libbeadapter.so and libopenbeos.so.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11214 a95241bf-73f2-0310-859d-f6bbb57e9c96

3af4214a 01-Feb-2005 Axel Dörfler <axeld@pinc-software.de>

_kern_open[_entry_ref]() now replaces the _kern_create[_entry_ref]() calls.
That allows BFile to actually create files (it didn't use that syscall at
all before).
Also fixed setting the permission bits of the newly created file depending on umask
(the __gUmask variable should probably be moved into a separate header).

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11208 a95241bf-73f2-0310-859d-f6bbb57e9c96

acfb502d 25-Jan-2005 Axel Dörfler <axeld@pinc-software.de>

Added _kern_get_safemode_option(). Probably this file should be moved out
of the storage camp, though.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11043 a95241bf-73f2-0310-859d-f6bbb57e9c96

78b31a7c 22-Jan-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

Removed unnecessary definition. Added debug macros.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10954 a95241bf-73f2-0310-859d-f6bbb57e9c96

f8947491 22-Jan-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

Added debug output macros.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10953 a95241bf-73f2-0310-859d-f6bbb57e9c96

45c3a5cf 17-Jan-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

Obtain user settings dir path via find_directory() now.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10814 a95241bf-73f2-0310-859d-f6bbb57e9c96

289adc04 17-Jan-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

Changed due to moving RegistrarDefs.h stuff into the BPrivate namespace and replacing kRosterPortName.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10813 a95241bf-73f2-0310-859d-f6bbb57e9c96

60027f7e 16-Jan-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

Use the standard MIME DB path when running under Haiku, but a different one when running under BeOS (so BeOS' MIME DB is not affected when running tests).

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10784 a95241bf-73f2-0310-859d-f6bbb57e9c96

b06942c6 13-Jan-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

All internally used FDs are now set to O_CLOEXEC.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10715 a95241bf-73f2-0310-859d-f6bbb57e9c96

450b5c2c 12-Jan-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

Reverted the last change. As Axel informed me, rewinding queries will work under Haiku. Also check, whether the query was Fetch()ed already.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10698 a95241bf-73f2-0310-859d-f6bbb57e9c96

08d0162e 12-Jan-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

Don't retry opening the node read-only, if opening read-write failed with B_ENTRY_NOT_FOUND.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10697 a95241bf-73f2-0310-859d-f6bbb57e9c96

458a27c9 12-Jan-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

Removed old debugging output.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10696 a95241bf-73f2-0310-859d-f6bbb57e9c96

4536dd81 11-Jan-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

Fixed standard 'backward iteration with unsigned var' bug.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10682 a95241bf-73f2-0310-859d-f6bbb57e9c96

0660acfd 11-Jan-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

Must have accidently implemented BQuery::Rewind() when migrating to our syscalls.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10681 a95241bf-73f2-0310-859d-f6bbb57e9c96

f5b1fba0 11-Jan-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

Yuck! Bad typo. I wonder why the respective unit test ever passed.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10680 a95241bf-73f2-0310-859d-f6bbb57e9c96

a368fecb 11-Jan-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

When opening the node O_RDWR failed, we try again O_RDONLY, but we did that only, if the returned error code was B_READ_ONLY_DEVICE or B_PERMISSION_DENIED. Some FS return other error codes though, so we are completely ignorant now and always retry on error. Maybe we shouldn't for obvious cases like B_ENTRY_NOT_FOUND.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10679 a95241bf-73f2-0310-859d-f6bbb57e9c96

dfb4723f 20-Dec-2004 Axel Dörfler <axeld@pinc-software.de>

_kern_open_query() syscall had been changed.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10504 a95241bf-73f2-0310-859d-f6bbb57e9c96

4d875b05 12-Dec-2004 Axel Dörfler <axeld@pinc-software.de>

Adapted because of the changes made to _kern_open_query().
Implemented BQuery::Rewind() - there is no reason not to do this, as the
kernel has no extra work because of this.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10400 a95241bf-73f2-0310-859d-f6bbb57e9c96

bf2b3d9c 20-Nov-2004 shatty <shatty@nowhere.fake>

add UsePrivateHeaders kernel ; so syscalls.h can be found

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10066 a95241bf-73f2-0310-859d-f6bbb57e9c96

8370cac7 01-Nov-2004 Ingo Weinhold <ingo_weinhold@gmx.de>

Changed my mind. Now BPartition has a method to get the mount point of the partition, respectively a potential mount point, for partitions not yet mounted.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9713 a95241bf-73f2-0310-859d-f6bbb57e9c96

419458bc 01-Nov-2004 Ingo Weinhold <ingo_weinhold@gmx.de>

Moved getting a partition's future mount point into a separate function, so it can be reused by mountvolume.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9712 a95241bf-73f2-0310-859d-f6bbb57e9c96

ec2680f0 01-Nov-2004 Ingo Weinhold <ingo_weinhold@gmx.de>

BDiskDevices are partitions, too. Hence PartitionFilterVisitor should not ignore them.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9710 a95241bf-73f2-0310-859d-f6bbb57e9c96

5198376e 01-Nov-2004 Ingo Weinhold <ingo_weinhold@gmx.de>

Updated BDiskDeviceList. The implementation was still reflecting the first version of the DiskDevice API. Untested.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9709 a95241bf-73f2-0310-859d-f6bbb57e9c96

08387795 01-Nov-2004 Ingo Weinhold <ingo_weinhold@gmx.de>

Removed VisitAll(). That's exactly what VisitEachPartition() does (since disk devices are special partitions).

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9708 a95241bf-73f2-0310-859d-f6bbb57e9c96

06f51753 01-Nov-2004 Ingo Weinhold <ingo_weinhold@gmx.de>

The order of parameters for fs_mount_volume() changed.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9699 a95241bf-73f2-0310-859d-f6bbb57e9c96

194f9368 28-Oct-2004 Ingo Weinhold <ingo_weinhold@gmx.de>

Added the DiskDevice API to libbe.so (not to libopenbeos.so though). Ready to be tested under Haiku. :-)

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9643 a95241bf-73f2-0310-859d-f6bbb57e9c96

48c0bc75 28-Oct-2004 Ingo Weinhold <ingo_weinhold@gmx.de>

Now <syscalls.h> declares the DDM syscalls.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9640 a95241bf-73f2-0310-859d-f6bbb57e9c96

d119b3ec 28-Oct-2004 Ingo Weinhold <ingo_weinhold@gmx.de>

Implemented Mount() and Unmount(). Completely untested.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9638 a95241bf-73f2-0310-859d-f6bbb57e9c96

34eedb98 04-Oct-2004 Jérôme Duval <korli@users.berlios.de>

Added a #ifndef around #define ADD_ON_STABLE_SECONDS to be able to define it on demand

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9180 a95241bf-73f2-0310-859d-f6bbb57e9c96

201e236e 02-Oct-2004 Ingo Weinhold <ingo_weinhold@gmx.de>

Fixed warnings.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9162 a95241bf-73f2-0310-859d-f6bbb57e9c96

ef4fc754 02-Oct-2004 Ingo Weinhold <ingo_weinhold@gmx.de>

Must use <fs_interface.h>, not <fsproto.h>.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9161 a95241bf-73f2-0310-859d-f6bbb57e9c96

db10640d 28-Aug-2004 Ingo Weinhold <ingo_weinhold@gmx.de>

Got rid of the Storage Kit's kernel abstraction layer, which was
unfortunately quite slow and made some things more complicated than they
needed to be.
Implemented a few missing things (e.g. BSymLink and node locking).

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8694 a95241bf-73f2-0310-859d-f6bbb57e9c96

233e6dad 28-Aug-2004 Ingo Weinhold <ingo_weinhold@gmx.de>

The whole Storage Kit now uses syscalls directly. No further need of this abstraction layer.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8693 a95241bf-73f2-0310-859d-f6bbb57e9c96

f28fc025 14-Aug-2004 Ingo Weinhold <ingo_weinhold@gmx.de>

Removed superfluous GetStat() in the setter methods.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8570 a95241bf-73f2-0310-859d-f6bbb57e9c96

b1a1ca6c 13-Aug-2004 Ingo Weinhold <ingo_weinhold@gmx.de>

Fixed entry_ref_to_path() and optimized dir_to_path(). The basic
Storage Kit unit test are passed again.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8563 a95241bf-73f2-0310-859d-f6bbb57e9c96

f72c9ca9 05-Jul-2004 Axel Dörfler <axeld@pinc-software.de>

Now redirects _kern_write_fs_info() as well.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8310 a95241bf-73f2-0310-859d-f6bbb57e9c96

800f526d 05-Jul-2004 Axel Dörfler <axeld@pinc-software.de>

Simplified set_volume_name() - it now calls our kernel syscall.
Replaced old fsproto.h definitions with our new (and still compatible) ones
from fs_interface.h.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8309 a95241bf-73f2-0310-859d-f6bbb57e9c96

1f5d3007 02-Jul-2004 Axel Dörfler <axeld@pinc-software.de>

LibBeAdapter.cpp now only translates some syscalls; it will probably removed
once we do the final transition to the new kernel API.
NodeMonitor.cpp and kernel_interface.POSIX.cpp now call Haiku syscalls
where appropriate (they are connected to R5 via LibBeAdapter).

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8282 a95241bf-73f2-0310-859d-f6bbb57e9c96

40467b5b 27-Jun-2004 Axel Dörfler <axeld@pinc-software.de>

BPath does have a (BEntry *) constructor; there is no need for code duplication here.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8189 a95241bf-73f2-0310-859d-f6bbb57e9c96

cd437e5e 26-Jun-2004 Axel Dörfler <axeld@pinc-software.de>

Removed unneeded functions - we have those natively now.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8178 a95241bf-73f2-0310-859d-f6bbb57e9c96

130279a5 26-Apr-2004 Axel Dörfler <axeld@pinc-software.de>

Added a ToDo item in BVolume::SetName().

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7322 a95241bf-73f2-0310-859d-f6bbb57e9c96

425399b1 10-Mar-2004 Axel Dörfler <axeld@pinc-software.de>

If the MIME type couldn't be retrieved, it will now take the file type
into account; i.e. it will ask for a directory/volume/symlink/application icon.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6942 a95241bf-73f2-0310-859d-f6bbb57e9c96

fa8dbc01 01-Feb-2004 shatty <shatty@nowhere.fake>

new MediaFormats. node monitoring codec plugin loading. codec mods to support new codec api to retrieve supported formats.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6465 a95241bf-73f2-0310-859d-f6bbb57e9c96

4b7d0fba 31-Jan-2004 shatty <shatty@nowhere.fake>

simple BLooper to run an AddOnMonitorHandler

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6457 a95241bf-73f2-0310-859d-f6bbb57e9c96

341ea251 31-Jan-2004 shatty <shatty@nowhere.fake>

semi-tested semi-implemented with horrific big methods

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6454 a95241bf-73f2-0310-859d-f6bbb57e9c96

e396ab58 28-Jan-2004 shatty <shatty@nowhere.fake>

untested version

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6401 a95241bf-73f2-0310-859d-f6bbb57e9c96

5abde301 03-Jan-2004 Ingo Weinhold <ingo_weinhold@gmx.de>

Changed the behavior of Contains(const char*, int32): It does not longer
return true, if the directory is not initialized, or if the directory
does not contain the entry, but the given path is absolute. This change
makes it less compatible with R5, but more consistent with the BEntry*
version and undoubtfully more compatible with common sense.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5884 a95241bf-73f2-0310-859d-f6bbb57e9c96

8c470cd7 02-Dec-2003 Ingo Weinhold <ingo_weinhold@gmx.de>

Made use of the new parameter of *SymLink and adjusted dependencies where

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5543 a95241bf-73f2-0310-859d-f6bbb57e9c96

ce80ee56 15-Nov-2003 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

- Renamed CDDA to AudioSession
- Added DataSession

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5369 a95241bf-73f2-0310-859d-f6bbb57e9c96

2094b5ff 25-Oct-2003 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

Updated to use new parametersSize params where applicable.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5156 a95241bf-73f2-0310-859d-f6bbb57e9c96

c3cfd913 22-Sep-2003 Ingo Weinhold <ingo_weinhold@gmx.de>

Implemented CommitModifications(). We still need to extract port and token from the supplied messenger.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4794 a95241bf-73f2-0310-859d-f6bbb57e9c96

3f54a014 21-Sep-2003 Ingo Weinhold <ingo_weinhold@gmx.de>

Removed the resizeContents/force parameters from [Validate]Resize()/[Validate]Move() as discussed in July (grrr, I was lazy).

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4782 a95241bf-73f2-0310-859d-f6bbb57e9c96

4c4e5505 21-Sep-2003 Ingo Weinhold <ingo_weinhold@gmx.de>

Added BPartition::Uninitialize(). No CanUninitialize(), but
uninitialization does not affect the physical partition, anyway. The
system simply marks the partition as uninitialized for the current
session -- after rebooting it re-appears unchanged.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4777 a95241bf-73f2-0310-859d-f6bbb57e9c96

417b2882 05-Aug-2003 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

No reason for err to be an ssize_t in this function.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4233 a95241bf-73f2-0310-859d-f6bbb57e9c96

17e6de7a 03-Aug-2003 shadow303 <shadow303@nowhere.fake>

gcc 3 fixes

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4227 a95241bf-73f2-0310-859d-f6bbb57e9c96

a2a6c4bd 01-Aug-2003 Ingo Weinhold <ingo_weinhold@gmx.de>

Moved and documented compare_string().

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4187 a95241bf-73f2-0310-859d-f6bbb57e9c96

eceac61b 30-Jul-2003 Ingo Weinhold <ingo_weinhold@gmx.de>

Implemented disk device job iteration.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4142 a95241bf-73f2-0310-859d-f6bbb57e9c96

9e5ec2a5 30-Jul-2003 Ingo Weinhold <ingo_weinhold@gmx.de>

Implemented BDiskDeviceJob. Should be complete.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4141 a95241bf-73f2-0310-859d-f6bbb57e9c96

fc45522e 29-Jul-2003 Ingo Weinhold <ingo_weinhold@gmx.de>

Added ContentSize(). Added default parameters for CanMove() and CanResize().

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4134 a95241bf-73f2-0310-859d-f6bbb57e9c96

426b44c6 21-Jul-2003 Ingo Weinhold <ingo_weinhold@gmx.de>

Implemented disk device updating. Some changes due to syscall changes.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4050 a95241bf-73f2-0310-859d-f6bbb57e9c96

247a3aae 21-Jul-2003 Ingo Weinhold <ingo_weinhold@gmx.de>

Small changes due to modified syscalls.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4046 a95241bf-73f2-0310-859d-f6bbb57e9c96

d61adbe2 21-Jul-2003 Ingo Weinhold <ingo_weinhold@gmx.de>

CanMove() returns a list of partitions to be unmounted for moving, now.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4041 a95241bf-73f2-0310-859d-f6bbb57e9c96

24c9a2dc 20-Jul-2003 Ingo Weinhold <ingo_weinhold@gmx.de>

Implemented modification methods.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4036 a95241bf-73f2-0310-859d-f6bbb57e9c96

fb82e723 20-Jul-2003 Ingo Weinhold <ingo_weinhold@gmx.de>

Implemented BPartitionableSpace.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4033 a95241bf-73f2-0310-859d-f6bbb57e9c96

63e9aa86 20-Jul-2003 Ingo Weinhold <ingo_weinhold@gmx.de>

_kern_get_next_supported_partition_type() syscall changed slightly.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4032 a95241bf-73f2-0310-859d-f6bbb57e9c96

de8cdced 19-Jul-2003 Ingo Weinhold <ingo_weinhold@gmx.de>

Implemented all Can*() and Validate*() methods. Signature changes to the methods for resizing and moving.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4021 a95241bf-73f2-0310-859d-f6bbb57e9c96

41500250 18-Jul-2003 Ingo Weinhold <ingo_weinhold@gmx.de>

* Removed the Validate*() methods. They are less useful than their
BPartition counterparts.
* Removed the BPartition* argument from the Supports*() methods. They
now return only general capability information. The BPartition::Can*()
methods would be used to learn whether a certain operation is possible
with the partition.
* Added some missing Supports*() methods.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4010 a95241bf-73f2-0310-859d-f6bbb57e9c96

e1570b66 16-Jul-2003 Ingo Weinhold <ingo_weinhold@gmx.de>

Added mostly empty implementations for the missing methods; implemented some of them. Cleanup.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4002 a95241bf-73f2-0310-859d-f6bbb57e9c96

38844d14 16-Jul-2003 Ingo Weinhold <ingo_weinhold@gmx.de>

Added ValidateInitialize() and a _SetTo(disk_system_id). Cleanup.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4001 a95241bf-73f2-0310-859d-f6bbb57e9c96

a058daad 16-Jul-2003 Ingo Weinhold <ingo_weinhold@gmx.de>

Implemented the remaining methods, some aesthetical changes.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3998 a95241bf-73f2-0310-859d-f6bbb57e9c96

910d9939 15-Jul-2003 Ingo Weinhold <ingo_weinhold@gmx.de>

Implemented the BDiskSystem::Supports*() methods. Added required private helper methods to BPartition.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3989 a95241bf-73f2-0310-859d-f6bbb57e9c96

dd3be089 14-Jul-2003 Ingo Weinhold <ingo_weinhold@gmx.de>

* Removed VisitEach{Initializable,Partitionable}Partition() -- they are
too specific for a general API.
* Implemented {Register,Unregister}FileDevice().
* Implemented Get{Device,Partition}WithID() and

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3979 a95241bf-73f2-0310-859d-f6bbb57e9c96

442e574d 14-Jul-2003 Ingo Weinhold <ingo_weinhold@gmx.de>

Added FindDescendant() and _IsShadow().

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3978 a95241bf-73f2-0310-859d-f6bbb57e9c96

92b9e333 14-Jul-2003 Ingo Weinhold <ingo_weinhold@gmx.de>

* Added SetTo(partition_id), InitCheck().
* Added more parameters to _SetTo().
* Fixed problem in Unset() -- the BPartition version wasn't called.
* Implemented {Prepare,Cancel}Modifications() and IsModified(). The
latter doesn't work yet, since the syscall implementation is still
empty yet.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3977 a95241bf-73f2-0310-859d-f6bbb57e9c96

50f17542 11-Jul-2003 haydentech <haydentech@nowhere.fake>

namespace fix

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3955 a95241bf-73f2-0310-859d-f6bbb57e9c96

e6fb8288 08-Jul-2003 Ingo Weinhold <ingo_weinhold@gmx.de>

Added missing methods in the header and a partial implementation in the source file.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3908 a95241bf-73f2-0310-859d-f6bbb57e9c96

2942bfb5 08-Jul-2003 Ingo Weinhold <ingo_weinhold@gmx.de>

Changes due to BPartition::UniqueID() -> ID().

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3907 a95241bf-73f2-0310-859d-f6bbb57e9c96

bf5ffb02 08-Jul-2003 Ingo Weinhold <ingo_weinhold@gmx.de>

Added missing manipulation methods (though no implementation). Some cleanup. Renamed UniqueID() to ID().

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3906 a95241bf-73f2-0310-859d-f6bbb57e9c96

8bb74546 08-Jul-2003 Ingo Weinhold <ingo_weinhold@gmx.de>

Implemented disk system iteration.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3905 a95241bf-73f2-0310-859d-f6bbb57e9c96

0cb59d9c 08-Jul-2003 Ingo Weinhold <ingo_weinhold@gmx.de>

Added IsReadOnlyMedia(), IsWriteOnceMedia(), and renamed IsRemovable() to IsRemovableMedia() for consistency.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3904 a95241bf-73f2-0310-859d-f6bbb57e9c96

671a7455 08-Jul-2003 Ingo Weinhold <ingo_weinhold@gmx.de>

Modified the visitor implementation a bit. The Visit() with the BPartition* argument now also gets the level of the partition in the hierarchy.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3900 a95241bf-73f2-0310-859d-f6bbb57e9c96

c54d68a8 08-Jul-2003 Ingo Weinhold <ingo_weinhold@gmx.de>

Should have waited a few more minutes... Renamed the methods {B,K}Partition::Is{Mountable,Partitionable}() to Contains{File,Partitioning}System(). Similar change for the respective flags (B_PARTITION_{MOUNTABLE,PARTITIONABLE}).

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3899 a95241bf-73f2-0310-859d-f6bbb57e9c96

5c7270ef 06-Jul-2003 Ingo Weinhold <ingo_weinhold@gmx.de>

Beginning of Disk Device API:
* Made all headers parsable. Also some smaller changes.
* Added empty source files for new classes.
* Changed obsolete implementations of existing classes, so that we
now have basic functionality for BDiskDevice[Roster] and BPartition.
Iterating through disk devices works and the data we get doesn't look
too bad for the beginning.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3883 a95241bf-73f2-0310-859d-f6bbb57e9c96

3bc6d6c5 04-Jul-2003 shadow303 <shadow303@nowhere.fake>

gcc 3 fixes

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3845 a95241bf-73f2-0310-859d-f6bbb57e9c96

242a2cbe 22-Jun-2003 Ingo Weinhold <ingo_weinhold@gmx.de>

Define the values in the source file rather than in the header.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3599 a95241bf-73f2-0310-859d-f6bbb57e9c96

98833b15 11-Jun-2003 haydentech <haydentech@nowhere.fake>

Cleaned-up the std namespace support

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3475 a95241bf-73f2-0310-859d-f6bbb57e9c96

20ff45e3 06-Jun-2003 Ingo Weinhold <ingo_weinhold@gmx.de>

Removed version 1.x of the DiskDevice API from the build. Will be replaced by version 2.x in the not so distant future.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3443 a95241bf-73f2-0310-859d-f6bbb57e9c96

a0a3f269 03-Jun-2003 haydentech <haydentech@nowhere.fake>

Namespace- and gcc3-related fixes

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3405 a95241bf-73f2-0310-859d-f6bbb57e9c96

1eed0e99 21-May-2003 Ingo Weinhold <ingo_weinhold@gmx.de>

Added missing inclusion of <unistd.h>.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3286 a95241bf-73f2-0310-859d-f6bbb57e9c96

150bfa37 13-Apr-2003 Ingo Weinhold <ingo_weinhold@gmx.de>

Added implementation of the node monitoring functions.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3065 a95241bf-73f2-0310-859d-f6bbb57e9c96

0f04e70b 23-Feb-2003 Ingo Weinhold <ingo_weinhold@gmx.de>

Added the GUI part of the dialog. Now it is fully functional (maybe not nice, but functional ;-).

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2822 a95241bf-73f2-0310-859d-f6bbb57e9c96

d4ebd517 23-Feb-2003 Ingo Weinhold <ingo_weinhold@gmx.de>

We build a separate libdiskdevice.so now, which will be integrated into libopenbeos, when the GUI stuff there is working.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2821 a95241bf-73f2-0310-859d-f6bbb57e9c96

9ca9a5bb 23-Feb-2003 Ingo Weinhold <ingo_weinhold@gmx.de>

Moved the hack making it possible to communicate with our registrar even, if not linking against libopenbeos from DiskDeviceTest to here.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2820 a95241bf-73f2-0310-859d-f6bbb57e9c96

24f179d9 22-Feb-2003 Ingo Weinhold <ingo_weinhold@gmx.de>

Commented out the DiskScannerAddOn class. It will be of no use until the whole DiskDevice API goes into libopenbeos.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2804 a95241bf-73f2-0310-859d-f6bbb57e9c96

fd57a946 22-Feb-2003 Ingo Weinhold <ingo_weinhold@gmx.de>

Changed the parameters of the CreateEditor() methods and added a EditingDone() method to the editor class.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2803 a95241bf-73f2-0310-859d-f6bbb57e9c96

c3815c8e 22-Feb-2003 Ingo Weinhold <ingo_weinhold@gmx.de>

Started with the implementation of partitioning support.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2801 a95241bf-73f2-0310-859d-f6bbb57e9c96

1a10cbe0 22-Feb-2003 Ingo Weinhold <ingo_weinhold@gmx.de>

Removed the method for getting a FS add-on list. Changed the dialogCenter parameter for the partition methods from BPoint to BRect.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2800 a95241bf-73f2-0310-859d-f6bbb57e9c96

6ba9af5a 22-Feb-2003 Ingo Weinhold <ingo_weinhold@gmx.de>

Added public and private methods for dealing with partition and FS add-ons.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2799 a95241bf-73f2-0310-859d-f6bbb57e9c96

8b56dae3 22-Feb-2003 Ingo Weinhold <ingo_weinhold@gmx.de>

The beginning of the partitioning dialog. Well, the very beginning. ;-)

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2798 a95241bf-73f2-0310-859d-f6bbb57e9c96

32de23c9 22-Feb-2003 Ingo Weinhold <ingo_weinhold@gmx.de>

Helper class: Represents a loaded add-on image.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2797 a95241bf-73f2-0310-859d-f6bbb57e9c96

7a5ee334 19-Feb-2003 Ingo Weinhold <ingo_weinhold@gmx.de>

Removed debugging output and comment changes.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2766 a95241bf-73f2-0310-859d-f6bbb57e9c96

4a841e49 19-Feb-2003 Ingo Weinhold <ingo_weinhold@gmx.de>

Added class BDiskDeviceList.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2763 a95241bf-73f2-0310-859d-f6bbb57e9c96

295fcc88 18-Feb-2003 Ingo Weinhold <ingo_weinhold@gmx.de>

Removed some debug info. Changes due to the removal of the extended_partition_info::partition_code field.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2751 a95241bf-73f2-0310-859d-f6bbb57e9c96

aa905a66 16-Feb-2003 Ingo Weinhold <ingo_weinhold@gmx.de>

Fixed warnings.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2724 a95241bf-73f2-0310-859d-f6bbb57e9c96

686968fb 16-Feb-2003 Ingo Weinhold <ingo_weinhold@gmx.de>

* Added support for updating.
* Implemented BDiskDevice::Eject() and GetName().
* Added a private support function for getting a messenger targeting the
DiskDeviceManager in the registrar.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2723 a95241bf-73f2-0310-859d-f6bbb57e9c96

7c44680a 11-Feb-2003 Ingo Weinhold <ingo_weinhold@gmx.de>

Renamed the private virtual slots back to their original (R5) names. We would break binary compatibility otherwise, or at least had to do some additional work to maintain nevertheless.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2683 a95241bf-73f2-0310-859d-f6bbb57e9c96

c947b113 09-Feb-2003 Ingo Weinhold <ingo_weinhold@gmx.de>

Implemented {Start,Stop}Watching().

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2679 a95241bf-73f2-0310-859d-f6bbb57e9c96

7a452094 09-Feb-2003 Ingo Weinhold <ingo_weinhold@gmx.de>

Fixed warning.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2678 a95241bf-73f2-0310-859d-f6bbb57e9c96

2af60585 09-Feb-2003 Ingo Weinhold <ingo_weinhold@gmx.de>

Added two open() versions to our kernel_interface, that re-try opening read-only, if desired. They are now used in BDirectory and BNode, which formerly failed on read-only devices.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2677 a95241bf-73f2-0310-859d-f6bbb57e9c96

03fa4a4f 08-Feb-2003 Ingo Weinhold <ingo_weinhold@gmx.de>

Implemented high-level iteration code. Various fixes.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2666 a95241bf-73f2-0310-859d-f6bbb57e9c96

f0bc0312 08-Feb-2003 Ingo Weinhold <ingo_weinhold@gmx.de>

Added DiskDevicePrivate.{h,cpp}, which contains the internally used iteration support classes.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2665 a95241bf-73f2-0310-859d-f6bbb57e9c96

2ed834e3 08-Feb-2003 Ingo Weinhold <ingo_weinhold@gmx.de>

Cleaned up BRoster's friends mess. All access to private BRoster functionality is now done through the newly added BRoster::Private class, which is BRoster's only friend (poor BRoster ;-).

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2664 a95241bf-73f2-0310-859d-f6bbb57e9c96

11b62694 07-Feb-2003 Ingo Weinhold <ingo_weinhold@gmx.de>

Added a C++ version of get_device_icon() and make use of it in BVolume.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2660 a95241bf-73f2-0310-859d-f6bbb57e9c96

b11d9a08 07-Feb-2003 Ingo Weinhold <ingo_weinhold@gmx.de>

The beginning of the implementation of the DiskDevice API. Basic iteration functionality is implemented, though not tested yet.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2659 a95241bf-73f2-0310-859d-f6bbb57e9c96

7c2e411d 01-Feb-2003 Ingo Weinhold <ingo_weinhold@gmx.de>

Small changes to the interface. Some fixes. And documentation added.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2616 a95241bf-73f2-0310-859d-f6bbb57e9c96

3e19fccb 31-Jan-2003 Ingo Weinhold <ingo_weinhold@gmx.de>

Added DiskDevice API source files with empty implementation.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2614 a95241bf-73f2-0310-859d-f6bbb57e9c96

38f832c7 26-Jan-2003 Ingo Weinhold <ingo_weinhold@gmx.de>

Removed Identifier() and FileSystem() methods. ShortName() shall return the respective identifier.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2552 a95241bf-73f2-0310-859d-f6bbb57e9c96

8672a4b3 19-Jan-2003 Ingo Weinhold <ingo_weinhold@gmx.de>

Added DiskScannerAddOn.cpp.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2516 a95241bf-73f2-0310-859d-f6bbb57e9c96

89b1309d 19-Jan-2003 Ingo Weinhold <ingo_weinhold@gmx.de>

This is the (first draft of the) API for userland GUI settings disk_scanner add-ons.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2505 a95241bf-73f2-0310-859d-f6bbb57e9c96

46ce5c12 08-Dec-2002 Ingo Weinhold <ingo_weinhold@gmx.de>

Added set_volume_name() implementation. This is a bit of a hack as it uses a private libroot function.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2208 a95241bf-73f2-0310-859d-f6bbb57e9c96

0813d0d4 08-Dec-2002 Ingo Weinhold <ingo_weinhold@gmx.de>

Fixed/rewrote the implementation. Added doxygen style documentation.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2207 a95241bf-73f2-0310-859d-f6bbb57e9c96

21881ce5 08-Dec-2002 Ingo Weinhold <ingo_weinhold@gmx.de>

Added file header.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2206 a95241bf-73f2-0310-859d-f6bbb57e9c96

89ec8a81 07-Nov-2002 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

Moved CharStream class out of Parser.{h,cpp} and into its own file

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1874 a95241bf-73f2-0310-859d-f6bbb57e9c96

e5f9569d 07-Nov-2002 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

Added escape_path() functions

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1873 a95241bf-73f2-0310-859d-f6bbb57e9c96

0eb6cfed 07-Nov-2002 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

Added sniffer/CharStream.cpp to the build

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1872 a95241bf-73f2-0310-859d-f6bbb57e9c96

40ff0169 27-Oct-2002 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

Updated an error message.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1718 a95241bf-73f2-0310-859d-f6bbb57e9c96

e106754a 27-Oct-2002 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

Changed certain B_BAD_VALUE errors to more applicable B_BAD_REPLY error code.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1717 a95241bf-73f2-0310-859d-f6bbb57e9c96

32b8ee2e 26-Oct-2002 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

Renamed reserved functions to match those in R5, due to linking
incompatibilities that appear to possibly be due to R5 versions
of tests in libstoragetest_r5.so being compiled with our headers...

At any rate, this appears to fix the BQuery linking problems.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1712 a95241bf-73f2-0310-859d-f6bbb57e9c96

23d36867 26-Oct-2002 beveloper <beveloper@nowhere.fake>

fixed BFile

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1682 a95241bf-73f2-0310-859d-f6bbb57e9c96

480ed2e7 07-Oct-2002 Ingo Weinhold <ingo_weinhold@gmx.de>

Fixed bug in ReadAttrString(): The resulting string was one character longer, when the string in the attribute was null terminated.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1437 a95241bf-73f2-0310-859d-f6bbb57e9c96

53bf00c9 06-Oct-2002 Ingo Weinhold <ingo_weinhold@gmx.de>

Fixed actual bug in set_stat(). Discovered by the gcc from GeekGadgets.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1415 a95241bf-73f2-0310-859d-f6bbb57e9c96

a04efc92 06-Oct-2002 Ingo Weinhold <ingo_weinhold@gmx.de>

Added variable initializations. Not necessary, but they please the compiler.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1414 a95241bf-73f2-0310-859d-f6bbb57e9c96

a43a7a8d 01-Oct-2002 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

Relocated directory determining code to a more appropriate location.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1330 a95241bf-73f2-0310-859d-f6bbb57e9c96

a5519587 01-Oct-2002 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

Removed directory and symlink special cases from
GuessMimeType(entry_ref*) and placed them in

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1329 a95241bf-73f2-0310-859d-f6bbb57e9c96

86c6e9c1 01-Oct-2002 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

+ Moved some code from SnifferRules::GuessMimeType(entry_ref*) that
really didn't belong there into Database::GuessMimeType(entry_ref*)
+ Added special meta mime file case to Database::GuessMimeType(entry_ref*)

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1328 a95241bf-73f2-0310-859d-f6bbb57e9c96

98977256 01-Oct-2002 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

Added kMetaMimeType constant

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1327 a95241bf-73f2-0310-859d-f6bbb57e9c96

04c26f3c 01-Oct-2002 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

Finished implementation

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1326 a95241bf-73f2-0310-859d-f6bbb57e9c96

09dad369 01-Oct-2002 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

Updated filesystem traversal code to skip files/devices that don't
support attributes.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1325 a95241bf-73f2-0310-859d-f6bbb57e9c96

cea55577 01-Oct-2002 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

Updated to match new entry_ref_is_root_dir() calling convention.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1323 a95241bf-73f2-0310-859d-f6bbb57e9c96

28f43bbd 01-Oct-2002 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

+ Updated entry_ref_is_root_dir() to Be style calling conventions
+ Added device_is_root_device() call

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1322 a95241bf-73f2-0310-859d-f6bbb57e9c96

0a87d01c 29-Sep-2002 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

Fixed a couple of warnings

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1275 a95241bf-73f2-0310-859d-f6bbb57e9c96

16be2fb8 29-Sep-2002 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

Added CreateAppMetaMime, MimeUpdateThread, and
UpdateMimeInfoThread to the build

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1274 a95241bf-73f2-0310-859d-f6bbb57e9c96

06d82133 29-Sep-2002 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

Updated and unified update_mime_info() and create_app_meta_mime()
implementations to work with new, wholly-registrar-based mime update

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1273 a95241bf-73f2-0310-859d-f6bbb57e9c96

b690150e 29-Sep-2002 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

Removed mime update code

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1271 a95241bf-73f2-0310-859d-f6bbb57e9c96

162f340b 29-Sep-2002 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

UpdateMimeInfoThread class, which is a subclass of MimeUpdateThread
that implements updating specific to update_mime_info().

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1268 a95241bf-73f2-0310-859d-f6bbb57e9c96

56a452bb 29-Sep-2002 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

CreateAppMetaMimeThread class, which is a subclass of MimeUpdateThread
that implements updating specific to create_app_meta_mime().

Note that the implementation is not 100% correct yet, and the
OBOS::BMimeType::create_app_meta_mime() tests still fail.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1267 a95241bf-73f2-0310-859d-f6bbb57e9c96

4707046c 29-Sep-2002 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

MimeUpdateThread class, which is a RegistrarThread subclass that
implements the functionality common to both mime update calls
(update_mime_info() and create_app_meta_mime()), namely walking
through the filesystem and performing updates.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1266 a95241bf-73f2-0310-859d-f6bbb57e9c96

4bd7d39c 23-Sep-2002 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

Added AssociateTypes.cpp and SnifferRules.cpp to the mix

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1153 a95241bf-73f2-0310-859d-f6bbb57e9c96

1bd963b6 23-Sep-2002 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

+ Added file-extension based mime type guessing
+ Added sniffer rule based mime type guessing
+ Added get_device_icon()
+ Added complete (synchronous, asynchronous; recursive,
non-recursive; forcing, non-forcing; you name it we got it :-)
update_mime_info() implementation.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1152 a95241bf-73f2-0310-859d-f6bbb57e9c96

743e936e 23-Sep-2002 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

Augmented a comment to include a note on string length requirements.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1151 a95241bf-73f2-0310-859d-f6bbb57e9c96

4e722de3 23-Sep-2002 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

Tidied up a couple of minor oversights.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1150 a95241bf-73f2-0310-859d-f6bbb57e9c96

2150894b 23-Sep-2002 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

Added BytesNeeded() functions to all the sniffer classes to allow
a pre-read data stream to be sniffed instead of actual files on disk.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1149 a95241bf-73f2-0310-859d-f6bbb57e9c96

4494844f 23-Sep-2002 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

Initial checkin. BPrivate::Storage::Mime::SnifferRules class, which is
responsible for managing sniffer rules and sniffing files and data

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1147 a95241bf-73f2-0310-859d-f6bbb57e9c96

09b4d458 23-Sep-2002 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

Initial checkin. BPrivate::Storage::Mime::AssociatedTypes class, which
is responsible for managing associations between mime types and
file extensions.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1146 a95241bf-73f2-0310-859d-f6bbb57e9c96

9a17c3cf 23-Sep-2002 Ingo Weinhold <ingo_weinhold@gmx.de>

Dealt with the *_LENGTH+1 issue: Removed all "+1"s in buffer allocations and adjusted checks etc.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1131 a95241bf-73f2-0310-859d-f6bbb57e9c96

e3a2f206 09-Sep-2002 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

+ Added SetSupportedTypes() test
+ Modified BMimeType::SetSupportedTypes functionality so it keeps track of
stranded types (i.e. previously supported types that have not had the now
unsupporting app signature removed from their supporting apps list yet due
to a false fullSync parameter) over consecutive SetSupportedTypes(...,
false) calls and updates all appropriate stranded types on the next
SetSupportedTypes(..., true) call.
+ Added fullSync parameter to BMimeType::DeleteSupportedTypes
+ Made BMimeType::Delete() do a DeleteSupportedTypes(..., true) call to
properly update the supporting apps lists when a mime type is deleted.
+ Added initial BMimeType::Get/SetSnifferRule
+ Updated BMimeType::CheckSnifferRule() to return B_BAD_VALUE when passed
a NULL rule string.
+ Brought CheckSnifferRule() tests up to date
+ Added lots of Mime::Database doxygen
+ Added any missing mime monitor notifications in Mime::Database
+ Possibly made some other changes as well... :-)

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1004 a95241bf-73f2-0310-859d-f6bbb57e9c96

baa326e0 09-Sep-2002 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

Implemented Get/SetSnifferRule()
Added SetSupportedTypes() documentation
Removed a few unnecessary BMessage copies in a couple of functions

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1003 a95241bf-73f2-0310-859d-f6bbb57e9c96

76ba3434 03-Sep-2002 Ingo Weinhold <ingo_weinhold@gmx.de>

Replaced applications of BBitmap::SetBits() by BBitmap::ImportBits().

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@978 a95241bf-73f2-0310-859d-f6bbb57e9c96

bb74cb4b 02-Sep-2002 Ingo Weinhold <ingo_weinhold@gmx.de>

Incorporated libstorage.so into libopenbeos.so.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@964 a95241bf-73f2-0310-859d-f6bbb57e9c96

cc3b8927 02-Sep-2002 Ingo Weinhold <ingo_weinhold@gmx.de>

Storage Kit source files.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@963 a95241bf-73f2-0310-859d-f6bbb57e9c96

17819be3 30-Aug-2002 Ingo Weinhold <ingo_weinhold@gmx.de>

* Adjusted SetSupportedTypes() to make use of the new
* {Get,Set}IconForType() now check the supplied type for validity.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@944 a95241bf-73f2-0310-859d-f6bbb57e9c96

f8cada89 30-Aug-2002 Ingo Weinhold <ingo_weinhold@gmx.de>

Fixed iteration through message field entries in SetSupportedTypes().

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@942 a95241bf-73f2-0310-859d-f6bbb57e9c96

35ab40ee 30-Aug-2002 Ingo Weinhold <ingo_weinhold@gmx.de>

Database::SetSupportedTypes() now installs the not yet installed supported types.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@941 a95241bf-73f2-0310-859d-f6bbb57e9c96

976e1a97 28-Aug-2002 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

+ Added fullSync parameter to SetSupportedTypes()
+ Implemented GetSupportingApps()

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@925 a95241bf-73f2-0310-859d-f6bbb57e9c96

b86972c2 28-Aug-2002 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

Added GetSupportingApps() message field constants

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@924 a95241bf-73f2-0310-859d-f6bbb57e9c96

41b9ba91 28-Aug-2002 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

Added GetSupportingApps()/SetSupportedTypes() functionality

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@923 a95241bf-73f2-0310-859d-f6bbb57e9c96

682805b2 28-Aug-2002 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

Added SupportingApps.cpp to libstorage

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@922 a95241bf-73f2-0310-859d-f6bbb57e9c96

ee0cf101 28-Aug-2002 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

Handles supporting application management. This is an
initial, theoretically fully functional implementation.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@919 a95241bf-73f2-0310-859d-f6bbb57e9c96

02fd0582 27-Aug-2002 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

Cleaned up warnings

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@900 a95241bf-73f2-0310-859d-f6bbb57e9c96

32f45afc 27-Aug-2002 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

+ Added GetInstalled[Super]Types functionality
+ Cleaned up warnings
+ Added documentation

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@899 a95241bf-73f2-0310-859d-f6bbb57e9c96

657fea1c 25-Aug-2002 Ingo Weinhold <ingo_weinhold@gmx.de>

Fixed missing return value in SetType().

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@882 a95241bf-73f2-0310-859d-f6bbb57e9c96

49aeab33 25-Aug-2002 Ingo Weinhold <ingo_weinhold@gmx.de>

Added BNodeInfo and BAppFileInfo to the build.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@881 a95241bf-73f2-0310-859d-f6bbb57e9c96

98da112c 25-Aug-2002 Ingo Weinhold <ingo_weinhold@gmx.de>

Complete implementation. The 'supporting types' methods are untested as they need BMimeType/registar support. SetSupportedTypes() may need some adjustions when that is available.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@880 a95241bf-73f2-0310-859d-f6bbb57e9c96

537842b6 23-Aug-2002 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

Split into storage/mime/* files, and thus removed

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@863 a95241bf-73f2-0310-859d-f6bbb57e9c96

e20a514a 23-Aug-2002 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

After implementing the BMimeType::GetInstalled[Super]Types()
functionality, it became apparent that some restructuring was
needed if I wanted to keep things clean and managble.
storage/MimeDatabase.{h,cpp} have been broken into:

+ MIME database constants
+ high-level database access functions like open_type(),
read_mime_attr(), etc.

+ atomic read functions
+ is_installed()
+ get_icon_data()

+ Mime::Database class, which is responsible for all write,
non-atomic read, and mime monitor functionality.

+ Helper class for Mime::Database::GetInstalled[Super]Types()

+ Helper class for Mime::InstalledTypes

I haven't merged my intial, somewhat cludgy GetInstalled[Super]Types
implementation into the new setup yet. That comes next, and it ought
to be a more graceful implementation now.

I also implemented BMimeType::Get/SetSupportingTypes(), though
they haven't been tested yet (sorry).

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@862 a95241bf-73f2-0310-859d-f6bbb57e9c96

1c4b4100 23-Aug-2002 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

Added to_lower() functions

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@861 a95241bf-73f2-0310-859d-f6bbb57e9c96

3155eae2 21-Aug-2002 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

+ Added code/updated tests for
- AttrInfo
- FileExtensions
+ Updated Delete() code to send monitor updates
+ Tenatively added "be:action" field to monitor messages
+ Added data type constants

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@847 a95241bf-73f2-0310-859d-f6bbb57e9c96

1ed04c7c 20-Aug-2002 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

Added code for:
+ {Get,Set}IconForType()
+ Delete*() functions

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@834 a95241bf-73f2-0310-859d-f6bbb57e9c96

dff6cb3f 19-Aug-2002 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

+ Added code for:
- {Get,Set}PreferredApp()
- {Get,Set}AppHint()
- {Get,Set}Icon() (though it's a hacked up temporary version)

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@820 a95241bf-73f2-0310-859d-f6bbb57e9c96

e9e56038 19-Aug-2002 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

Forgot a #include, I guess...

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@819 a95241bf-73f2-0310-859d-f6bbb57e9c96

55f345fd 19-Aug-2002 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

+ Added code for:
- {Get,Set}PreferredApp()
- {Get,Set}AppHint()
- {Get,Set}Icon()
+ Added any missing doxygen

SetIcon() is currently not implemented as I would like,
due to us needing an OBOS::BBitmap implementation.
Thus there are two versions and the GetIconData()
function until that day comes around.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@818 a95241bf-73f2-0310-859d-f6bbb57e9c96

83a812a1 18-Aug-2002 Ingo Weinhold <ingo_weinhold@gmx.de>

Adjusted the SetSupportedTypes() doxygen comments to reflect knowledge gained from tests -- I hope, I understand the syncAll flag now.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@810 a95241bf-73f2-0310-859d-f6bbb57e9c96

d6b205f3 17-Aug-2002 Ingo Weinhold <ingo_weinhold@gmx.de>

Added BAppFileInfo header, empty implementation with doxygen comments.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@796 a95241bf-73f2-0310-859d-f6bbb57e9c96

f8b76382 17-Aug-2002 Ingo Weinhold <ingo_weinhold@gmx.de>

Fixed some comments.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@795 a95241bf-73f2-0310-859d-f6bbb57e9c96

f231d090 16-Aug-2002 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

+ Added fMimeDatabase member
+ {Get,Set}{Long,Short}Description()
+ {Start,Stop}Watching()
+ Install(), Delete(), IsInstalled()

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@788 a95241bf-73f2-0310-859d-f6bbb57e9c96

fc7d3358 16-Aug-2002 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

+ Added MimeDatabase
+ OBOS app kit headers are now used

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@787 a95241bf-73f2-0310-859d-f6bbb57e9c96

9f3d4851 16-Aug-2002 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

Initial checkin; MimeDatabase class used to handle all actual mime
database access.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@785 a95241bf-73f2-0310-859d-f6bbb57e9c96

ef753322 16-Aug-2002 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

Updated BQuery's BMessenger hack to be more legit (and
to allow libstorage to compile using public app kit headers)

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@783 a95241bf-73f2-0310-859d-f6bbb57e9c96

78359574 16-Aug-2002 Ingo Weinhold <ingo_weinhold@gmx.de>

The implementation is now complete and passes the tests. Reimplement almost all methods.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@780 a95241bf-73f2-0310-859d-f6bbb57e9c96

09d84e61 12-Aug-2002 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

+ Changed StorageKit namespace to BPrivate::Storage
+ Changed Sniffer namespace to BPrivate::Storage::Sniffer

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@714 a95241bf-73f2-0310-859d-f6bbb57e9c96

36a3a8f0 11-Aug-2002 Ingo Weinhold <ingo_weinhold@gmx.de>

Moved doxygen comments into the source file. Completed/extended/rewrote them. Changes to style and indentation.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@707 a95241bf-73f2-0310-859d-f6bbb57e9c96

06d1abcd 10-Aug-2002 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

Added DisjList.cpp

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@686 a95241bf-73f2-0310-859d-f6bbb57e9c96

93d145bb 10-Aug-2002 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

+ Added support for "-i" flags and case insensitive matching
+ Renamed Expr class to DisjList, which is more descriptive
as to its function
+ Added ' and " to the list of allowed characters in an
unquoted string.
+ Added updated sniffer rule grammar to doxygen for the
Parser class

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@685 a95241bf-73f2-0310-859d-f6bbb57e9c96

fe70cd16 09-Aug-2002 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

+ Updated all the parsing code to use std::strings everywhere
instead of const char*'s to allow for rules with NULL characters
embedded in them.
+ Updated Rule::Sniff() to actually return a useful value

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@662 a95241bf-73f2-0310-859d-f6bbb57e9c96

60ee71d3 08-Aug-2002 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

+ Added some documentation
+ Fixed a bug with 0eXXX floats being handled improperly
+ Updated a few error messages to give proper character
stream positions.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@650 a95241bf-73f2-0310-859d-f6bbb57e9c96

0bc621d5 08-Aug-2002 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

+ Added some documentation
+ Now verifies the given priority is valid

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@649 a95241bf-73f2-0310-859d-f6bbb57e9c96

10db8711 08-Aug-2002 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

Added some documentation

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@648 a95241bf-73f2-0310-859d-f6bbb57e9c96

ef88abd1 07-Aug-2002 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

+ Added priority verification (0.0 <= valid priority <= 1.0)
+ Fixed a stupid bug in my hexToChar() function
+ Added code to actually return the parsed in priority to ParsePriority()...
+ Added code to actually SetTo() the result in ParseRule()...
+ Changed most "Sniffer scanner error" messages to "Sniffer
pattern error" messages.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@630 a95241bf-73f2-0310-859d-f6bbb57e9c96

390dce8d 06-Aug-2002 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

Parser is finished (or very nearly so)!!! :-)
+ Added support for extended notation floating point numbers,
as well as signed (+ and -) floats.
+ Finished up parsing code
+ Moved Err class into it's own header/source pair, since I
started using it all over the place in the sniffer code.
+ Did my darndest to make sure I wasn't leaking memory
+ Matched up error messages as best as possible with R5's
error message. Some couldn't be matched, some were improved.

There *are* a few things left to do. I don't think priorities are
verified to be valid (0.0 <= x <= 1.0). More tests also need to
be written. Things have solidified enough now that documentation
is a reasonable thing to start considering as well.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@608 a95241bf-73f2-0310-859d-f6bbb57e9c96

01293d6e 06-Aug-2002 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

+ Added InitCheck()
+ Added Priority()
+ Added Sniff()
+ Replaced ExprList typedef with plain old std::vector<Expr*>
so I wouldn't forget what the hell kind of list I was working with.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@607 a95241bf-73f2-0310-859d-f6bbb57e9c96

9d97f52d 06-Aug-2002 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

Added InitCheck() and GetErr()

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@606 a95241bf-73f2-0310-859d-f6bbb57e9c96

e3c631d6 06-Aug-2002 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

Added new sniffer files to libstorage.so

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@604 a95241bf-73f2-0310-859d-f6bbb57e9c96

74cd43ec 06-Aug-2002 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

New mime sniffer support classes

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@601 a95241bf-73f2-0310-859d-f6bbb57e9c96

0d2978ea 29-Jul-2002 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

Added Range.cpp

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@533 a95241bf-73f2-0310-859d-f6bbb57e9c96

68faee10 29-Jul-2002 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

+ Switched to std::vector in favor of BList
+ Added a few minor tweaks

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@532 a95241bf-73f2-0310-859d-f6bbb57e9c96

4574a75f 29-Jul-2002 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

+ Got rid of global TokenStream object
+ Started on Parser class
+ Moved parsing functions into Parser class
+ Added Pos() member to Err class to allow for
snazzy BMimeType::CheckSnifferRule() error strings.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@531 a95241bf-73f2-0310-859d-f6bbb57e9c96

51156f1f 29-Jul-2002 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

Way too many builds later, I finally realized I put these #includes in the wrong place.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@530 a95241bf-73f2-0310-859d-f6bbb57e9c96

0be1fe8a 29-Jul-2002 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

New MIME Sniffer files

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@529 a95241bf-73f2-0310-859d-f6bbb57e9c96

224e9272 27-Jul-2002 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

Added "position in original character stream" marker to Token class

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@490 a95241bf-73f2-0310-859d-f6bbb57e9c96

dc685e9a 27-Jul-2002 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

Finished scanner:
+ Octals are now handled properly in both quoted and
unquoted strings
+ Added support for \xXX style hex escapes in both
quoted and unquoted strings
+ Finished up the tests, so I think pretty much everything
should be working
NOTE: signed floating point numbers are no longer supported,
as they have no usefulness to sniffer rules
NOTE: extended format floating point numbers (i.e. 2.4e23) are
no longer supported, as they have no usefulness to sniffer rules.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@489 a95241bf-73f2-0310-859d-f6bbb57e9c96

5da54924 27-Jul-2002 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

+ Moved internally used classes into header to allow for testing.
+ Added EmptyToken, Integer, and FloatingPoint TokenTypes.
+ Added IntToken and IntegerToken classes.
+ Updated scanner, which now handles numbers as well. I believe
it's nearly complete, although I'm almost positive it doesn't
handle octals correctly yet...

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@477 a95241bf-73f2-0310-859d-f6bbb57e9c96

2a2585c5 26-Jul-2002 Ingo Weinhold <ingo_weinhold@gmx.de>

Fixed an unchecked error in get_app_path().

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@459 a95241bf-73f2-0310-859d-f6bbb57e9c96

674e18fb 26-Jul-2002 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

Initial MIME sniffer rule parser checkin. The first draft of the
scanner portion of the parser is done, but completely untested
and unused. More to come...

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@452 a95241bf-73f2-0310-859d-f6bbb57e9c96

4177635e 24-Jul-2002 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

Added initialization and MIME string functions.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@416 a95241bf-73f2-0310-859d-f6bbb57e9c96

762a48a0 23-Jul-2002 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

+ Finished BMimeType doxygen
+ Finally checked in my remaining BMimeType tests... :-)
NOTE -- The BMimeType::GetSupportingApps() test is
not yet finished. For some reason GetSupportingApps()
is returning a few strange signatures that don't appear
to be in the database. I'm still figuring out where they're
coming from.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@408 a95241bf-73f2-0310-859d-f6bbb57e9c96

5ebee1cf 23-Jul-2002 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

BVolume and BVolumeRoster updates, courtesty of Vincent Dominguez

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@405 a95241bf-73f2-0310-859d-f6bbb57e9c96

70c31e51 10-Jul-2002 Ingo Weinhold <ingo_weinhold@gmx.de>

Reflect the latest change to the UsePublicHeaders rule.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@43 a95241bf-73f2-0310-859d-f6bbb57e9c96

32bc7795 09-Jul-2002 Ingo Weinhold <ingo_weinhold@gmx.de>

Adjusted the original SK Jamfile to work in its new friendly neighborhood.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@28 a95241bf-73f2-0310-859d-f6bbb57e9c96

7e4c96cf 09-Jul-2002 Ingo Weinhold <ingo_weinhold@gmx.de>

SymLink.h included kernel_interface.h, which is a private header. Doh!

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@24 a95241bf-73f2-0310-859d-f6bbb57e9c96

52a38012 08-Jul-2002 ejakowatz <ejakowatz@nowhere.fake>

It is accomplished ...

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10 a95241bf-73f2-0310-859d-f6bbb57e9c96