Skip to content

Commit 9b400a3

Browse files
committed
chore: remove unused clutter
1 parent b15b9df commit 9b400a3

File tree

5 files changed

+5
-485
lines changed

5 files changed

+5
-485
lines changed

src/machine/usb/msc/fakefs/fakefs.go

-83
This file was deleted.

src/machine/usb/msc/fakefs/fat12.go

-67
This file was deleted.

src/machine/usb/msc/msc.go

+4-5
Original file line numberDiff line numberDiff 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+
132131
func (m *msc) resetBuffer(length int) {
133132
// Reset the buffer to the specified length
134133
m.buf = m.buf[:length]

src/machine/usb/msc/scsi.go

+1-1
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)