diff options
author | Peter Jones <pjones@redhat.com> | 2005-04-28 04:40:08 +0000 |
---|---|---|
committer | Peter Jones <pjones@redhat.com> | 2005-04-28 04:40:08 +0000 |
commit | d3e6804d85c09570934782587896a283ca9be53f (patch) | |
tree | f5fecaf84c7a0dd178adb5dcc470afa2c7fed227 | |
parent | e0e3acb544e87c60c071c94b0ae7b098b3e29200 (diff) | |
download | anaconda-d3e6804d85c09570934782587896a283ca9be53f.tar.gz anaconda-d3e6804d85c09570934782587896a283ca9be53f.tar.xz anaconda-d3e6804d85c09570934782587896a283ca9be53f.zip |
fix mediacheck calls from installer.
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | anaconda.spec | 6 | ||||
-rw-r--r-- | loader2/cdinstall.c | 7 | ||||
-rw-r--r-- | loader2/mediacheck.c | 9 | ||||
-rw-r--r-- | loader2/mediacheck.h | 5 |
5 files changed, 25 insertions, 9 deletions
@@ -1,3 +1,10 @@ +2005-04-28 Peter Jones <pjones@redhat.com>: + + * mediacheck.h: add FRAGMENT_SUM_LENGTH here, fix parsepvd prototype. + * mediacheck.c: remove FRAGMENT_SUM_LENGTH, include mediacheck.h, + fix some declarations + * cdinstall.c: fix parsepvd call for new prototype. + 2005-04-27 Jeremy Katz <katzj@redhat.com> * anaconda.spec: Bump version. diff --git a/anaconda.spec b/anaconda.spec index fe7b0a9fd..89e25f156 100644 --- a/anaconda.spec +++ b/anaconda.spec @@ -1,5 +1,5 @@ Name: anaconda -Version: 10.2.0.55 +Version: 10.2.0.56 Release: 1 License: GPL Summary: Graphical system installer @@ -69,6 +69,10 @@ rm -rf $RPM_BUILD_ROOT /sbin/chkconfig --del reconfig >/dev/null 2>&1 || : %changelog +* Wed Apr 28 2005 Peter Jones <pjones@redhat.com> - 10.2.0.56-1 +- Fix mediacheck calls from cdinstall.c, and make mediacheck.c include + its own header so typechecking works. + * Wed Apr 27 2005 Jeremy Katz <katzj@redhat.com> - 10.2.0.55-1 - Don't spam about package downloads in cmdline mode (#155250) - Apply jnovy's patch to fix space calculations for > 2 TB devices (#155709) diff --git a/loader2/cdinstall.c b/loader2/cdinstall.c index 3b5b59468..ce50c070c 100644 --- a/loader2/cdinstall.c +++ b/loader2/cdinstall.c @@ -199,13 +199,16 @@ static int getISOStatusFromCDROM(char *cddriver, char *mediasum) { /* if returns 1 we found status, and mediasum will be checksum */ static int getISOStatusFromFD(int isofd, char *mediasum) { char tmpsum[33]; + char fragmentsums[FRAGMENT_SUM_LENGTH+1]; int skipsectors, isostatus; - long long isosize, pvd_offset; + long long isosize, pvd_offset, fragmentcount = 0; if (mediasum) mediasum[0] = '\0'; - if ((pvd_offset = parsepvd(isofd, tmpsum, &skipsectors, &isosize, &isostatus)) < 0) { + fragmentsums[0] = '\0'; + + if ((pvd_offset = parsepvd(isofd, tmpsum, &skipsectors, &isosize, &isostatus, fragmentsums, &fragmentcount)) < 0) { logMessage("Could not parse pvd"); return 0; } diff --git a/loader2/mediacheck.c b/loader2/mediacheck.c index 256f1c3ac..65daaccd3 100644 --- a/loader2/mediacheck.c +++ b/loader2/mediacheck.c @@ -19,12 +19,11 @@ #include "log.h" +#include "mediacheck.h" + #define APPDATA_OFFSET 883 #define SIZE_OFFSET 84 -/* Length in characters of string used for fragment md5sum checking */ -#define FRAGMENT_SUM_LENGTH 60 - #define MAX(x, y) ((x > y) ? x : y) #define MIN(x, y) ((x < y) ? x : y) @@ -199,8 +198,8 @@ static int checkmd5sum(int isofd, char *mediasum, char *computedsum, unsigned int len; unsigned char *buf; long long isosize, offset, pvd_offset, apoff; - char fragmentsums[FRAGMENT_SUM_LENGTH]; - char thisfragsum[FRAGMENT_SUM_LENGTH]; + char fragmentsums[FRAGMENT_SUM_LENGTH+1]; + char thisfragsum[FRAGMENT_SUM_LENGTH+1]; long long fragmentcount = 0; MD5_CTX md5ctx, fragmd5ctx; diff --git a/loader2/mediacheck.h b/loader2/mediacheck.h index 26f7bfbf9..dcf9542cb 100644 --- a/loader2/mediacheck.h +++ b/loader2/mediacheck.h @@ -5,7 +5,10 @@ /* Copyright 2001 Red Hat, Inc. */ /* Michael Fulbright msf@redhat.com */ +/* Length in characters of string used for fragment md5sum checking */ +#define FRAGMENT_SUM_LENGTH 60 + int mediaCheckFile(char *file, char *descr); -int parsepvd(int isofd, char *mediasum, int *skipsectors, long long *isosize, int *isostatus); +int parsepvd(int isofd, char *mediasum, int *skipsectors, long long *isosize, int *supported, char *fragmentsums, long long *fragmentcount); #endif |