diff options
author | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2016-02-14 20:45:08 +0200 |
---|---|---|
committer | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2016-02-14 20:45:08 +0200 |
commit | 9d0525182dc926f68d73a9815c1b1abae1d69236 (patch) | |
tree | dea13b52945493d7e9a339d9c6e585b21cd18fd2 | |
parent | 9e0478a902d311bd3f3b7c22468cf464723e0375 (diff) | |
download | micropython-9d0525182dc926f68d73a9815c1b1abae1d69236.tar.gz micropython-9d0525182dc926f68d73a9815c1b1abae1d69236.zip |
tests/vfs_fat_ramdisk: Switch to ioctl-based blockdev API.
-rw-r--r-- | tests/extmod/vfs_fat_ramdisk.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/tests/extmod/vfs_fat_ramdisk.py b/tests/extmod/vfs_fat_ramdisk.py index 4750c76110..919117a9ce 100644 --- a/tests/extmod/vfs_fat_ramdisk.py +++ b/tests/extmod/vfs_fat_ramdisk.py @@ -21,11 +21,10 @@ class RAMFS: for i in range(len(buf)): self.data[n*512+i] = buf[i] - def sync(self): - pass - - def count(self): - return len(self.data) // 512 + def ioctl(self, op, arg): + #print("ioctl(%d, %r)" % (op, arg)) + if op == 4: # BP_IOCTL_SEC_COUNT + return len(self.data) // 512 bdev = RAMFS(48) |