notaz.gp2x.de
/
megadrive.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b40440c
)
mega-usb: support BE
author
notaz
<notasas@gmail.com>
Sun, 19 Nov 2017 18:59:20 +0000
(20:59 +0200)
committer
notaz
<notasas@gmail.com>
Sun, 19 Nov 2017 18:59:20 +0000
(20:59 +0200)
mega-usb/mega-usb.c
patch
|
blob
|
blame
|
history
diff --git
a/mega-usb/mega-usb.c
b/mega-usb/mega-usb.c
index
2649797
..
be97b7c
100644
(file)
--- a/
mega-usb/mega-usb.c
+++ b/
mega-usb/mega-usb.c
@@
-151,6
+151,7
@@
static int write_with_check(int fd, const void *data, size_t size, char chk)
static int send_file(int fd, const char *fname, const char *cmd)
{
+ unsigned char blocks_b;
char buf[0x10000];
int retval = -1;
FILE *f = NULL;
@@
-181,9
+182,10
@@
static int send_file(int fd, const char *fname, const char *cmd)
blocksz = sizeof(buf);
blocks = (size + blocksz - 1) / blocksz;
+ blocks_b = blocks;
send_cmd(fd, cmd);
- ret = write_with_check(fd, &blocks, 1, 'k');
+ ret = write_with_check(fd, &blocks
_b
, 1, 'k');
if (ret)
return ret;