History log of /haiku/src/add-ons/kernel/file_systems/iso9660/iso9660.cpp
Revision Date Author Comments
# 425ac1b6 20-Jun-2023 Alexander von Gluck IV <kallisti5@unixzen.com>

refactor: Swap %Ld for %lld in all format usages

* %Ld is an undocumented alias for %lld in glibc.
* muslc doesn't implement it for this reason.
* While we will likely never drop %Ld support,
lets clean house and set a better example.

Change-Id: Id46dad3104abae483e80cc5c05d1464d3ecd8030
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6636
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>


# 711e2dc0 01-Dec-2021 Augustin Cavalier <waddlesplash@gmail.com>

Adjust all struct dirent creations (again), this time to use offsetof().

The dirent struct is not packed, so offsetof(dirent, d_name) != sizeof(dirent).
Thus in order not to waste the alignment bytes (which are significant,
on x86_64 at least, sizeof(dirent)==32, but offsetof(...)=26.)

This is also the most portable way to handle things, and should
work just fine in cross-platform code that has a non-zero-sized d_name.


# 1418cade 11-Jul-2019 Augustin Cavalier <waddlesplash@gmail.com>

file_systems: Pass size argument to ioctl in a lot more places.


# 7dc68bfb 28-Apr-2015 Adrien Destugues <pulkomandy@gmail.com>

iso9660: fix PVS 2430 to 2435.

* Incorrect handling of realloc() failure (if reallocation fails,
original buffer is still allocated and must be freed),
* Use of bit shift on signed integer (undefined behavior in C and C++).


# a3fdd62c 17-Mar-2013 Gediminas Jarulaitis <beos.zealot@gmail.com>

iso9960, exfat, fat: Corrected time conversion mistakes.

* Fixes #9524
* Some style cleanup

Signed-off-by: Jerome Duval <jerome.duval@gmail.com>


# d7e5acad 12-Mar-2013 Matt Madia <mattmadia@gmail.com>

Automatic whitespace cleanup. No functional change.

This push (ok, the previous changeset) fixes #9486.


# 723f4b6a 03-Mar-2013 Gediminas Jarulaitis <beos.zealot@gmail.com>

iso9660 fs driver bugfix + code refactoring

Signed-off-by: Matt Madia <mattmadia@gmail.com>


# e766bb9e 18-Mar-2012 Rene Gollent <anevilyak@gmail.com>

Fix iso9660 add-on.

hrev43777 introduced a regression that resulted in the symlink flag byte
no longer getting skipped in non-trace builds. Fixes #8369.


# eb5f3639 12-Feb-2012 Jerome Duval <jerome.duval@gmail.com>

Fixes some occurrences of 'variable set but not used', disables Werror for problematic items.


# a735bdeb 31-Oct-2011 Michael Lotz <mmlr@mlotz.ch>

Align all filesystem relevant places to use B_UNSUPPORTED for unsupported
instead of a mix of B_NOT_SUPPORTED and B_UNSUPPORTED. This allows checking for
a specific error code. Probably one of those should be phased out...


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


# 5348fbe6 07-Aug-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* fix trace typedef size to fix iso9660 tracing


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


# 977f0426 29-Aug-2010 Axel Dörfler <axeld@pinc-software.de>

* Fixed CID 1508: a corrupted rockridge entry could cause a kernel panic.


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


# 56b2feba 27-May-2009 Michael Lotz <mmlr@mlotz.ch>

Add actual support for relocated directories. In case we hit a placeholder file
pointing to a relocated directory, we now re-initialize the node we are
initializing with the first entry of the pointed at directory. This ought to be
the "." entry containing the proper flags, start block number and data length.
As per the specs we do only keep the file id or alternate name of the
placeholder and take everything else from the relocated directory.


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


# 43276e5b 26-May-2009 Michael Lotz <mmlr@mlotz.ch>

If we encounter an unsupported entry (like a relocated directory) we now just
skip it instead of returning the error and therefore aborting the directory
enumeration.


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


# 99d1bfb5 07-May-2009 Axel Dörfler <axeld@pinc-software.de>

* The code in fs_walk() duplicates the one in ISOReadDir() mostly, and suffered
from the same "associated file" problem as the latter. This now finally fixes
bug #3861. This badly needs some cleanup.
* Fixed a possible problem I introduced in ISOReadDir() (did not read the next
block even if it should have).
* Fixed warnings with debug output turned on.


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


# 47a214de 07-May-2009 Axel Dörfler <axeld@pinc-software.de>

* We now ignore associated files. This makes the double entries of bug #3861
disappear.
* When parsing rock ridge attributes, we no longer stop when we encounter an
unknown one. Instead, we just parse through until the end. The ISO image as
part of #3861 also made this visible.
* Minor cleanup.


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


# 2a64cb11 05-May-2009 Axel Dörfler <axeld@pinc-software.de>

