File tree 5 files changed +5
-485
lines changed
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 {
43
43
44
44
maxLUN uint8 // Maximum Logical Unit Number (n-1 for n LUNs)
45
45
dev machine.BlockDevice
46
- ready bool
47
46
readOnly bool
48
47
49
48
vendorID [8 ]byte // Max 8 ASCII characters
@@ -91,10 +90,6 @@ func newMSC() *msc {
91
90
}
92
91
m .RegisterBlockDevice (NewDefaultDisk ())
93
92
94
- if m .dev != nil {
95
- m .ready = true
96
- }
97
-
98
93
// Set default inquiry data fields
99
94
m .SetVendorID ("TinyGo" )
100
95
m .SetProductID ("Mass Storage" )
@@ -129,6 +124,10 @@ func newMSC() *msc {
129
124
return m
130
125
}
131
126
127
+ func (m * msc ) ready () bool {
128
+ return m .dev != nil
129
+ }
130
+
132
131
func (m * msc ) resetBuffer (length int ) {
133
132
// Reset the buffer to the specified length
134
133
m .buf = m .buf [:length ]
Original file line number Diff line number Diff line change @@ -106,7 +106,7 @@ func (m *msc) scsiTestUnitReady() {
106
106
m .queuedBytes = 0
107
107
108
108
// Check if the device is ready
109
- if ! m .ready {
109
+ if ! m .ready () {
110
110
// If not ready set sense data
111
111
m .senseKey = scsi .SenseNotReady
112
112
m .addlSenseCode = scsi .SenseCodeMediumNotPresent
You can’t perform that action at this time.
0 commit comments