mirror of
https://github.com/curioustorvald/tsvm.git
synced 2026-06-08 22:34:03 +09:00
showing disk usage on DIR command
This commit is contained in:
@@ -417,6 +417,10 @@ class TestDiskDrive(private val vm: VM, private val driveNum: Int, theRootPath:
|
||||
writeBufferUsage = 0
|
||||
statusCode.set(STATE_CODE_STANDBY)
|
||||
}
|
||||
else if (inputString.startsWith("USAGE")) {
|
||||
recipient?.writeout(composePositiveAns("USED123456/TOTAL654321"))
|
||||
statusCode.set(STATE_CODE_STANDBY)
|
||||
}
|
||||
else
|
||||
statusCode.set(STATE_CODE_ILLEGAL_COMMAND)
|
||||
}
|
||||
|
||||
@@ -420,6 +420,10 @@ class TevdDiskDrive(private val vm: VM, private val driveNum: Int, private val t
|
||||
writeBufferUsage = 0
|
||||
statusCode.set(TestDiskDrive.STATE_CODE_STANDBY)
|
||||
}
|
||||
else if (inputString.startsWith("USAGE")) {
|
||||
recipient?.writeout(TestDiskDrive.composePositiveAns("USED${DOM.usedBytes}/TOTAL${DOM.capacity}"))
|
||||
statusCode.set(TestDiskDrive.STATE_CODE_STANDBY)
|
||||
}
|
||||
else
|
||||
statusCode.set(TestDiskDrive.STATE_CODE_ILLEGAL_COMMAND)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user