History log of /haiku/src/add-ons/kernel/file_systems/cdda/cdda.cpp
Revision Date Author Comments
# 1418cade 11-Jul-2019 Augustin Cavalier <waddlesplash@gmail.com>

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


# 9b72c3a0 11-Jul-2019 Simon South <simon@simonsouth.net>

kernel: Specify buffer size in certain ioctl calls.

In cases where scsi_periph checks the size of the buffer supplied to an
ioctl call (functionality added in commit ff4af513e1) this information
needs to be provided by the caller to avoid failure.

Fixes #15094.

Change-Id: I37f2776edbe977e9825ec1837fb763a3b2aa7220
Reviewed-on: https://review.haiku-os.org/c/1584
Reviewed-by: waddlesplash <waddlesplash@gmail.com>


# efb618a2 14-Nov-2014 Adrien Destugues <pulkomandy@gmail.com>

CDDA: handle CP-1252 in CD-Text

I have at least one CD which does that. There is no problem in handling
it since CP-1252 is a superset of ISO-8859-15.

Also fix the possible buffer overflow in the CD-Text handling, which
could corrupt the stack in case a track title decodes to more than 256
bytes. Now it is properly truncated on a character boundary.


# 938c41a1 12-Nov-2014 Adrien Destugues <pulkomandy@gmail.com>

cdda: fix possible buffer overrun

If the requested read was more than 32 frames, and reading them all at
once failed, we would try to read by chunk of 8 frames. But if the
original frame count was not a multiple of 8 we would not adjust the
count for the last read.

Unfortunately I could still panic the system after fixing this, so it is
not *the* cdda bug.


# 3aeed660 07-Aug-2014 Jérôme Duval <jerome.duval@gmail.com>

include strings.h where appriopriate...

instead or additionally to string.h, in preparation for functions move.
* moves str[n]casecmp() functions and others to strings.h.
* strings.h doesn't include string.h anymore.
* this solves #10949


# 575eeda9 06-May-2013 Jérôme Duval <jerome.duval@gmail.com>

cdda: fixes 64 bit warnings


# 77b833b8 29-Sep-2010 Axel Dörfler <axeld@pinc-software.de>

* Convert the CD-Text contents to UTF-8 (always assumes ISO-8859-1 for now).


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


# 24fb5ed3 29-Sep-2010 Axel Dörfler <axeld@pinc-software.de>

* Initializing "id", and "track" to zero in r37310 caused a bug in read_cdtext()
to be revealed, as both variables were not supposed to change between calls
to parse_pack_data(). This could cause an invalidation of the CD-text data,
as well as an endless loop.
* Disabled (and improved) some more debug output.
* Added a short description to parse_pack_data().


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


# 1daacc6b 29-Jun-2010 Wim van der Meer <wpjvandermeer@gmail.com>

Initialize variables to get rid of '<foo> may be used uninitialized in this function' warnings.

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


# 36f016dd 01-Jun-2010 Axel Dörfler <axeld@pinc-software.de>

* Enlarged the identify TOC buffer to 2048 bytes just to be sure.
* Minor cleanup.


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


# 06103a30 07-Aug-2009 Jonas Sundström <jonas@kirilla.com>

As cdtext extraction preempts a cddb lookup, make sure we got useful data from cdtext. Out of the 30 CDs I've tried all get reported as having cdtext but only one renders any useful data. This should at least give cddb a shot.

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


# 63d557f0 15-Jul-2009 Michael Lotz <mmlr@mlotz.ch>

Fixing random GCC4 warnings. Mostly missing consts, some parentheses, some braces... Should all be harmless and not change anything.

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


# 27f23ba2 13-May-2009 Axel Dörfler <axeld@pinc-software.de>

* Fixed some naming inconsistencies/typos.
* Some cleanup.


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


# a89962b9 07-Aug-2008 Axel Dörfler <axeld@pinc-software.de>

* read_cdda_data() needs to know the last frame of the track, so that it can
cut down the buffer size on the last request. This fixes bug #2565.
* cdda_read() did report an incorrect number of bytes read. This fixes bug
#2511, and also that you couldn't copy tracks via "cp".
* cdda_read_stat() did not include the WAV header in its reported size.


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


# 01f28a0a 27-Jun-2008 Axel Dörfler <axeld@pinc-software.de>

* Ported CDDA file system to the current FS API.
* Fixed warnings.


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


# f77a87bf 22-May-2007 Axel Dörfler <axeld@pinc-software.de>

