History log of /haiku/src/system/kernel/disk_device_manager/ddm_userland_interface.cpp (Results 1 – 25 of 29)
Revision Date Author Comments
# 4644c7cc 06-Jan-2018 Jérôme Duval <jerome.duval@gmail.com>

kernel: disk_device_manager: clean user interface

* avoid assignment in if statements
* use boolean conditions
* use copy_from_user_value/copy_to_user_value instead of user_memcpy
* no functional ch

kernel: disk_device_manager: clean user interface

* avoid assignment in if statements
* use boolean conditions
* use copy_from_user_value/copy_to_user_value instead of user_memcpy
* no functional changes except user buffer addresses check in:
_user_get_next_disk_device_id(), _user_get_disk_system_info(),
_user_get_next_disk_system_info(), _user_find_disk_system()
* remove TODO "Add user address checks and check return values of user_memcpy()!".

show more ...


# eac83fb3 30-Apr-2017 Axel Dörfler <axeld@pinc-software.de>

KPath: Replaced booleans with flags field.

* No functional change intended; I chose the flags in a way that it
should still work even if I missed a reference.


# 4419d699 23-Dec-2016 Jessica Hamilton <jessica.l.hamilton@gmail.com>

partitioning: pass along reference to parent when uninitializing.

* Fixes problems with setting the partition name after uninitializing
a partition in DriveSetup. Previously, UninitializeJob() was

partitioning: pass along reference to parent when uninitializing.

* Fixes problems with setting the partition name after uninitializing
a partition in DriveSetup. Previously, UninitializeJob() was
followed by SetStringJob(), but the kernel was updating the
change counter for the parent partition when uninitializing a
partition, leading to SetStringJob() having an incorrect change
counter for the parent partition. Now the parent change counter
will be correct when SetStringJob() runs.

show more ...


# f26118f2 29-Oct-2014 Adrien Destugues <pulkomandy@gmail.com>

Change error code for already mounted partition to B_BAD_VALUE.

As Axel pointed out, B_BAD_DATA is not the correct code here. B_BUSY
could be used but I wantd a code different from the existing one

Change error code for already mounted partition to B_BAD_VALUE.

As Axel pointed out, B_BAD_DATA is not the correct code here. B_BUSY
could be used but I wantd a code different from the existing one for
"partition already being initialized".

show more ...


# 4ed39e6a 28-Oct-2014 Adrien Destugues <pulkomandy@gmail.com>

disk device manager: check that partitions are unmounted before uninitializing.

when uninitializing a partition or a disk (removing the partition
table), check that all partitions from that table ar

disk device manager: check that partitions are unmounted before uninitializing.

when uninitializing a partition or a disk (removing the partition
table), check that all partitions from that table are unmounted, as they
are about to become invalid.

Fixes #8827.

show more ...


# 285f4cf4 13-Jun-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

* Added optional partition_module_info::uninitialize() hook. It is supposed to
destroy the partitioning system's on-disk structure.
* Adjusted the existing partitioning system implementations accor

* Added optional partition_module_info::uninitialize() hook. It is supposed to
destroy the partitioning system's on-disk structure.
* Adjusted the existing partitioning system implementations accordingly.
Actually implemented the hook for the intel partitioning system.
* Added Uninitialize() method to KDiskSystem and KPartitioningSystem. The latter
implements the method calling the new module hook.
* _user_uninitialize_partition(): Also let the disk system uninitialize the
on-disk structure.

This fixes the failure to initialize a disk device with BFS, when it contains a
valid partition map with at least one partition.


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

show more ...


# f84387d6 13-Jun-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

_user_initialize_partition(): After performing the operation don't set the new
disk system, if the partition already has a disk system set. This can happen
when the disk system's initialization funct

_user_initialize_partition(): After performing the operation don't set the new
disk system, if the partition already has a disk system set. This can happen
when the disk system's initialization function is lazy and just lets the DDM
rescan the partition. In bad cases the previous disk system has a higher
priority than the new one and, if its on-disk structures have not been
destroyed, it will win the rescan. Not setting the disk system in such cases at
least leaves the partition object in a consistent state.


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

