|
version 1.7, 2014/02/06 15:32:11
|
version 1.7.4.1, 2017/01/22 20:40:10
|
|
Line 12 terms:
|
Line 12 terms:
|
| All of the documentation and software included in the ELWIX and AITNET |
All of the documentation and software included in the ELWIX and AITNET |
| Releases is copyrighted by ELWIX - Sofia/Bulgaria <info@elwix.org> |
Releases is copyrighted by ELWIX - Sofia/Bulgaria <info@elwix.org> |
| |
|
| Copyright 2004 - 2014 | Copyright 2004 - 2017 |
| by Michael Pounov <misho@elwix.org>. All rights reserved. |
by Michael Pounov <misho@elwix.org>. All rights reserved. |
| |
|
| Redistribution and use in source and binary forms, with or without |
Redistribution and use in source and binary forms, with or without |
|
Line 129 EmptyStore(int img, int flg)
|
Line 129 EmptyStore(int img, int flg)
|
| if (wlen == -1) |
if (wlen == -1) |
| ESYSERR(0); |
ESYSERR(0); |
| else |
else |
| EERROR(EIO, "Error at chunk %d init %d bytes, " | EERROR(EIO, "Error at chunk %d init %zd bytes, " |
| "should be %u\n", i, wlen, bufSize); | "should be %d\n", i, wlen, bufSize); |
| return -1; |
return -1; |
| } else |
} else |
| VERB(1) printf("+Written chunk #%d\n", i); |
VERB(1) printf("+Written chunk #%d\n", i); |
|
Line 160 FillStore(int img, int iflg, int fd, int fflg)
|
Line 160 FillStore(int img, int iflg, int fd, int fflg)
|
| } else if (!rlen) |
} else if (!rlen) |
| break; |
break; |
| else |
else |
| VERB(1) printf("+Readed %d bytes for chunk #%d\n", rlen, j); | VERB(1) printf("+Readed %zd bytes for chunk #%d\n", rlen, j); |
| } |
} |
| |
|
| wlen = write(img, buf, bufSize); |
wlen = write(img, buf, bufSize); |
|
Line 168 FillStore(int img, int iflg, int fd, int fflg)
|
Line 168 FillStore(int img, int iflg, int fd, int fflg)
|
| ESYSERR(0); |
ESYSERR(0); |
| return -1; |
return -1; |
| } else if (wlen && wlen != bufSize) { |
} else if (wlen && wlen != bufSize) { |
| EERROR(EIO, "Error at chunk %d written %d bytes, " | EERROR(EIO, "Error at chunk %d written %zd bytes, " |
| "should be %u\n", i, wlen, bufSize); |
"should be %u\n", i, wlen, bufSize); |
| } else |
} else |
| VERB(1) printf("+Written %d bytes at chunk #%d\n", wlen, i); | VERB(1) printf("+Written %zd bytes at chunk #%d\n", wlen, i); |
| } |
} |
| |
|
| return 0; |
return 0; |
|
Line 236 main(int argc, char **argv)
|
Line 236 main(int argc, char **argv)
|
| close(fd); |
close(fd); |
| EERROR(ENOSPC, "Error:: file size %llu is " |
EERROR(ENOSPC, "Error:: file size %llu is " |
| "greater from storage size %llu\n", |
"greater from storage size %llu\n", |
| iSize, imgSize); | (unsigned long long) iSize, |
| | (unsigned long long) imgSize); |
| return 2; |
return 2; |
| } else |
} else |
| lseek(fd, 0, SEEK_SET); |
lseek(fd, 0, SEEK_SET); |
|
Line 269 main(int argc, char **argv)
|
Line 270 main(int argc, char **argv)
|
| } |
} |
| |
|
| VERB(1) printf("imgSize=%llu imgName=%s imgFile=%s\n", |
VERB(1) printf("imgSize=%llu imgName=%s imgFile=%s\n", |
| imgSize, imgName, argc ? imgFile : "<stdin>"); | (unsigned long long) imgSize, imgName, argc ? imgFile : "<stdin>"); |
| |
|
| if (!m) { |
if (!m) { |
| /* open storage device */ |
/* open storage device */ |
|
Line 302 main(int argc, char **argv)
|
Line 303 main(int argc, char **argv)
|
| close(img); |
close(img); |
| EERROR(ENOSPC, "Error:: storage size %llu is " |
EERROR(ENOSPC, "Error:: storage size %llu is " |
| "greater from file size %llu\n", |
"greater from file size %llu\n", |
| iSize, imgSize); | (unsigned long long) iSize, |
| | (unsigned long long) imgSize); |
| return 3; |
return 3; |
| } else |
} else |
| lseek(img, 0, SEEK_SET); |
lseek(img, 0, SEEK_SET); |