summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--utils/checkisomd5.c2
-rw-r--r--utils/implantisomd5.c11
2 files changed, 10 insertions, 3 deletions
diff --git a/utils/checkisomd5.c b/utils/checkisomd5.c
index 0f427164e..28d6b8eaf 100644
--- a/utils/checkisomd5.c
+++ b/utils/checkisomd5.c
@@ -156,6 +156,7 @@ int checkmd5sum(int isofd, char *mediasum, char *computedsum) {
int main(int argc, char **argv) {
int isofd;
int rc;
+ int retval;
unsigned char mediasum[33], computedsum[33];
if (argc < 2) {
@@ -180,5 +181,6 @@ int main(int argc, char **argv) {
printf("No checksum information in iso, check skipped.\n");
close(isofd);
+ exit(0);
}
diff --git a/utils/implantisomd5.c b/utils/implantisomd5.c
index a2822495a..d81059535 100644
--- a/utils/implantisomd5.c
+++ b/utils/implantisomd5.c
@@ -133,7 +133,7 @@ int main(int argc, char **argv) {
total = 0;
/* read up to 15 sectors from end, due to problems reading last few */
/* sectors on burned CDs */
- tally_inc = 50*1000*1000;
+ tally_inc = 64*1024*1024;
tally = 0;
while (total < isosize - SKIPSECTORS*2048) {
nread = read(isofd, buf, 2048);
@@ -144,7 +144,7 @@ int main(int argc, char **argv) {
total = total + nread;
if (total >= tally) {
- printf("Read %5d MB\n", tally/1000/1000);
+ printf("Read %5d MB\n", tally/1024/1024);
tally += tally_inc;
}
}
@@ -167,16 +167,21 @@ int main(int argc, char **argv) {
memcpy(new_appdata+47, "THIS IS NOT THE SAME AS RUNNING MD5SUM ON THIS ISO!!", 51);
i = lseek(isofd, pvd_offset + APPDATA_OFFSET, SEEK_SET);
- if (i<0)
+ if (i<0) {
printf("seek failed\n");
+ perror();
+ exit(1);
+ }
i = write(isofd, new_appdata, 512);
if (i<0) {
printf("write failed %d\n", i);
perror("");
+ exit(1);
}
close(isofd);
printf("Done!\n");
+ exit(0)
}