tests/vfs_fat_ramdisk: Switch to ioctl-based blockdev API.

This commit is contained in:
Paul Sokolovsky 2016-02-14 20:45:08 +02:00
parent 9e0478a902
commit 9d0525182d

View File

@ -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)