History log of /haiku/src/add-ons/kernel/file_systems/udf/Icb.cpp
Revision Date Author Comments
# 9d242fb9 18-Nov-2021 Augustin Cavalier <waddlesplash@gmail.com>

file_systems & Tracker: Do not assume sizeof(dirent) contains 1 byte for the name.

At present, it does, but that is an oddity we have preserved from BeOS
that the next commit is going to remove. (This commit thus wastes 1 byte
without the following one.)

Most changes are pretty straightforward: only a +1 is needed,
and a few removed from sizing calculations. Some filesystems like UDF
originally passed back the length with the \0 included, so they have
been adjusted further. UFS2 had some other sizing problems which are also
corrected in this commit.


# 3218588c 29-Sep-2020 Murai Takashi <tmurai01@gmail.com>

file_systems/udf: Fix -Wformat=

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


# 93845aec 11-Jun-2020 Axel Dörfler <axeld@pinc-software.de>

block_cache: Change signature of *_etc() functions

* This allows file systems to retrieve the actual error code on a
failure, and report it to the user.
* All affected file systems have been adjusted to the API change.
This is a binary incompatible change.

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


# 097bbc7f 29-Apr-2019 Augustin Cavalier <waddlesplash@gmail.com>

file_systems: Remove now-redundant bounds checks before file_cache_read().

Change-Id: Iafb7d188c7e7cb4406d924eb3354a7ede40c6641
Reviewed-on: https://review.haiku-os.org/c/1421
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Reviewed-by: Michael Lotz <mmlr@mlotz.ch>


# 2aa0e54e 17-Jul-2013 Murai Takashi <tmurai01@gmail.com>

Fix called C++ object pointer is null

Signed-off-by: Jérôme Duval <jerome.duval@gmail.com>


# 7e5b0f96 09-May-2013 Jérôme Duval <jerome.duval@gmail.com>

udf: fixes 64 bit warnings


# ee3c8867 23-Oct-2012 Jérôme Duval <jerome.duval@gmail.com>

UDF: use mirror metadata file when needed

* style fixes
* try the mirror metadata file in case read fails on the main file


# c530d46c 09-Oct-2012 Jérôme Duval <jerome.duval@gmail.com>

UDF: support for metadata partition (feature from 2.50)

* added Icb::FindBlock() to find block in extents.
* MetadataPartition uses extents descriptors found in the metadatafile
to lookup blocks on a physical partition
* uses struct timespec instead of time_t
* added init_entities() to call C++ structures constructors. This is
called at module initialization, C++ constructors are currently not called when
a kernel module is loaded.
* tested with a sample bluray ISO.


# 17d87ddf 28-Feb-2010 Michael Lotz <mmlr@mlotz.ch>

* Finish the partition scanning part so that UDF is recognized and mountable.
* Added myself to the copyrights.


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


# af15ee68 28-Feb-2010 Michael Lotz <mmlr@mlotz.ch>

* Implement udf_io and udf_get_file_map.
* Add file map and cache and do reads through the file_cache for file ICBs.
* Move the private _Read() backend from the header to the implementation file.
* Read() is now only used for directory iteration.
* Turned off the verbose debug output.
* Minor cleanup.

This fixes the abuse of the block_cache, should allow executables on UDF and
won't panic on protected content.


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


# 8d3a8691 27-Feb-2010 Michael Lotz <mmlr@mlotz.ch>

* UDF didn't actually initializing _flags to 0 (same as with fat).
* Set the _type as well, this gets file listings work.
* Some cleanup and debug output moves/fixes/additions.

Yet crashes when accessing files though.


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


# 20d84995 20-Sep-2009 Rene Gollent <anevilyak@gmail.com>

Various changes to get this mostly compiling, with the exception of a template issue I don't yet completely understand.


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


# 06505658 23-Aug-2008 Salvatore Benedetto <salvatore.benedetto@gmail.com>

* Removed +1 in calculating utf string length as the null char was already included
* Improved debug output


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


# 43a5ec83 22-Aug-2008 Salvatore Benedetto <salvatore.benedetto@gmail.com>

* Added some more TRACE, eventually they will be removed
* replace sizeof(dirent) with sizeof(struct dirent) as the pointer passed was called dirent!
that would cause d_reclen to be set to the wrong value, making panic. Thanks Stefano!

I finally managed to mount and list its content.



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


# e2dc263c 22-Aug-2008 Salvatore Benedetto <salvatore.benedetto@gmail.com>

* Replaced some PRINT with TRACE
* Rename error to status
* Fix assignements in udf_read_stat
* Added udf_{close_dir,free_dir_cookie} hook functions which prevented
udf from mounting the partition