Fixed two crashing bugs, one of them mentioned in ticket #3861:
* ISOReadDirEnt() did happily read after the 2048 byte block. Now we check after
having processed an entry if the position is on the 2048 block boundary, and
skip to the next block directly.
* fs_walk() assumed a 2 block set (and accessed memory therein), but only has
access to a single block. I haven't looked at the specs, so I'm not really
sure what the old code tried to achieve. In any case, it doesn't crash
anymore.


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


# f47bff08 05-May-2009 Axel Dörfler <axeld@pinc-software.de>

* Made the iso9660 file system buildable within the fs_shell (iso9660_shell).


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


# 1dd3b2c7 15-Sep-2008 Axel Dörfler <axeld@pinc-software.de>

* ISO-9660 did not like files with only a single character length.


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


# eb097431 15-Sep-2008 Axel Dörfler <axeld@pinc-software.de>

* ISOReadDirEnt() did not set the dirent::d_dev field, thus causing bug #2734.
* Moved the rock ridge attribute parsing code to a separate function.
* Removed superfluous malloc() vs. realloc() code.
* Checked allocations in the rock ridge parsing code.
* Cleanup, renamed some variables, structures, functions, etc.


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


# 5b2c5d03 13-Nov-2007 Axel Dörfler <axeld@pinc-software.de>

* Fixed a crashing bug in the identification code: it copied a C++ object on
the stack to an allocated one - on destruction of the latter, the resources
were already freed.
* Made the identify code more negligent against bad CDs - ie. it will identify
even broken CDs if they can be mounted.
* Made identification endian aware (it should now also work on big endian
systems).
* Renamed many structures, methods, and fields to be less verbose, and follow
our style guide.
* Renamed iso9660.cpp|h to iso9660_identify.cpp|h.
* Renamed iso.c to iso9660.c, rock.h to rock_ridge.h.
* Removed unnecessary cruft from the Jamfile.


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


# 242dab12 05-Sep-2006 Axel Dörfler <axeld@pinc-software.de>

Minor cleanup, I hope I'm not interfering, Korli :-)


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


# 0e195cc6 05-Sep-2006 Jérôme Duval <korli@users.berlios.de>

fix obvious errors


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


# 3b723f79 28-Feb-2006 Jérôme Duval <korli@users.berlios.de>

added fs_get_vnode_name
cleanup of Jamfile
clean license


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


# 21e1553e 27-Feb-2006 Jérôme Duval <korli@users.berlios.de>

haiku version of iso9660 filesystem
working, except for autodetection


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


# 7dc68bfba5c728128e0a98d6804fbea34f6153a7 28-Apr-2015 Adrien Destugues <pulkomandy@gmail.com>

iso9660: fix PVS 2430 to 2435.

* Incorrect handling of realloc() failure (if reallocation fails,
original buffer is still allocated and must be freed),
* Use of bit shift on signed integer (undefined behavior in C and C++).


# a3fdd62c1365058249aea24fd3996eefcd1220e4 17-Mar-2013 Gediminas Jarulaitis <beos.zealot@gmail.com>

iso9960, exfat, fat: Corrected time conversion mistakes.

* Fixes #9524
* Some style cleanup

Signed-off-by: Jerome Duval <jerome.duval@gmail.com>


# d7e5acad3f2c98a3d6b337707f388d6fad5a0d8a 12-Mar-2013 Matt Madia <mattmadia@gmail.com>

Automatic whitespace cleanup. No functional change.

This push (ok, the previous changeset) fixes #9486.


# 723f4b6a43b723101c277ec24158e308b4a1254a 03-Mar-2013 Gediminas Jarulaitis <beos.zealot@gmail.com>

iso9660 fs driver bugfix + code refactoring

Signed-off-by: Matt Madia <mattmadia@gmail.com>


# e766bb9e26a5dfd65caa82d8a7dd9f3c91d5c3e8 18-Mar-2012 Rene Gollent <anevilyak@gmail.com>

Fix iso9660 add-on.

hrev43777 introduced a regression that resulted in the symlink flag byte
no longer getting skipped in non-trace builds. Fixes #8369.


# eb5f36397841abfc740031fde56ca5e4dee9fdd3 12-Feb-2012 Jerome Duval <jerome.duval@gmail.com>

Fixes some occurrences of 'variable set but not used', disables Werror for problematic items.


# a735bdebb94ce14c72f56204f022038de7a49e2f 31-Oct-2011 Michael Lotz <mmlr@mlotz.ch>

Align all filesystem relevant places to use B_UNSUPPORTED for unsupported
instead of a mix of B_NOT_SUPPORTED and B_UNSUPPORTED. This allows checking for
a specific error code. Probably one of those should be phased out...


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


# 5348fbe6893cffbd5ba94dfe88d575eac1d65193 07-Aug-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* fix trace typedef size to fix iso9660 tracing


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


