Bläddra i källkod

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

joshua stein 2 år sedan
förälder
incheckning
59f66653a4
1 ändrade filer med 6 tillägg och 0 borttagningar
  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;
         }