show more ...


# ec623aca 13-Jun-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Removed weird debug output.


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


# 80ea5e35 01-Oct-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Fixed incorrect return value of _user_get_file_disk_device_path().


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


# f75b8de3 26-Jul-2009 Axel Dörfler <axeld@pinc-software.de>

* Discarded the "parametersSize" parameter from various disk device manager
functions.
* Since we now use UserStringParameter, this fixes the missing null termination
of the parameter string, and

* Discarded the "parametersSize" parameter from various disk device manager
functions.
* Since we now use UserStringParameter, this fixes the missing null termination
of the parameter string, and thus bug #4045.
* Removed UserMemoryParameter, as it's no longer in use.
* Adjusted syscalls accordingly.


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

show more ...


# 49fb53ee 02-Apr-2009 Axel Dörfler <axeld@pinc-software.de>

* Minor cleanup.


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


# 3f78b216 18-Mar-2009 Axel Dörfler <axeld@pinc-software.de>

* Implemented a basic notification mechanism. Right now, only media changes and
device additions/removals can be monitored.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29

* Implemented a basic notification mechanism. Right now, only media changes and
device additions/removals can be monitored.
* Minor cleanup.


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

show more ...


# 260e077f 13-Oct-2008 Axel Dörfler <axeld@pinc-software.de>

* Registering a file device now also normalizes the path now.


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


# 38bbc957 13-Oct-2008 Axel Dörfler <axeld@pinc-software.de>

* Made the use of file devices more convenient and complete by adding
the methods IsFile() and GetFilePath() to BDiskDevice, and
BDiskDeviceRoster::GetFileDeviceForPath().
* Added new syscalls to

* Made the use of file devices more convenient and complete by adding
the methods IsFile() and GetFilePath() to BDiskDevice, and
BDiskDeviceRoster::GetFileDeviceForPath().
* Added new syscalls to implement this functionality.
* Added new flag B_DISK_DEVICE_IS_FILE.
* Fixed wrong operator precedence assumption in the BDiskDevice class at
several places.
* Minor cleanup.


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

show more ...


# 6cc43bfb 22-Jul-2008 Axel Dörfler <axeld@pinc-software.de>

* _user_find_partition() did not work for partitions (only for devices), as it
did not set the "devicesOnly" flag to false when calling RegisterDevice().
* ddm_userland_interface.cpp incorrectly wr

* _user_find_partition() did not work for partitions (only for devices), as it
did not set the "devicesOnly" flag to false when calling RegisterDevice().
* ddm_userland_interface.cpp incorrectly wrote to userland memory when it
assigned "neededSize" in several places.
* Replaced on-stack path with the UserStringParameter class where appropriate.
* Made the UserStringParameter class castable to char*.
* Minor cleanup in KDiskDeviceManager.cpp.


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

show more ...


# 0cbc783b 17-Mar-2008 Axel Dörfler <axeld@pinc-software.de>

* _user_uninitialize_partition() never marked the partition unbusy
again. This fixes bug #1928.
* Added license header.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24421

* _user_uninitialize_partition() never marked the partition unbusy
again. This fixes bug #1928.
* Added license header.
* Minor cleanup.


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

show more ...


# b3a5629b 12-Nov-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

axeld + bonefish:
* Unmount when uninitializing a partition.
* Finished the media checker implementation, i.e. we rescan when a media
was inserted and uninitialize when ejected.
* Turned the disk d

axeld + bonefish:
* Unmount when uninitializing a partition.
* Finished the media checker implementation, i.e. we rescan when a media
was inserted and uninitialize when ejected.
* Turned the disk device media checker from a kernel daemon into a thread.


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

show more ...


# c9830ce0 10-Nov-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

* KDiskDeviceManager::{Find,Load}DiskSystem() can also find the disk
system by pretty name (not only module name) now.
* _user_initialize_partition() loads the disk system by pretty name.


