packagefs: ioctls for getting and changing package activation
* Add PACKAGE_FS_OPERATION_GET_PACKAGE_INFOS which returns the node refs of all packages activated. * Add PACKAGE_FS_OPERATION_CHANGE_ACTIVATION to activate/deactivate multiple packages.
This commit is contained in:
@@ -21,10 +21,14 @@ enum PackageFSMountType {
|
||||
|
||||
|
||||
enum {
|
||||
PACKAGE_FS_OPERATION_GET_VOLUME_INFO = B_DEVICE_OP_CODES_END + 1
|
||||
PACKAGE_FS_OPERATION_GET_VOLUME_INFO = B_DEVICE_OP_CODES_END + 1,
|
||||
PACKAGE_FS_OPERATION_GET_PACKAGE_INFOS,
|
||||
PACKAGE_FS_OPERATION_CHANGE_ACTIVATION
|
||||
};
|
||||
|
||||
|
||||
// PACKAGE_FS_OPERATION_GET_VOLUME_INFO
|
||||
|
||||
struct PackageFSVolumeInfo {
|
||||
PackageFSMountType mountType;
|
||||
|
||||
@@ -32,6 +36,55 @@ struct PackageFSVolumeInfo {
|
||||
// for the three standard volumes)
|
||||
dev_t rootDeviceID;
|
||||
ino_t rootDirectoryID;
|
||||
|
||||
// device and node id of the volume's packages directory
|
||||
dev_t packagesDeviceID;
|
||||
ino_t packagesDirectoryID;
|
||||
};
|
||||
|
||||
|
||||
// PACKAGE_FS_OPERATION_GET_PACKAGE_INFOS
|
||||
|
||||
struct PackageFSPackageInfo {
|
||||
// node_ref of the package file
|
||||
dev_t packageDeviceID;
|
||||
ino_t packageNodeID;
|
||||
};
|
||||
|
||||
struct PackageFSGetPackageInfosRequest {
|
||||
// Filled in by the FS. packageCount is set to the actual package count,
|
||||
// even if it is greater than the array, so the caller can determine whether
|
||||
// the array was large enough.
|
||||
uint32 packageCount;
|
||||
PackageFSPackageInfo infos[1];
|
||||
};
|
||||
|
||||
|
||||
// PACKAGE_FS_OPERATION_CHANGE_ACTIVATION
|
||||
|
||||
enum PackageFSActivationChangeType {
|
||||
PACKAGE_FS_ACTIVATE_PACKAGE,
|
||||
PACKAGE_FS_DEACTIVATE_PACKAGE,
|
||||
PACKAGE_FS_REACTIVATE_PACKAGE
|
||||
};
|
||||
|
||||
struct PackageFSActivationChangeItem {
|
||||
PackageFSActivationChangeType type;
|
||||
|
||||
// node_ref of the package file
|
||||
dev_t packageDeviceID;
|
||||
ino_t packageNodeID;
|
||||
|
||||
// entry_ref of the package file
|
||||
uint32 nameLength;
|
||||
dev_t parentDeviceID;
|
||||
ino_t parentDirectoryID;
|
||||
char name[1];
|
||||
};
|
||||
|
||||
struct PackageFSActivationChangeRequest {
|
||||
uint32 itemCount;
|
||||
PackageFSActivationChangeItem items[1];
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user