History log of /haiku/src/add-ons/kernel/partitioning_systems/session/session.cpp
Revision Date Author Comments
# 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>


# 1a7bcf69 01-Jun-2014 Oliver Tappe <zooey@hirschkaefer.de>

Lots of B_PRI... insertions to fix errors with DEBUG=1.


# 549fcbf5 22-May-2014 Jessica Hamilton <jessica.l.hamilton@gmail.com>

Don't delete session objects...

... disc->GetSession() doesn't allocate a new object, so delete
will cause problems later on.


# d1c05d9b 22-May-2014 Jessica Hamilton <jessica.l.hamilton@gmail.com>

Revert "Partitioning system: avoid leakage of resource"

This reverts commit f6bd30f2af5b97b4e133173150ab6e25d6f01bd1.


# 2e454dff 22-May-2014 Jessica Hamilton <jessica.l.hamilton@gmail.com>

Revert "Fix coding style violation"

This reverts commit 00e081a1ecc4b22b453c3aec863e86279cf16ff3.


# 00e081a1 28-Nov-2011 Philippe Saint-Pierre <stpere@gmail.com>

Fix coding style violation


# f6bd30f2 27-Nov-2011 Philippe Saint-Pierre <stpere@gmail.com>

Partitioning system: avoid leakage of resource

The storage returned from GetSession() was leaked

CID 10827


# 3b8f7470 28-Apr-2011 Axel Dörfler <axeld@pinc-software.de>

Applied cleaned up patch originally by Ziusudra as part of ticket #3473:
* Changed the session module to create an extra session for existing audio
tracks.
* Let cdda also recognize "audio partitions" as published by the session module.
* If there is only a single session, the session module now gives file system
drivers the chance to play with the device directly.


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


# 35f8d080 13-Jun-2010 Axel Dörfler <axeld@pinc-software.de>

* Fixed the good old operator& precedence bug I noticed while looking over a
patch by Ziusudra.
* Use new(std::nothrow) instead of new.
* Minor cleanup.


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


# bdcd7fca 30-Nov-2009 Axel Dörfler <axeld@pinc-software.de>

* Remove kernel/disk_device_manager from Jamfiles (the add-ons now need to
specify the path).
* Minor cleanup.


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


# d6778355 30-Sep-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* <DiskDeviceTypes.h>: Removed kPartitionTypeIntel{Primary,Logical} constants.
* Added new header headers/private/system/disk_device_types.h, which defines
the <DiskDeviceTypes.h> constants as macros and which can be used where the
constants cannot be used. The constants are defined using the macros, so now
there's only one place where the string literals should be specified.
* Use the macros in the partitioning systems. I was too lazy to also adjust the
file systems -- most of them seem to hard-code the string literal yet.



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


# 1cc5e469 08-Jul-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Added offset and size parameters to create_child_partition() and
KPartition::CreateChild(). CreateChild() calls AddChild(), which publishes
the new partition, though at that point offset and size were not set, so that
the published devices would not be usable.


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


# 28f362c1 13-Sep-2008 Michael Lotz <mmlr@mlotz.ch>

Again fix the previous commit. Obviously we only want to delete the disc object
if it actually failed to initialize. Thanks Stephan for spotting that.

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


# 7c57e58d 13-Sep-2008 Michael Lotz <mmlr@mlotz.ch>

* CID 874 and CID 875: Fix leaking the session object GetSession() allocates.
* CID 876: Fix leaking the disc object in case it fails to initialize.

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


# 1da9f5ce 10-May-2008 Axel Dörfler <axeld@pinc-software.de>

* Added BDiskSystem::ShortName() and everything needed to get it there.
* Added BDiskDeviceRoster::GetDiskSystem() method, that can get a disk system
by short/pretty/module name - since they should all be unique, I put them
in a single namespace, please complain if you don't like that :-)
* Cleaned up DiskSystem.h and DiskDeviceRoster.h according to the updated
header guidelines.
* Renamed ntfs pretty name from "ntfs File System" to "Windows NT File System".


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


# 217d31ea 06-Feb-2008 Axel Dörfler <axeld@pinc-software.de>

Session needs a higher priority than ISO 9660 or the latter might "steal"
multi-session CDs. Maybe partitioning systems should give preference over
file systems, though.
This fixes bug #1634.


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


# ef6f4234 12-Nov-2007 Axel Dörfler <axeld@pinc-software.de>

* The session module deleted its cookie twice, after identifying, and when the
partition cookie was deleted - when removing a CD it would crash.
* Since the partition cookies are not needed at all, we don't use it anymore.
* scan_partition() deleted the identify cookie on error, but that's not its
job - free_identify_cookie() is always called, no matter what scan partition
does.
* Minor cleanup.


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