git-svn

* KDiskDeviceManager::{Find,Load}DiskSystem() can also find the disk
system by pretty name (not only module name) now.
* _user_initialize_partition() loads the disk system by pretty name.


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

show more ...


# 7b45b55b 05-Nov-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

* Added back and partially reimplemented the
K{Disk,File,Partitioning}System writing methods. It is now required
that the caller has marked the concerned partitions busy, hence we can
(read-)ac

* Added back and partially reimplemented the
K{Disk,File,Partitioning}System writing methods. It is now required
that the caller has marked the concerned partitions busy, hence we can
(read-)access them without needing a lock. The module interfaces will
will be changed to take advantage of the fact as well. The methods take a
disk_job_id instead of a KDiskDeviceJob* now, though I haven't quite
decided, whether we need it at all or just want to add a special
handling in the cases where notifications during the operation make
sense.
* Reimplemented the disk device write support syscalls (save
_user_move_partition() for which other module hooks are needed). They
call the KDiskSystem methods, now.


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

show more ...


# 8354dac7 01-Nov-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

Folded KPhysicalPartition into KPartition. Removed the notion of shadow
partitions from the disk device manager.


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

Folded KPhysicalPartition into KPartition. Removed the notion of shadow
partitions from the disk device manager.


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

show more ...


# 32788795 01-Nov-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

* Moved partition scanning back to KDiskDeviceManager. ATM only
synchronous scanning is supported.
* Removed the disk device job support from the disk device manager.
* K{Disk,File,Partitioning}Sys

* Moved partition scanning back to KDiskDeviceManager. ATM only
synchronous scanning is supported.
* Removed the disk device job support from the disk device manager.
* K{Disk,File,Partitioning}System:
- Remove querying and validation methods.
- Commented out the modification methods until their fate is decided.
* Removed obsolete _user_get_partitionable_spaces().


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

show more ...


# 300868ce 31-Oct-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

* Removed no longer needed disk device related syscalls
(_kern_{supports,validate}_*(), etc.).
* Adjusted the prototypes of the disk device modification syscalls.
Commented out their implementati

* Removed no longer needed disk device related syscalls
(_kern_{supports,validate}_*(), etc.).
* Adjusted the prototypes of the disk device modification syscalls.
Commented out their implementations for the time -- they'll mostly
have to be rewritten completely.
* Implemented the userland disk device jobs.


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

show more ...


# bf95c9ae 07-Oct-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

* The shadow_changed() FS and partitioning system hooks take an
additional partition_data* child parameter now.
* _user_get_partitionable_spaces() doesn't need to copy the buffer into
the kernel,

* The shadow_changed() FS and partitioning system hooks take an
additional partition_data* child parameter now.
* _user_get_partitionable_spaces() doesn't need to copy the buffer into
the kernel, since it is no input parameter. It also copies back the
actual partitionable spaces count on error, now -- B_BUFFER_OVERFLOW
is returned when the buffer was too small, but then the count must be
returned too.
* Fixed several instances of syscall implementations that unloaded a disk
system, although they didn't load it in the first place. This screwed
up the load count with undesirable consequences.
* _user_create_child_partition() would set the size to the supplied
offset.
* Fixed broken loop in KPhysicalPartition::CreateShadowPartition().
* KPartition::RemoveChild() notified the listeners about the wrong
event.
* Intel partitioning module:
- The *_get_partitionable_spaces() correctly return B_BUFFER_OVERFLOW
now, if the supplied buffer is too small.
- Implemented a part of pm_shadow_changed(), which creates and updates
the PartitionMap, so that the validate_*() hooks have a chance to
work at all.



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

show more ...


# aa4d8ee6 05-Oct-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

* Allow NULL name argument on initialization.
* Some code beautification on the way.


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


# d6e565c7 05-Oct-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

* Fixed gcc 4 warnings.
* Style cleanup.


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


12