summaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
authorMike Fulbright <msf@redhat.com>2002-05-13 21:15:05 +0000
committerMike Fulbright <msf@redhat.com>2002-05-13 21:15:05 +0000
commit5f34727ebf9dac1d11ee47e047ca6055ff2c28a9 (patch)
tree5d9c195f94ae84f54e1f30b23b557d6d8662a379 /utils
parent5de571800e8b4cead04c43a127ca9e6517df2bf2 (diff)
downloadanaconda-5f34727ebf9dac1d11ee47e047ca6055ff2c28a9.tar.gz
anaconda-5f34727ebf9dac1d11ee47e047ca6055ff2c28a9.tar.xz
anaconda-5f34727ebf9dac1d11ee47e047ca6055ff2c28a9.zip
fixes for bug #64805
Diffstat (limited to 'utils')
-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)
}