# 76a8ec23 22-Aug-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

* Added disk system flags for whether a partition name and partition
content name are supported.
* Added file_system_module_info::flags (analogously to
partition_module_info::flags) which indicate which disk device
features the FS supports.
* Replaced the
file_system_module_info/partition_module_info::supports_*()
hooks by a get_supported_operations() hook and for partitioning
systems additionally a get_supported_child_operations() hook.
* Updated file and partitioning systems accordingly.
* Updated fs_shell accordingly.
* Updated the DDM accordingly. The syscall interface remains unchanged,
though.
* _user_supports_initializing_partition() also checks whether the parent
partitioning system is content now.


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


# 9e3f6197 05-Mar-2006 Axel Dörfler <axeld@pinc-software.de>

We don't have floating point support for dprintf() in the kernel.


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


# f1358045 22-Sep-2005 Axel Dörfler <axeld@pinc-software.de>

The "session" partitioning system is now also working in the kernel (static initialization - there is no C++ constructor called).


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


# d0ff798a 21-Nov-2004 shatty <shatty@nowhere.fake>

added casts for deleting void*, this should cause destructors to be invoked now


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


# 303ff401 15-Nov-2003 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

Added remaining functionality. I believe everything works as advertised
now, but I haven't had time to test it very thoroughly, so your milage may
vary.


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


# 8ba0b6e1 14-Nov-2003 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

Initial checkin. Beginnings of port of disk_scanner session module to
disk device manager. Actual session scanning code appears to work
a-okay, but it isn't hooked up to the partition scanning entry function
yet, so sessions are not yet actually enumerated when the ddm test
program is run.


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


# 1a7bcf6962e1c99906cce0fe602e08c3fcda46f6 01-Jun-2014 Oliver Tappe <zooey@hirschkaefer.de>

Lots of B_PRI... insertions to fix errors with DEBUG=1.


# 549fcbf51afb8770bb23d698b705e1823ff81b0f 22-May-2014 Jessica Hamilton <jessica.l.hamilton@gmail.com>

Don't delete session objects...

... disc->GetSession() doesn't allocate a new object, so delete
will cause problems later on.


# d1c05d9b22c82852e47e3436e728c7dde3dbff30 22-May-2014 Jessica Hamilton <jessica.l.hamilton@gmail.com>

Revert "Partitioning system: avoid leakage of resource"

This reverts commit f6bd30f2af5b97b4e133173150ab6e25d6f01bd1.


# 2e454dffc22ab0d2e666b676e04a0785955ff7c0 22-May-2014 Jessica Hamilton <jessica.l.hamilton@gmail.com>

Revert "Fix coding style violation"

This reverts commit 00e081a1ecc4b22b453c3aec863e86279cf16ff3.


# 00e081a1ecc4b22b453c3aec863e86279cf16ff3 28-Nov-2011 Philippe Saint-Pierre <stpere@gmail.com>

Fix coding style violation


# f6bd30f2af5b97b4e133173150ab6e25d6f01bd1 27-Nov-2011 Philippe Saint-Pierre <stpere@gmail.com>

Partitioning system: avoid leakage of resource

The storage returned from GetSession() was leaked

CID 10827


# 3b8f74706019f7e51d52087a1ec7896630c892fb 28-Apr-2011 Axel Dörfler <axeld@pinc-software.de>

Applied cleaned up patch originally by Ziusudra as part of ticket #3473:
* Changed the session module to create an extra session for existing audio
tracks.
* Let cdda also recognize "audio partitions" as published by the session module.
* If there is only a single session, the session module now gives file system
drivers the chance to play with the device directly.


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


# 35f8d080097947be245f0fd135c9fff4122b929e 13-Jun-2010 Axel Dörfler <axeld@pinc-software.de>

* Fixed the good old operator& precedence bug I noticed while looking over a
patch by Ziusudra.
* Use new(std::nothrow) instead of new.
* Minor cleanup.


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


# bdcd7fcadc390466fb110a55e0932bedc1232b14 30-Nov-2009 Axel Dörfler <axeld@pinc-software.de>

* Remove kernel/disk_device_manager from Jamfiles (the add-ons now need to
specify the path).
* Minor cleanup.


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


