@@ -28,36 +28,36 @@ static inline int ioman_allocate_file(FILE* file) {
2828 return -1 ;
2929}
3030
31- static inline int ioman_get_drive (std::string path) {
31+ static inline int ioman_get_device (std::string path) {
3232 auto p = path.find_first_of (' :' );
3333
3434 if (p == std::string::npos)
3535 return 0 ;
3636
37- std::string drive = path.substr (0 , p);
38-
39- if (drive == " rom0" ) {
40- return IOMAN_DRIVE_ROM0 ;
41- } else if (drive == " rom1" ) {
42- return IOMAN_DRIVE_ROM1 ;
43- } else if (drive == " cdrom0" ) {
44- return IOMAN_DRIVE_CDROM0 ;
45- } else if (drive == " host" ) {
46- return IOMAN_DRIVE_HOST ;
47- } else if (drive == " host0" ) {
48- return IOMAN_DRIVE_HOST ;
49- } else if (drive == " mc0" ) {
50- return IOMAN_DRIVE_MC0 ;
51- } else if (drive == " mc1" ) {
52- return IOMAN_DRIVE_MC1 ;
53- } else if (drive == " mass" ) {
54- return IOMAN_DRIVE_MASS ;
37+ std::string device = path.substr (0 , p);
38+
39+ if (device == " rom0" ) {
40+ return IOMAN_DEV_ROM0 ;
41+ } else if (device == " rom1" ) {
42+ return IOMAN_DEV_ROM1 ;
43+ } else if (device == " cdrom0" ) {
44+ return IOMAN_DEV_CDROM0 ;
45+ } else if (device == " host" ) {
46+ return IOMAN_DEV_HOST ;
47+ } else if (device == " host0" ) {
48+ return IOMAN_DEV_HOST ;
49+ } else if (device == " mc0" ) {
50+ return IOMAN_DEV_MC0 ;
51+ } else if (device == " mc1" ) {
52+ return IOMAN_DEV_MC1 ;
53+ } else if (device == " mass" ) {
54+ return IOMAN_DEV_MASS ;
5555 }
5656
57- // To-do: There's probably some ATA/DEV9/HDD drive
57+ // To-do: There's probably some ATA/DEV9/HDD device
5858 // but I have no idea how it's used
5959
60- return IOMAN_DRIVE_UNKNOWN ;
60+ return IOMAN_DEV_UNKNOWN ;
6161}
6262
6363extern " C" int ioman_open (struct iop_state * iop) {
@@ -74,10 +74,10 @@ extern "C" int ioman_open(struct iop_state* iop) {
7474
7575 std::string path (buf);
7676
77- int drive = ioman_get_drive (path);
77+ int device = ioman_get_device (path);
7878
7979 // Only hook host files
80- if (drive != IOMAN_DRIVE_HOST && drive != IOMAN_DRIVE_MASS )
80+ if (device != IOMAN_DEV_HOST && device != IOMAN_DEV_MASS )
8181 return 0 ;
8282
8383 // printf("path=%s\n", path.c_str());
0 commit comments