Browse Source

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

joshua stein 2 năm trước cách đây
mục cha
commit
59f66653a4
1 tập tin đã thay đổi với 6 bổ sung0 xóa
  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;
         }