Skip to content

Commit 9d05251

Browse files
committed
tests/vfs_fat_ramdisk: Switch to ioctl-based blockdev API.
1 parent 9e0478a commit 9d05251

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

tests/extmod/vfs_fat_ramdisk.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,10 @@ def writeblocks(self, n, buf):
2121
for i in range(len(buf)):
2222
self.data[n*512+i] = buf[i]
2323

24-
def sync(self):
25-
pass
26-
27-
def count(self):
28-
return len(self.data) // 512
24+
def ioctl(self, op, arg):
25+
#print("ioctl(%d, %r)" % (op, arg))
26+
if op == 4: # BP_IOCTL_SEC_COUNT
27+
return len(self.data) // 512
2928

3029

3130
bdev = RAMFS(48)

0 commit comments

Comments
 (0)