# d6778355eea7f86c9418dec7572f12804b0150ff 30-Sep-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* <DiskDeviceTypes.h>: Removed kPartitionTypeIntel{Primary,Logical} constants.
* Added new header headers/private/system/disk_device_types.h, which defines
the <DiskDeviceTypes.h> constants as macros and which can be used where the
constants cannot be used. The constants are defined using the macros, so now
there's only one place where the string literals should be specified.
* Use the macros in the partitioning systems. I was too lazy to also adjust the
file systems -- most of them seem to hard-code the string literal yet.



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


# 1cc5e46925a7e64708d7565fe2c1ac3f448c9d58 08-Jul-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Added offset and size parameters to create_child_partition() and
KPartition::CreateChild(). CreateChild() calls AddChild(), which publishes
the new partition, though at that point offset and size were not set, so that
the published devices would not be usable.


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


# 28f362c129038f182936613539cff214247e6546 13-Sep-2008 Michael Lotz <mmlr@mlotz.ch>

Again fix the previous commit. Obviously we only want to delete the disc object
if it actually failed to initialize. Thanks Stephan for spotting that.

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


# 7c57e58de955b4c2181d95d5db0861810b11be65 13-Sep-2008 Michael Lotz <mmlr@mlotz.ch>

* CID 874 and CID 875: Fix leaking the session object GetSession() allocates.
* CID 876: Fix leaking the disc object in case it fails to initialize.

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


# 1da9f5cea5ea4d32c539a01cd94a7b605e941beb 10-May-2008 Axel Dörfler <axeld@pinc-software.de>

* Added BDiskSystem::ShortName() and everything needed to get it there.
* Added BDiskDeviceRoster::GetDiskSystem() method, that can get a disk system
by short/pretty/module name - since they should all be unique, I put them
in a single namespace, please complain if you don't like that :-)
* Cleaned up DiskSystem.h and DiskDeviceRoster.h according to the updated
header guidelines.
* Renamed ntfs pretty name from "ntfs File System" to "Windows NT File System".


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


# 217d31eac9d2c442457b6f7014c74e6fd4f4ac2d 06-Feb-2008 Axel Dörfler <axeld@pinc-software.de>

Session needs a higher priority than ISO 9660 or the latter might "steal"
multi-session CDs. Maybe partitioning systems should give preference over
file systems, though.
This fixes bug #1634.


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


# ef6f42349ceee32c4d0f09f8771fcca4740a0488 12-Nov-2007 Axel Dörfler <axeld@pinc-software.de>

* The session module deleted its cookie twice, after identifying, and when the
partition cookie was deleted - when removing a CD it would crash.
* Since the partition cookies are not needed at all, we don't use it anymore.
* scan_partition() deleted the identify cookie on error, but that's not its
job - free_identify_cookie() is always called, no matter what scan partition
does.
* Minor cleanup.


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


# 76a8ec23db391176bac91f33c5f1fc6e8e41866c 22-Aug-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

* Added disk system flags for whether a partition name and partition
content name are supported.
* Added file_system_module_info::flags (analogously to
partition_module_info::flags) which indicate which disk device
features the FS supports.
* Replaced the
file_system_module_info/partition_module_info::supports_*()
hooks by a get_supported_operations() hook and for partitioning
systems additionally a get_supported_child_operations() hook.
* Updated file and partitioning systems accordingly.
* Updated fs_shell accordingly.
* Updated the DDM accordingly. The syscall interface remains unchanged,
though.
* _user_supports_initializing_partition() also checks whether the parent
partitioning system is content now.


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


# 9e3f619722a1897352f0180f96c07199a364fd7c 05-Mar-2006 Axel Dörfler <axeld@pinc-software.de>

We don't have floating point support for dprintf() in the kernel.


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


# f1358045f743b62345d1ab8ba3cbe83d119acc08 22-Sep-2005 Axel Dörfler <axeld@pinc-software.de>

The "session" partitioning system is now also working in the kernel (static initialization - there is no C++ constructor called).


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


# d0ff798a583789a45e8dda68d56b99635576521d 21-Nov-2004 shatty <shatty@nowhere.fake>

added casts for deleting void*, this should cause destructors to be invoked now


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


# 303ff4017cfbc489c919e71620301258ebc77e63 15-Nov-2003 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

Added remaining functionality. I believe everything works as advertised
now, but I haven't had time to test it very thoroughly, so your milage may
vary.


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


# 8ba0b6e187f087c181fbecc61fa00509ac8e6050 14-Nov-2003 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

Initial checkin. Beginnings of port of disk_scanner session module to
disk device manager. Actual session scanning code appears to work
a-okay, but it isn't hooked up to the partition scanning entry function
yet, so sessions are not yet actually enumerated when the ddm test
program is run.


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