Make Trinket M0 build fit; make RAMFS in vfs_fat_* tests be compliant with expected API

This commit is contained in:
Dan Halbert 2018-06-14 21:02:12 -04:00
parent e724bc1c4e
commit fa814a32ce
6 changed files with 11 additions and 1 deletions

View File

@ -114,7 +114,7 @@ else
# -finline-limit=80 or so is similar to not having it on.
# There is no simple default value, though.
ifdef INTERNAL_FLASH_FILESYSTEM
CFLAGS += -finline-limit=60
CFLAGS += -finline-limit=55
endif
CFLAGS += -flto
endif

View File

@ -27,11 +27,13 @@ class RAMFS:
#print("readblocks(%s, %x(%d))" % (n, id(buf), len(buf)))
for i in range(len(buf)):
buf[i] = self.data[n * self.SEC_SIZE + i]
return 0
def writeblocks(self, n, buf):
#print("writeblocks(%s, %x)" % (n, id(buf)))
for i in range(len(buf)):
self.data[n * self.SEC_SIZE + i] = buf[i]
return 0
def ioctl(self, op, arg):
#print("ioctl(%d, %r)" % (op, arg))

View File

@ -27,11 +27,13 @@ class RAMFS:
#print("readblocks(%s, %x(%d))" % (n, id(buf), len(buf)))
for i in range(len(buf)):
buf[i] = self.data[n * self.SEC_SIZE + i]
return 0
def writeblocks(self, n, buf):
#print("writeblocks(%s, %x)" % (n, id(buf)))
for i in range(len(buf)):
self.data[n * self.SEC_SIZE + i] = buf[i]
return 0
def ioctl(self, op, arg):
#print("ioctl(%d, %r)" % (op, arg))

View File

@ -27,11 +27,13 @@ class RAMFS:
#print("readblocks(%s, %x(%d))" % (n, id(buf), len(buf)))
for i in range(len(buf)):
buf[i] = self.data[n * self.SEC_SIZE + i]
return 0
def writeblocks(self, n, buf):
#print("writeblocks(%s, %x)" % (n, id(buf)))
for i in range(len(buf)):
self.data[n * self.SEC_SIZE + i] = buf[i]
return 0
def ioctl(self, op, arg):
#print("ioctl(%d, %r)" % (op, arg))

View File

@ -25,11 +25,13 @@ class RAMFS_OLD:
#print("readblocks(%s, %x(%d))" % (n, id(buf), len(buf)))
for i in range(len(buf)):
buf[i] = self.data[n * self.SEC_SIZE + i]
return 0
def writeblocks(self, n, buf):
#print("writeblocks(%s, %x)" % (n, id(buf)))
for i in range(len(buf)):
self.data[n * self.SEC_SIZE + i] = buf[i]
return 0
def sync(self):
pass

View File

@ -26,11 +26,13 @@ class RAMFS:
#print("readblocks(%s, %x(%d))" % (n, id(buf), len(buf)))
for i in range(len(buf)):
buf[i] = self.data[n * self.SEC_SIZE + i]
return 0
def writeblocks(self, n, buf):
#print("writeblocks(%s, %x)" % (n, id(buf)))
for i in range(len(buf)):
self.data[n * self.SEC_SIZE + i] = buf[i]
return 0
def ioctl(self, op, arg):
#print("ioctl(%d, %r)" % (op, arg))