* Implemented persistence storage of attributes and name changes - it's able to
read the files the BeOS cdda wrote, but it handles attributes completely different.
* All attributes are now stored per CD.
* There are some special shared attributes between all CDs (or a specific device)
to improve your Tracker experience.
* An existing buffer is now used to fill a read request.
* Lots of other small changes here and there.


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


# 8536d82f 16-May-2007 Axel Dörfler <axeld@pinc-software.de>

* The WAV header is now created correctly (mixed up endian of the fourcc members)
* More or less fixed reading - it now works nicely when you copy the file to the
hard drive first, but MediaPlayer cannot handle the files directly from CD for
some reason yet to investigate.


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


# 90c18b97 16-May-2007 Axel Dörfler <axeld@pinc-software.de>

Implemented reading from CD and prepending a fake WAV header - not yet tested, though.


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


# 12ed6d21 15-May-2007 Axel Dörfler <axeld@pinc-software.de>

* Made the code that reads the table of contents of the CD a bit more failsafe.
* Implemented disk scanner to automatically identify the volume.


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


# e8113cab 15-May-2007 Axel Dörfler <axeld@pinc-software.de>

* Implemented attribute handling - you can change them, but they are not stored yet.
* Implemented CDDB ID computation (that's what BeOS's cdda-fs is using).
* Some other minor changes.


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


# 40897d39 14-May-2007 Axel Dörfler <axeld@pinc-software.de>

* Moved cdda_text test application to the test directory, and separated it from cdda.cpp.
* Implemented most of the directory retrieval functions of the file system; even renaming
titles should work now.


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


# ff2a7d86 10-May-2007 Axel Dörfler <axeld@pinc-software.de>

Start of a CDDA file system (replacement for cdda as part of BeOS):
* doesn't do anything useful yet, but it compiles (and should be mountable).
* CDDA test app "cdda_text" will dump the table of contents as well as eventually
existing CD-Text - if I had known only so few titles in my collection would come
with those, I probably wouldn't have gone through it (if the samples I used are
representable, it's about 1/10th of the CDs I have) :-)
* cdda_text compiles on BeOS, so if you have known CD-Text CDs, please test it
and report eventual problems - the test app already tries to beautify the names
as much as possible. Usage is "cdda_text <path-to-raw-device>".
* The test app will be removed later, so better test now ;)


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


# efb618a2736b5cf0c37eb03ae0cbe6c74238790a 14-Nov-2014 Adrien Destugues <pulkomandy@gmail.com>

CDDA: handle CP-1252 in CD-Text

I have at least one CD which does that. There is no problem in handling
it since CP-1252 is a superset of ISO-8859-15.

Also fix the possible buffer overflow in the CD-Text handling, which
could corrupt the stack in case a track title decodes to more than 256
bytes. Now it is properly truncated on a character boundary.


# 938c41a1aa06935d078d33f52564bb17f5747626 12-Nov-2014 Adrien Destugues <pulkomandy@gmail.com>

cdda: fix possible buffer overrun

If the requested read was more than 32 frames, and reading them all at
once failed, we would try to read by chunk of 8 frames. But if the
original frame count was not a multiple of 8 we would not adjust the
count for the last read.

Unfortunately I could still panic the system after fixing this, so it is
not *the* cdda bug.


# 3aeed6607cd07762c0e709633c012b3a632dbad9 07-Aug-2014 Jérôme Duval <jerome.duval@gmail.com>

include strings.h where appriopriate...

instead or additionally to string.h, in preparation for functions move.
* moves str[n]casecmp() functions and others to strings.h.
* strings.h doesn't include string.h anymore.
* this solves #10949


# 575eeda9a5ac082851be3e158f26b89a1cedccbd 06-May-2013 Jérôme Duval <jerome.duval@gmail.com>

cdda: fixes 64 bit warnings


# 77b833b87e079122665f6fb6181a891d0b6f4f56 29-Sep-2010 Axel Dörfler <axeld@pinc-software.de>

* Convert the CD-Text contents to UTF-8 (always assumes ISO-8859-1 for now).


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


# 24fb5ed32c27af1ec32afc42867c2681fef45b77 29-Sep-2010 Axel Dörfler <axeld@pinc-software.de>

* Initializing "id", and "track" to zero in r37310 caused a bug in read_cdtext()
to be revealed, as both variables were not supposed to change between calls
to parse_pack_data(). This could cause an invalidation of the CD-text data,
as well as an endless loop.
* Disabled (and improved) some more debug output.
* Added a short description to parse_pack_data().


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


# 1daacc6b45d3b52a7cdc65752409aa4339ca4839 29-Jun-2010 Wim van der Meer <wpjvandermeer@gmail.com>

Initialize variables to get rid of '<foo> may be used uninitialized in this function' warnings.

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