It seems mouting an udf partition works correctly but I'm still unable
to list its content.


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


# a4124725 18-Aug-2008 Salvatore Benedetto <salvatore.benedetto@gmail.com>

* Removed DirectoryIterator.{h,cpp} and included them in Icp.{h,cpp}
* Porting Icb to new file cache system


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


# 245aecda 21-Jun-2007 Axel Dörfler <axeld@pinc-software.de>

Got rid of vnode_id and mount_id, replaced with ino_t and dev_t.


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


# 0e0c7a1e 10-Jul-2004 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

Add COMPILE_FOR_R5 wrappers with extern "C" declarations for when
we compile the R5 add-on, since we're using the Haiku fsproto.h, and the
linker doesn't like it when the fsproto.h declarations are extern "C"'d.


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


# f50008f9 05-Jan-2004 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

Switched back to new(nothrow), now that it works properly again.


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


# de76a7eb 17-Dec-2003 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

Added file entry dumps.


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


# 21ea9aea 02-Dec-2003 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

Removed category stuff from UdfDebug.h since it ended
up not being as useful as I'd hoped, and I need to use the
same debugging macros for makeudfimage as for udf.


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


# 1379caca 24-Nov-2003 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

Removed "udf_" prefix from udf on-disk data structures, as they already
live in the Udf:: namespace, and I'll be referencing them fully qualified in
makeudfimage and don't feel like typing udf twice each time.


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


# 43c2ddb4 11-Nov-2003 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

Upgraded my vocabulary.


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


# d2fe364c 18-Sep-2003 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

Switched from %lld to %Ld so R5 kernel dprintf statements would actually
print something useful for 64-bit integers.


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


# 90685fb7 12-Sep-2003 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

Per POSIX, now returns B_BAD_VALUE if read position is negative (thanks Axel :-).


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


# 23a4187a 10-Sep-2003 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

Was returning an error when attempting to read past the end of
the file. Apparently one must return success but report 0 bytes
read. This should fix the tracker file copy bug Marcus found.


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


# a0ff5acc 05-Aug-2003 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

Added AccessTime() and ModificationTime().


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


# 3dc4d426 31-Jul-2003 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

Implemented file reading


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


# b8f1212a 10-Jul-2003 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

Added Type(), IsFile(), IsDirectory(), and GetDirectoryIterator()


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


# e1016e4f 04-Jul-2003 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

Icb class initial checkin.


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


# 2aa0e54e4f600ae35bbb47169349ca582167ca10 17-Jul-2013 Murai Takashi <tmurai01@gmail.com>

Fix called C++ object pointer is null

Signed-off-by: Jérôme Duval <jerome.duval@gmail.com>


# 7e5b0f964988b2b184d0bee6741d362a268c76d0 09-May-2013 Jérôme Duval <jerome.duval@gmail.com>

udf: fixes 64 bit warnings


# ee3c8867434cd7d42c5efa26e591ab87eb484358 23-Oct-2012 Jérôme Duval <jerome.duval@gmail.com>

UDF: use mirror metadata file when needed

* style fixes
* try the mirror metadata file in case read fails on the main file


# c530d46cca3cb9bde36e243e634796eb2e17a23a 09-Oct-2012 Jérôme Duval <jerome.duval@gmail.com>

UDF: support for metadata partition (feature from 2.50)

* added Icb::FindBlock() to find block in extents.
* MetadataPartition uses extents descriptors found in the metadatafile
to lookup blocks on a physical partition
* uses struct timespec instead of time_t
* added init_entities() to call C++ structures constructors. This is
called at module initialization, C++ constructors are currently not called when
a kernel module is loaded.
* tested with a sample bluray ISO.


# 17d87ddf36f84df7f990af426944ae72da4a8cab 28-Feb-2010 Michael Lotz <mmlr@mlotz.ch>

* Finish the partition scanning part so that UDF is recognized and mountable.
* Added myself to the copyrights.


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


# af15ee68f1946a47cad0c4de56dfd9b3de213d77 28-Feb-2010 Michael Lotz <mmlr@mlotz.ch>

* Implement udf_io and udf_get_file_map.
* Add file map and cache and do reads through the file_cache for file ICBs.
* Move the private _Read() backend from the header to the implementation file.
* Read() is now only used for directory iteration.
* Turned off the verbose debug output.
* Minor cleanup.

This fixes the abuse of the block_cache, should allow executables on UDF and
won't panic on protected content.


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


# 8d3a8691d4a47bd8de146d044f820557ce28c13b 27-Feb-2010 Michael Lotz <mmlr@mlotz.ch>

