Fix remaining issues with handling the format number

Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
This commit is contained in:
Patrick McCarty
2016-04-04 18:48:42 -07:00
parent 2a9af990d6
commit e0049de3dc
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -112,7 +112,7 @@ struct manifest *manifest_from_file(int version, char *component)
struct manifest *manifest;
char *filename, *conf;
int previous = 0;
int format_number;
unsigned long long int format_number;
conf = config_output_dir();
if (conf == NULL) {
@@ -145,7 +145,7 @@ struct manifest *manifest_from_file(int version, char *component)
}
c = &line[9];
format_number = strtoull(c, NULL, 10);
if ((errno < 0) || (format_number <= 0)) {
if ((errno < 0) || (format_number == 0)) {
//format string shall be a positive integer
printf("Unknown file format version in MANIFEST line: %s\n", c);
fclose(infile);
+1 -1
View File
@@ -139,7 +139,7 @@ void write_cookiecrumbs_to_download_area(int version)
}
free(cmd);
string_or_die(&cmd, "echo %d > %s/%i/format", format, conf, version);
string_or_die(&cmd, "echo %llu > %s/%i/format", format, conf, version);
if (system(cmd) != 0) {
assert(0);
}