Index: emcore/trunk/tools/emcore.py |
— | — | @@ -901,7 +901,7 @@ |
902 | 902 | storageinfo = self.emcore.storage_get_info(volume)
|
903 | 903 | while count > 0:
|
904 | 904 | sectors = min(count, int(buffsize / storageinfo.sectorsize))
|
905 | | - self.emcore.storage_read_sectors_md(volume, sector, sectors, buffer, buffsize)
|
| 905 | + self.emcore.storage_read_sectors_md(volume, sector, sectors, buffsize, buffer)
|
906 | 906 | f.write(self.emcore.read(buffer, storageinfo.sectorsize * sectors))
|
907 | 907 | sector = sector + sectors
|
908 | 908 | count = count - sectors
|
— | — | @@ -941,7 +941,7 @@ |
942 | 942 | if len(data) == 0: break
|
943 | 943 | while len(data) < bytes: data = data + f.read(bytes - len(data))
|
944 | 944 | self.emcore.write(buffer, data)
|
945 | | - self.emcore.storage_write_sectors_md(volume, sector, sectors, buffer, buffsize)
|
| 945 | + self.emcore.storage_write_sectors_md(volume, sector, sectors, buffsize, buffer)
|
946 | 946 | sector = sector + sectors
|
947 | 947 | count = count - sectors
|
948 | 948 | f.close()
|
— | — | @@ -1029,7 +1029,7 @@ |
1030 | 1030 | fd = self.emcore.file_open(remotename, 0)
|
1031 | 1031 | size = self.emcore.file_size(fd)
|
1032 | 1032 | while size > 0:
|
1033 | | - bytes = self.emcore.file_read(fd, buffer, buffsize)
|
| 1033 | + bytes = self.emcore.file_read(fd, buffsize, buffer)
|
1034 | 1034 | f.write(self.emcore.read(buffer, bytes))
|
1035 | 1035 | size = size - bytes
|
1036 | 1036 | self.emcore.file_close(fd)
|
— | — | @@ -1065,8 +1065,8 @@ |
1066 | 1066 | entry = self.emcore.dir_read(handle)
|
1067 | 1067 | if entry.name == "." or entry.name == "..": continue
|
1068 | 1068 | elif entry.attributes & 0x10:
|
1069 | | - self.gettree(remotepath + "/" + entry.name, localpath + "/" + entry.name, buffer, buffsize)
|
1070 | | - else: self.get(remotepath + "/" + entry.name, localpath + "/" + entry.name, buffer, buffsize)
|
| 1069 | + self.gettree(remotepath + "/" + entry.name, localpath + "/" + entry.name, buffsize, buffer)
|
| 1070 | + else: self.get(remotepath + "/" + entry.name, localpath + "/" + entry.name, buffsize, buffer)
|
1071 | 1071 | except: break
|
1072 | 1072 | self.emcore.dir_close(handle)
|
1073 | 1073 | finally:
|
— | — | @@ -1102,7 +1102,7 @@ |
1103 | 1103 | self.emcore.write(buffer, data)
|
1104 | 1104 | bytes = 0
|
1105 | 1105 | while bytes < len(data):
|
1106 | | - bytes = bytes + self.emcore.file_write(fd, buffer + bytes, len(data) - bytes)
|
| 1106 | + bytes = bytes + self.emcore.file_write(fd, len(data) - bytes, buffer + bytes)
|
1107 | 1107 | self.emcore.file_close(fd)
|
1108 | 1108 | f.close()
|
1109 | 1109 | finally:
|
— | — | @@ -1138,7 +1138,7 @@ |
1139 | 1139 | except: self.logger.info(" failed\n")
|
1140 | 1140 | for f in d[2]:
|
1141 | 1141 | if not prefix.find("/.svn/") > -1:
|
1142 | | - self.put(d[0] + "/" + f, prefix + f, buffer, buffsize)
|
| 1142 | + self.put(d[0] + "/" + f, prefix + f, buffsize, buffer)
|
1143 | 1143 | finally:
|
1144 | 1144 | if malloc == True:
|
1145 | 1145 | self.emcore.free(buffer)
|