File tree Expand file tree Collapse file tree 5 files changed +5
-485
lines changed Expand file tree Collapse file tree 5 files changed +5
-485
lines changed Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -43,7 +43,6 @@ type msc struct {
4343
4444 maxLUN uint8 // Maximum Logical Unit Number (n-1 for n LUNs)
4545 dev machine.BlockDevice
46- ready bool
4746 readOnly bool
4847
4948 vendorID [8 ]byte // Max 8 ASCII characters
@@ -91,10 +90,6 @@ func newMSC() *msc {
9190 }
9291 m .RegisterBlockDevice (NewDefaultDisk ())
9392
94- if m .dev != nil {
95- m .ready = true
96- }
97-
9893 // Set default inquiry data fields
9994 m .SetVendorID ("TinyGo" )
10095 m .SetProductID ("Mass Storage" )
@@ -129,6 +124,10 @@ func newMSC() *msc {
129124 return m
130125}
131126
127+ func (m * msc ) ready () bool {
128+ return m .dev != nil
129+ }
130+
132131func (m * msc ) resetBuffer (length int ) {
133132 // Reset the buffer to the specified length
134133 m .buf = m .buf [:length ]
Original file line number Diff line number Diff line change @@ -106,7 +106,7 @@ func (m *msc) scsiTestUnitReady() {
106106 m .queuedBytes = 0
107107
108108 // Check if the device is ready
109- if ! m .ready {
109+ if ! m .ready () {
110110 // If not ready set sense data
111111 m .senseKey = scsi .SenseNotReady
112112 m .addlSenseCode = scsi .SenseCodeMediumNotPresent
You can’t perform that action at this time.
0 commit comments