History log of /haiku/src/kits/storage/Node.cpp (Results 1 – 25 of 38)
Revision Date Author Comments
# 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 ...


# 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: Sty

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.

show more ...


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

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

show more ...


# 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

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)

show more ...


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

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.

show more ...


# 9f81ca83 27-Sep-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

Merge branch 'package-management'

Conflicts:
src/preferences/network/Jamfile


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


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

Add the obvious node_ref constructor


# a84e14ca 16-Dec-2011 Alex Wilson <yourpalal2@gmail.com>

Merge branch 'master' of git://github.com/haiku/haiku


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

Merge branch 'master' into pm-flat

Conflicts:
build/jam/HaikuImage
build/jam/OptionalBuildFeatures
build/jam/OptionalPackages
build/jam/UserBuildConfig.sample
data/bin/installoptionalpackage
s

Merge branch 'master' into pm-flat

Conflicts:
build/jam/HaikuImage
build/jam/OptionalBuildFeatures
build/jam/OptionalPackages
build/jam/UserBuildConfig.sample
data/bin/installoptionalpackage
src/apps/deskbar/DeskbarMenu.cpp
src/servers/debug/DebugServer.cpp
src/system/kernel/fs/vfs.cpp

show more ...


# 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

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

show more ...


# 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


# 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


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

* 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

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


# cf7e57ef 07-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


# 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() i

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

show more ...


# 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


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


# 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


12