2008-05-14 07:55:16 +04:00
|
|
|
/*
|
2009-07-26 21:23:59 +04:00
|
|
|
* Copyright 2003-2009, Haiku Inc.
|
2008-05-14 07:55:16 +04:00
|
|
|
* Distributed under the terms of the MIT License.
|
|
|
|
*
|
|
|
|
* Authors:
|
|
|
|
* Ingo Weinhold, bonefish@users.sf.net
|
|
|
|
*/
|
|
|
|
#ifndef _SYSTEM_DDM_USERLAND_INTERFACE_DEFS_H
|
|
|
|
#define _SYSTEM_DDM_USERLAND_INTERFACE_DEFS_H
|
|
|
|
|
2009-07-26 21:23:59 +04:00
|
|
|
|
2008-05-14 07:55:16 +04:00
|
|
|
#include <OS.h>
|
|
|
|
|
|
|
|
#include <DiskDeviceDefs.h>
|
|
|
|
|
|
|
|
|
|
|
|
// userland partition representation
|
|
|
|
typedef struct user_partition_data user_partition_data;
|
|
|
|
struct user_partition_data {
|
2009-07-26 21:23:59 +04:00
|
|
|
partition_id id;
|
|
|
|
off_t offset;
|
|
|
|
off_t size;
|
|
|
|
off_t content_size;
|
|
|
|
uint32 block_size;
|
2022-09-15 19:04:53 +03:00
|
|
|
uint32 physical_block_size;
|
2009-07-26 21:23:59 +04:00
|
|
|
uint32 status;
|
|
|
|
uint32 flags;
|
|
|
|
dev_t volume;
|
|
|
|
int32 index;
|
|
|
|
int32 change_counter; // TODO: needed?
|
|
|
|
disk_system_id disk_system;
|
|
|
|
char* name;
|
|
|
|
char* content_name;
|
|
|
|
char* type;
|
|
|
|
char* content_type;
|
|
|
|
char* parameters;
|
|
|
|
char* content_parameters;
|
|
|
|
void* user_data;
|
|
|
|
int32 child_count;
|
|
|
|
user_partition_data* children[1];
|
2008-05-14 07:55:16 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
// userland disk device representation
|
|
|
|
typedef struct user_disk_device_data {
|
2009-07-26 21:23:59 +04:00
|
|
|
uint32 device_flags;
|
|
|
|
char* path;
|
|
|
|
user_partition_data device_partition_data;
|
2008-05-14 07:55:16 +04:00
|
|
|
} user_disk_device_data;
|
|
|
|
|
|
|
|
// userland disk system representation
|
|
|
|
typedef struct user_disk_system_info {
|
|
|
|
disk_system_id id;
|
2009-07-26 21:23:59 +04:00
|
|
|
char name[B_FILE_NAME_LENGTH];
|
|
|
|
// TODO: better B_PATH_NAME_LENGTH?
|
2008-05-14 07:55:16 +04:00
|
|
|
char short_name[B_OS_NAME_LENGTH];
|
|
|
|
char pretty_name[B_OS_NAME_LENGTH];
|
|
|
|
uint32 flags;
|
|
|
|
} user_disk_system_info;
|
|
|
|
|
|
|
|
// userland disk device job representation
|
|
|
|
typedef struct user_disk_device_job_info {
|
|
|
|
disk_job_id id;
|
|
|
|
uint32 type;
|
|
|
|
partition_id partition;
|
|
|
|
char description[256];
|
|
|
|
} user_disk_device_job_info;
|
|
|
|
|
|
|
|
|
|
|
|
#endif // _SYSTEM_DDM_USERLAND_INTERFACE_DEFS_H
|