1 // virtualdrive_ioctl.h 2 3 #ifndef VIRTUAL_DRIVE_H 4 #define VIRTUAL_DRIVE_H 5 6 #include <Drivers.h> 7 8 // virtualdrive device directory and control device, "/dev" relative 9 #define VIRTUAL_DRIVE_DIRECTORY_REL "misc/virtualdrive" 10 #define VIRTUAL_DRIVE_CONTROL_DEVICE_REL VIRTUAL_DRIVE_DIRECTORY_REL \ 11 "/control" 12 // virtualdrive device directory and control device, absolute 13 #define VIRTUAL_DRIVE_DIRECTORY "/dev/" \ 14 VIRTUAL_DRIVE_DIRECTORY_REL 15 #define VIRTUAL_DRIVE_CONTROL_DEVICE "/dev/" \ 16 VIRTUAL_DRIVE_CONTROL_DEVICE_REL 17 18 #define VIRTUAL_DRIVE_IOCTL_BASE (B_DEVICE_OP_CODES_END + 10001) 19 20 enum { 21 VIRTUAL_DRIVE_REGISTER_FILE = VIRTUAL_DRIVE_IOCTL_BASE, 22 // on control device: virtual_drive_info*, fills in device_name 23 VIRTUAL_DRIVE_UNREGISTER_FILE, 24 // on data device: none 25 VIRTUAL_DRIVE_GET_INFO, 26 // on data device: virtual_drive_info* 27 }; 28 29 typedef struct virtual_drive_info { 30 char file_name[B_PATH_NAME_LENGTH]; 31 char device_name[B_PATH_NAME_LENGTH]; 32 device_geometry geometry; 33 bool use_geometry; 34 } virtual_drive_info; 35 36 #endif // VIRTUAL_DRIVE_H 37