#
268f99dd |
| 22-Dec-2021 |
Niels Sascha Reedijk <niels.reedijk@gmail.com> |
Merge branch 'master' into dev/netservices
|
#
2532a287 |
| 23-Nov-2021 |
Augustin Cavalier <waddlesplash@gmail.com> |
Avoid using unions for LongDirEntry.
GCC still assumes that the dirent has no data past the end for some scenarios here and still mis-optimizes things. Therefore, drop the usages of unions altogethe
Avoid using unions for LongDirEntry.
GCC still assumes that the dirent has no data past the end for some scenarios here and still mis-optimizes things. Therefore, drop the usages of unions altogether, and instead use a casted character array.
Additionally, use B_FILE_NAME_LENGTH for the array, not B_PATH_NAME_LENGTH, and make sure to add 1 for the NULL terminator.
show more ...
|
#
8f03af00 |
| 18-Nov-2021 |
Augustin Cavalier <waddlesplash@gmail.com> |
Storage: Rework LongDirEntry to be a union.
Our dirent structure is "slim": it has a flexible-length array at the end which must be allocated to whatever size the consumer wants. However, we use [1]
Storage: Rework LongDirEntry to be a union.
Our dirent structure is "slim": it has a flexible-length array at the end which must be allocated to whatever size the consumer wants. However, we use [1] there and not [0] or [], which meant GCC thought it was not a flexible-length array, and so it optimized various string accesses that it assumed must be always false. Among these was BDirectory's check for "." and "..", and so that resulted in infinite loops.
When changing our dirent structure to a proper FLA instead of [1], GCC then throws errors on LongDirEntry as it has data "after" the FLA; which is what we want, but there is no way to tell GCC that. So now we use a union instead, which is the proper way to statically allocate a FLA.
This is part of #17389, but the real fix requires changing our dirent structure, which is coming in a separate commit.
show more ...
|
#
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
* {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
show more ...
|
#
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
* 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
show more ...
|
#
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
* 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
show more ...
|
#
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
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
show more ...
|
#
e5f9569d |
| 08-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
|
#
1c4b4100 |
| 24-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
|
#
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-f6bbb
+ 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
show more ...
|
#
82b75665 |
| 12-Aug-2002 |
Tyler Dauwalder <tylerdauwalder@nowhere.fake> |
Updated header guards to Be, Inc. style.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@713 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
52a38012 |
| 09-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
|