@@ -57,7 +57,7 @@ bool _validate_host_slot(uint8_t slot, const char *dmsg)
5757
5858bool _validate_device_slot (uint8_t slot, const char *dmsg)
5959{
60- if (slot < MAX_DISK_DEVICES )
60+ if (slot < MAX_DWDISK_DEVICES )
6161 return true ;
6262
6363 if (dmsg == NULL )
@@ -732,7 +732,7 @@ void drivewireFuji::disk_image_umount()
732732 Debug_printf (" Fuji cmd: UNMOUNT IMAGE 0x%02X\n " , deviceSlot);
733733
734734 // Handle disk slots
735- if (deviceSlot < MAX_DISK_DEVICES )
735+ if (deviceSlot < MAX_DWDISK_DEVICES )
736736 {
737737 _fnDisks[deviceSlot].disk_dev .unmount ();
738738 _fnDisks[deviceSlot].disk_dev .device_active = false ;
@@ -790,7 +790,7 @@ void drivewireFuji::image_rotate()
790790// This gets called when we're about to shutdown/reboot
791791void drivewireFuji::shutdown ()
792792{
793- for (int i = 0 ; i < MAX_DISK_DEVICES ; i++)
793+ for (int i = 0 ; i < MAX_DWDISK_DEVICES ; i++)
794794 _fnDisks[i].disk_dev .unmount ();
795795}
796796
@@ -1108,7 +1108,7 @@ void drivewireFuji::unmount_host()
11081108 unsigned char hostSlot = SYSTEM_BUS.read ();
11091109
11101110 // Unmount any disks associated with host slot
1111- for (int i = 0 ; i < MAX_DISK_DEVICES ; i++)
1111+ for (int i = 0 ; i < MAX_DWDISK_DEVICES ; i++)
11121112 {
11131113 if (_fnDisks[i].host_slot == hostSlot)
11141114 {
@@ -1166,13 +1166,13 @@ void drivewireFuji::read_device_slots()
11661166 uint8_t mode;
11671167 char filename[MAX_DISPLAY_FILENAME_LEN];
11681168 };
1169- disk_slot diskSlots[MAX_DISK_DEVICES ];
1169+ disk_slot diskSlots[MAX_DWDISK_DEVICES ];
11701170
11711171 int returnsize;
11721172 char *filename;
11731173
11741174 // Load the data from our current device array
1175- for (int i = 0 ; i < MAX_DISK_DEVICES ; i++)
1175+ for (int i = 0 ; i < MAX_DWDISK_DEVICES ; i++)
11761176 {
11771177 diskSlots[i].mode = _fnDisks[i].access_mode ;
11781178 diskSlots[i].hostSlot = _fnDisks[i].host_slot ;
@@ -1195,7 +1195,7 @@ void drivewireFuji::read_device_slots()
11951195 }
11961196 }
11971197
1198- returnsize = sizeof (disk_slot) * MAX_DISK_DEVICES ;
1198+ returnsize = sizeof (disk_slot) * MAX_DWDISK_DEVICES ;
11991199
12001200 response.clear ();
12011201 response.shrink_to_fit ();
@@ -1215,12 +1215,12 @@ void drivewireFuji::write_device_slots()
12151215 uint8_t hostSlot;
12161216 uint8_t mode;
12171217 char filename[MAX_DISPLAY_FILENAME_LEN];
1218- } diskSlots[MAX_DISK_DEVICES ];
1218+ } diskSlots[MAX_DWDISK_DEVICES ];
12191219
12201220 SYSTEM_BUS.read ((uint8_t *)&diskSlots, sizeof (diskSlots));
12211221
12221222 // Load the data into our current device array
1223- for (int i = 0 ; i < MAX_DISK_DEVICES ; i++)
1223+ for (int i = 0 ; i < MAX_DWDISK_DEVICES ; i++)
12241224 _fnDisks[i].reset (diskSlots[i].filename , diskSlots[i].hostSlot , diskSlots[i].mode );
12251225
12261226 // Save the data to disk
@@ -1239,7 +1239,7 @@ void drivewireFuji::_populate_slots_from_config()
12391239 _fnHosts[i].set_hostname (Config.get_host_name (i).c_str ());
12401240 }
12411241
1242- for (int i = 0 ; i < MAX_DISK_DEVICES ; i++)
1242+ for (int i = 0 ; i < MAX_DWDISK_DEVICES ; i++)
12431243 {
12441244 _fnDisks[i].reset ();
12451245
@@ -1278,7 +1278,7 @@ void drivewireFuji::_populate_config_from_slots()
12781278 }
12791279 }
12801280
1281- for (int i = 0 ; i < MAX_DISK_DEVICES ; i++)
1281+ for (int i = 0 ; i < MAX_DWDISK_DEVICES ; i++)
12821282 {
12831283 if (_fnDisks[i].host_slot >= MAX_HOSTS || _fnDisks[i].filename [0 ] == ' \0 ' )
12841284 Config.clear_mount (i);
@@ -1304,7 +1304,7 @@ void drivewireFuji::set_device_filename()
13041304 Debug_printf (" Fuji cmd: SET DEVICE SLOT 0x%02X/%02X/%02X FILENAME: %s\n " , slot, host, mode, tmp);
13051305
13061306 // Handle DISK slots
1307- if (slot < MAX_DISK_DEVICES )
1307+ if (slot < MAX_DWDISK_DEVICES )
13081308 {
13091309 memcpy (_fnDisks[slot].filename , tmp, MAX_FILENAME_LEN);
13101310 // If the filename is empty, mark this as an invalid host, so that mounting will ignore it too
0 commit comments