# 977f0426eebefaac4bcebc135b52c30d29e586e2 29-Aug-2010 Axel Dörfler <axeld@pinc-software.de>

* Fixed CID 1508: a corrupted rockridge entry could cause a kernel panic.


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


# 56b2febaadfa19cec3918e0018a6fa5f1161a274 27-May-2009 Michael Lotz <mmlr@mlotz.ch>

Add actual support for relocated directories. In case we hit a placeholder file
pointing to a relocated directory, we now re-initialize the node we are
initializing with the first entry of the pointed at directory. This ought to be
the "." entry containing the proper flags, start block number and data length.
As per the specs we do only keep the file id or alternate name of the
placeholder and take everything else from the relocated directory.


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


# 43276e5bd1bac187089db5bc850a9366c1581f0c 26-May-2009 Michael Lotz <mmlr@mlotz.ch>

If we encounter an unsupported entry (like a relocated directory) we now just
skip it instead of returning the error and therefore aborting the directory
enumeration.


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


# 99d1bfb5de8e2ca3ff2b245a050c09366cca5374 07-May-2009 Axel Dörfler <axeld@pinc-software.de>

* The code in fs_walk() duplicates the one in ISOReadDir() mostly, and suffered
from the same "associated file" problem as the latter. This now finally fixes
bug #3861. This badly needs some cleanup.
* Fixed a possible problem I introduced in ISOReadDir() (did not read the next
block even if it should have).
* Fixed warnings with debug output turned on.


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


# 47a214def6b09d93674ecb5eef1eef625f936436 07-May-2009 Axel Dörfler <axeld@pinc-software.de>

* We now ignore associated files. This makes the double entries of bug #3861
disappear.
* When parsing rock ridge attributes, we no longer stop when we encounter an
unknown one. Instead, we just parse through until the end. The ISO image as
part of #3861 also made this visible.
* Minor cleanup.


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


# 2a64cb1138cb25680860aedaa89e9e74e462cc81 05-May-2009 Axel Dörfler <axeld@pinc-software.de>

Fixed two crashing bugs, one of them mentioned in ticket #3861:
* ISOReadDirEnt() did happily read after the 2048 byte block. Now we check after
having processed an entry if the position is on the 2048 block boundary, and
skip to the next block directly.
* fs_walk() assumed a 2 block set (and accessed memory therein), but only has
access to a single block. I haven't looked at the specs, so I'm not really
sure what the old code tried to achieve. In any case, it doesn't crash
anymore.


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


# f47bff088097e3f4c04e95fbdb2383caa65ff996 05-May-2009 Axel Dörfler <axeld@pinc-software.de>

* Made the iso9660 file system buildable within the fs_shell (iso9660_shell).


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


# 1dd3b2c72486884276ff7c9ad5a3761a0277a4e2 15-Sep-2008 Axel Dörfler <axeld@pinc-software.de>

* ISO-9660 did not like files with only a single character length.


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


# eb0974311f6984a71c24a444b4eebcba5179fa53 15-Sep-2008 Axel Dörfler <axeld@pinc-software.de>

* ISOReadDirEnt() did not set the dirent::d_dev field, thus causing bug #2734.
* Moved the rock ridge attribute parsing code to a separate function.
* Removed superfluous malloc() vs. realloc() code.
* Checked allocations in the rock ridge parsing code.
* Cleanup, renamed some variables, structures, functions, etc.


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


# 5b2c5d03e874e4861b2e75221e1ee37492682e06 13-Nov-2007 Axel Dörfler <axeld@pinc-software.de>

* Fixed a crashing bug in the identification code: it copied a C++ object on
the stack to an allocated one - on destruction of the latter, the resources
were already freed.
* Made the identify code more negligent against bad CDs - ie. it will identify
even broken CDs if they can be mounted.
* Made identification endian aware (it should now also work on big endian
systems).
* Renamed many structures, methods, and fields to be less verbose, and follow
our style guide.
* Renamed iso9660.cpp|h to iso9660_identify.cpp|h.
* Renamed iso.c to iso9660.c, rock.h to rock_ridge.h.
* Removed unnecessary cruft from the Jamfile.


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


# 242dab12574748a252cd772e00f91511933c4c14 05-Sep-2006 Axel Dörfler <axeld@pinc-software.de>

Minor cleanup, I hope I'm not interfering, Korli :-)


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


# 0e195cc633b3b6cbceee4e80667983321e353f32 05-Sep-2006 Jérôme Duval <korli@users.berlios.de>

fix obvious errors


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


# 3b723f79140b51ec56913b1d7b8ccaa3a59b26f4 28-Feb-2006 Jérôme Duval <korli@users.berlios.de>

added fs_get_vnode_name
cleanup of Jamfile
clean license


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


# 21e1553eb5d00d26c2df2dab004f7a41e667dd09 27-Feb-2006 Jérôme Duval <korli@users.berlios.de>

haiku version of iso9660 filesystem
working, except for autodetection


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