Преглед на файлове

network: Don't configure new SCSI devices if network isn't supported

joshua stein преди 2 години
родител
ревизия
59f66653a4
променени са 1 файла, в които са добавени 6 реда и са изтрити 0 реда
  1. 6 0
      src/BlueSCSI_disk.cpp

+ 6 - 0
src/BlueSCSI_disk.cpp

@@ -410,6 +410,12 @@ bool scsiDiskOpenHDDImage(int target_idx, const char *filename, int scsi_id, int
         }
         else if (type == S2S_CFG_NETWORK)
         {
+            if (!platform_network_supported())
+            {
+                log("---- Error: network not supported on this device, ignoring ", filename);
+                img.file.close();
+                return false;
+            }
             log("---- Configuring as network based on image name");
             img.deviceType = S2S_CFG_NETWORK;
         }