# 36f016ddbe71bd5bab559a6b59d06426d02666d3 01-Jun-2010 Axel Dörfler <axeld@pinc-software.de>

* Enlarged the identify TOC buffer to 2048 bytes just to be sure.
* Minor cleanup.


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


# 06103a3046037d5402c5a379a571d89d383a364a 07-Aug-2009 Jonas Sundström <jonas@kirilla.com>

As cdtext extraction preempts a cddb lookup, make sure we got useful data from cdtext. Out of the 30 CDs I've tried all get reported as having cdtext but only one renders any useful data. This should at least give cddb a shot.

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


# 63d557f06f41c0aef30f8a0fcc5b8d2c47981b33 15-Jul-2009 Michael Lotz <mmlr@mlotz.ch>

Fixing random GCC4 warnings. Mostly missing consts, some parentheses, some braces... Should all be harmless and not change anything.

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


# 27f23ba2df7bca5799b72a5c43993b7ccd53749c 13-May-2009 Axel Dörfler <axeld@pinc-software.de>

* Fixed some naming inconsistencies/typos.
* Some cleanup.


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


# a89962b923788cf6db8910262042cb769ce0b9e5 07-Aug-2008 Axel Dörfler <axeld@pinc-software.de>

* read_cdda_data() needs to know the last frame of the track, so that it can
cut down the buffer size on the last request. This fixes bug #2565.
* cdda_read() did report an incorrect number of bytes read. This fixes bug
#2511, and also that you couldn't copy tracks via "cp".
* cdda_read_stat() did not include the WAV header in its reported size.


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


# 01f28a0ae369a27554112e0563d377cb61785d4c 27-Jun-2008 Axel Dörfler <axeld@pinc-software.de>

* Ported CDDA file system to the current FS API.
* Fixed warnings.


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


# f77a87bfa4589d6fcb9e409d8cfd27725d1ed8cc 22-May-2007 Axel Dörfler <axeld@pinc-software.de>

* Implemented persistence storage of attributes and name changes - it's able to
read the files the BeOS cdda wrote, but it handles attributes completely different.
* All attributes are now stored per CD.
* There are some special shared attributes between all CDs (or a specific device)
to improve your Tracker experience.
* An existing buffer is now used to fill a read request.
* Lots of other small changes here and there.


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


# 8536d82fb62e2bc63ce69cc4c46289b87368276b 16-May-2007 Axel Dörfler <axeld@pinc-software.de>

* The WAV header is now created correctly (mixed up endian of the fourcc members)
* More or less fixed reading - it now works nicely when you copy the file to the
hard drive first, but MediaPlayer cannot handle the files directly from CD for
some reason yet to investigate.


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


# 90c18b97c9b675c3a41235ee12ec2458f4fd4aaa 16-May-2007 Axel Dörfler <axeld@pinc-software.de>

Implemented reading from CD and prepending a fake WAV header - not yet tested, though.


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


# 12ed6d2195da8fe7d54611de69939a5533a680f0 15-May-2007 Axel Dörfler <axeld@pinc-software.de>

* Made the code that reads the table of contents of the CD a bit more failsafe.
* Implemented disk scanner to automatically identify the volume.


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


# e8113cabe023042a1c96f338fab8f5f47f1688d4 15-May-2007 Axel Dörfler <axeld@pinc-software.de>

* Implemented attribute handling - you can change them, but they are not stored yet.
* Implemented CDDB ID computation (that's what BeOS's cdda-fs is using).
* Some other minor changes.


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


# 40897d39642f7942f1e46d2eb6c30fd77341fe61 14-May-2007 Axel Dörfler <axeld@pinc-software.de>

* Moved cdda_text test application to the test directory, and separated it from cdda.cpp.
* Implemented most of the directory retrieval functions of the file system; even renaming
titles should work now.


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


# ff2a7d86f8de2368fb292c425b24ce7e0b49a09b 10-May-2007 Axel Dörfler <axeld@pinc-software.de>

Start of a CDDA file system (replacement for cdda as part of BeOS):
* doesn't do anything useful yet, but it compiles (and should be mountable).
* CDDA test app "cdda_text" will dump the table of contents as well as eventually
existing CD-Text - if I had known only so few titles in my collection would come
with those, I probably wouldn't have gone through it (if the samples I used are
representable, it's about 1/10th of the CDs I have) :-)
* cdda_text compiles on BeOS, so if you have known CD-Text CDs, please test it
and report eventual problems - the test app already tries to beautify the names
as much as possible. Usage is "cdda_text <path-to-raw-device>".
* The test app will be removed later, so better test now ;)


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