Skip to content

Commit

Permalink
Fix ReinsertOnInquiry / ReinsertAfterEject in global section
Browse files Browse the repository at this point in the history
Previously the settings would be correctly parsed only inside [SCSIx]
device specific sections. When specified in [SCSI] they would be ignored.
PetteriAimonen authored and erichelgeson committed Jun 20, 2023
1 parent fc28a79 commit 0cf1912
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/BlueSCSI_disk.cpp
Original file line number Diff line number Diff line change
@@ -498,6 +498,8 @@ static void scsiDiskConfigDefaults(int target_idx)
img.headsPerCylinder = defaults.headsPerCylinder;
img.quirks = defaults.quirks;
img.prefetchbytes = defaults.prefetchBytes;
img.reinsert_on_inquiry = false;
img.reinsert_after_eject = true;
memset(img.vendor, 0, sizeof(img.vendor));
memset(img.prodId, 0, sizeof(img.prodId));
memset(img.revision, 0, sizeof(img.revision));
@@ -516,8 +518,8 @@ static void scsiDiskLoadConfig(int target_idx, const char *section)
img.quirks = ini_getl(section, "Quirks", img.quirks, CONFIGFILE);
img.rightAlignStrings = ini_getbool(section, "RightAlignStrings", 0, CONFIGFILE);
img.prefetchbytes = ini_getl(section, "PrefetchBytes", img.prefetchbytes, CONFIGFILE);
img.reinsert_on_inquiry = ini_getbool(section, "ReinsertCDOnInquiry", 0, CONFIGFILE);
img.reinsert_after_eject = ini_getbool(section, "ReinsertAfterEject", 1, CONFIGFILE);
img.reinsert_on_inquiry = ini_getbool(section, "ReinsertCDOnInquiry", img.reinsert_on_inquiry, CONFIGFILE);
img.reinsert_after_eject = ini_getbool(section, "ReinsertAfterEject", img.reinsert_after_eject, CONFIGFILE);
img.ejectButton = ini_getl(section, "EjectButton", 0, CONFIGFILE);

char tmp[32];

0 comments on commit 0cf1912

Please sign in to comment.