1 /* 2 * Copyright 2003-2009, Haiku Inc. 3 * Distributed under the terms of the MIT License. 4 * 5 * Authors: 6 * Ingo Weinhold, bonefish@users.sf.net 7 */ 8 #ifndef _SYSTEM_DDM_USERLAND_INTERFACE_DEFS_H 9 #define _SYSTEM_DDM_USERLAND_INTERFACE_DEFS_H 10 11 12 #include <OS.h> 13 14 #include <DiskDeviceDefs.h> 15 16 17 // userland partition representation 18 typedef struct user_partition_data user_partition_data; 19 struct user_partition_data { 20 partition_id id; 21 off_t offset; 22 off_t size; 23 off_t content_size; 24 uint32 block_size; 25 uint32 status; 26 uint32 flags; 27 dev_t volume; 28 int32 index; 29 int32 change_counter; // TODO: needed? 30 disk_system_id disk_system; 31 char* name; 32 char* content_name; 33 char* type; 34 char* content_type; 35 char* parameters; 36 char* content_parameters; 37 void* user_data; 38 int32 child_count; 39 user_partition_data* children[1]; 40 }; 41 42 // userland disk device representation 43 typedef struct user_disk_device_data { 44 uint32 device_flags; 45 char* path; 46 user_partition_data device_partition_data; 47 } user_disk_device_data; 48 49 // userland disk system representation 50 typedef struct user_disk_system_info { 51 disk_system_id id; 52 char name[B_FILE_NAME_LENGTH]; 53 // TODO: better B_PATH_NAME_LENGTH? 54 char short_name[B_OS_NAME_LENGTH]; 55 char pretty_name[B_OS_NAME_LENGTH]; 56 uint32 flags; 57 } user_disk_system_info; 58 59 // userland disk device job representation 60 typedef struct user_disk_device_job_info { 61 disk_job_id id; 62 uint32 type; 63 partition_id partition; 64 char description[256]; 65 } user_disk_device_job_info; 66 67 68 #endif // _SYSTEM_DDM_USERLAND_INTERFACE_DEFS_H 69