History log of /haiku-fatelf/src/kits/storage/Entry.cpp
Revision Date Author Comments
# b2007372 12-Nov-2012 Axel Dörfler <axeld@pinc-software.de>

Added BEntry::Name() method.

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


# 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.


# 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.


# 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


# 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


# 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


# 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
welcome.
* 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


# 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


# 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


# 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


# 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


# 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


# 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


# 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


# 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,
though.
* 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


# 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


# 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


# 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


# 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


# 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


# 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


# 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


# 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


# 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


# 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


# 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


# 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


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

Added BEntry::Name() method.

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


# 9be774b553296a712704078314f2291ae5fc352c 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.


# d4fa97f8f8ac3fd58e45005b9b0645140afb1fcf 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.


# e1b526b95a2dc473c254bc332454c53ca892ac5e 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


# 861f2ade03dc5d9e8aec68b0a5b5e31d5fb81319 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


# 23f83f8ccbe7b68f0e9e7398ab7e1782629c98d7 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


# 2c69b5b6c0e7b481a0c43366a1942a6055cbb864 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
welcome.
* 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


# 42c9b01aa624559ecb44976c02d02f3a1b355ae9 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


# 0af6bceba489860bc597088412d86215c5dca7e4 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


# 6eb09230bae52bcdf045e1f1920b67205c29adc8 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


# 18cd67c76072f825c4a7ba58414771d47fd1bfa2 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


# 2bf5ba0562351ca47019010c23b06a9d4cf6892b 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


# 58228478427f055e0b8f540925e76514b54e4119 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


# 1b32947d3f6c19dc1716a27d50361dcf59c27882 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


# 7b3d36e5aa0992fc1a69816d2f90e2e6be56821e 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,
though.
* 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


# 979aeaf71cf0c238793ee9a49d91997342ce5fdb 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


# 219dacab3cbce36004f4fe91f6c0ef2dbff1feb9 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


# b06942c6049d167350529b36a6f7f559383a764f 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


# db10640de90f7f9519ba2da9577b7c1af3c64f6b 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


# 40467b5bd1c388aa8f8ea97d6ecedf89e821011c 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


# 17e6de7a37c5c61f45eb724de108daa70905cb8f 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


# 98833b15bf4967b0b12fda60065cda7ac83e091d 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


# a0a3f269a4eae19d6fdbffdb581e888219988160 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


# cea5557794b7153e70279c1b4b3916a212f679ff 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


# 9a17c3cfac5f2463b41b3f233975a2904ef10135 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


# 09d84e61b6c2629d253dce1e7d7e944943d3e40e 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


# 52a380120846174213ccce9c4aab0dda17c72083 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