* UDF didn't actually initializing _flags to 0 (same as with fat).
* Set the _type as well, this gets file listings work.
* Some cleanup and debug output moves/fixes/additions.

Yet crashes when accessing files though.


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


# 20d84995300bd9c3c5fd62bf8ba599aa7c7e0de9 20-Sep-2009 Rene Gollent <anevilyak@gmail.com>

Various changes to get this mostly compiling, with the exception of a template issue I don't yet completely understand.


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


# 0650565811792aae00acf0923f50f96851eb70b9 23-Aug-2008 Salvatore Benedetto <salvatore.benedetto@gmail.com>

* Removed +1 in calculating utf string length as the null char was already included
* Improved debug output


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


# 43a5ec83efb303e1937d0a0af48159efbb4b3358 22-Aug-2008 Salvatore Benedetto <salvatore.benedetto@gmail.com>

* Added some more TRACE, eventually they will be removed
* replace sizeof(dirent) with sizeof(struct dirent) as the pointer passed was called dirent!
that would cause d_reclen to be set to the wrong value, making panic. Thanks Stefano!

I finally managed to mount and list its content.



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


# e2dc263c431e22a72cc42ed5c7b86ba8b813ec2d 22-Aug-2008 Salvatore Benedetto <salvatore.benedetto@gmail.com>

* Replaced some PRINT with TRACE
* Rename error to status
* Fix assignements in udf_read_stat
* Added udf_{close_dir,free_dir_cookie} hook functions which prevented
udf from mounting the partition

It seems mouting an udf partition works correctly but I'm still unable
to list its content.


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


# a41247254616ec78e3c67297653b4b5f4475abb4 18-Aug-2008 Salvatore Benedetto <salvatore.benedetto@gmail.com>

* Removed DirectoryIterator.{h,cpp} and included them in Icp.{h,cpp}
* Porting Icb to new file cache system


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


# 245aecda8ac43fc2c0c0bac6a7e4016efa9b71e1 21-Jun-2007 Axel Dörfler <axeld@pinc-software.de>

Got rid of vnode_id and mount_id, replaced with ino_t and dev_t.


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


# 0e0c7a1e3755578af83cc797aacce98ebec9ce0d 10-Jul-2004 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

Add COMPILE_FOR_R5 wrappers with extern "C" declarations for when
we compile the R5 add-on, since we're using the Haiku fsproto.h, and the
linker doesn't like it when the fsproto.h declarations are extern "C"'d.


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


# f50008f9bad86430b1291c00cc2ed1bc41ae10f6 05-Jan-2004 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

Switched back to new(nothrow), now that it works properly again.


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


# de76a7ebe6c207c559b0c0f775ae1d756dd28216 17-Dec-2003 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

Added file entry dumps.


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


# 21ea9aea0c8dab99f5dad0686b870ff6c5c006a6 02-Dec-2003 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

Removed category stuff from UdfDebug.h since it ended
up not being as useful as I'd hoped, and I need to use the
same debugging macros for makeudfimage as for udf.


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


# 1379caca11ed925f1b61435601cfd323d57a19d9 24-Nov-2003 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

Removed "udf_" prefix from udf on-disk data structures, as they already
live in the Udf:: namespace, and I'll be referencing them fully qualified in
makeudfimage and don't feel like typing udf twice each time.


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


# 43c2ddb4810bd7959be809fee56b9b83fe16a944 11-Nov-2003 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

Upgraded my vocabulary.


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


# d2fe364ca9380aeefaaedc2275f978992bb7900a 18-Sep-2003 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

Switched from %lld to %Ld so R5 kernel dprintf statements would actually
print something useful for 64-bit integers.


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


# 90685fb7992fd77789b3e0d7e23b39a68dc883f7 12-Sep-2003 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

Per POSIX, now returns B_BAD_VALUE if read position is negative (thanks Axel :-).


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


# 23a4187a2bcdac14357a2cbe6e3090f59dc15997 10-Sep-2003 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

Was returning an error when attempting to read past the end of
the file. Apparently one must return success but report 0 bytes
read. This should fix the tracker file copy bug Marcus found.


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


# a0ff5accb67ea9441a93c5bfe0d7baf62e0dba4d 05-Aug-2003 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

Added AccessTime() and ModificationTime().


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


# 3dc4d42634f015dae2df48fdafa76ce22f71f4f0 31-Jul-2003 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

Implemented file reading


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


# b8f1212a9148f70f67cf9b9948aea42d9e7bc63d 10-Jul-2003 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

Added Type(), IsFile(), IsDirectory(), and GetDirectoryIterator()


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


# e1016e4f8a90133f99af154c826d4f78c1f0ae92 04-Jul-2003 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

Icb class initial checkin.


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