Commit 422ab906 authored by Mike Hibler's avatar Mike Hibler
Browse files

Minor stuff I forgot to checking

parent 6f5e8841
...@@ -10,7 +10,9 @@ Things to do for image*: ...@@ -10,7 +10,9 @@ Things to do for image*:
2. Imagezip could be multithread so that we can be reading ahead on the 2. Imagezip could be multithread so that we can be reading ahead on the
input device and overlapping IO with compression. Maybe a third thread input device and overlapping IO with compression. Maybe a third thread
for doing output. for doing output. Input is a little tricky since imagezip shortens up
its reads as it gets near the end of a chunk, so the buffer mechanism
will have to handle having blocks only partially consumed.
3. In imagezip, split out the FS-specific code into subdirectories. 3. In imagezip, split out the FS-specific code into subdirectories.
[DONE] [DONE]
...@@ -20,3 +22,6 @@ Things to do for image*: ...@@ -20,3 +22,6 @@ Things to do for image*:
5. Imageunzip could be triple-threaded like frisbee, i.e., split the 5. Imageunzip could be triple-threaded like frisbee, i.e., split the
file reading and decompression that are currently one in imageunzip. file reading and decompression that are currently one in imageunzip.
6. Create a "signature" file for an image using a collision-resistant hash
like MD5 or SHA-1. See TODO.hash for more.
...@@ -708,7 +708,7 @@ addskip(uint32_t start, uint32_t size) ...@@ -708,7 +708,7 @@ addskip(uint32_t start, uint32_t size)
{ {
struct range *skip; struct range *skip;
if (size < frangesize) if (size == 0 || size < frangesize)
return; return;
if ((skip = (struct range *) malloc(sizeof(*skip))) == NULL) { if ((skip = (struct range *) malloc(sizeof(*skip))) == NULL) {
...@@ -888,15 +888,15 @@ dumpranges(int verbose) ...@@ -888,15 +888,15 @@ dumpranges(int verbose)
struct range *range; struct range *range;
uint32_t total = 0; uint32_t total = 0;
if (verbose) { if (verbose)
fprintf(stderr, "\nAllocated ranges (start/size) in sectors:\n"); fprintf(stderr, "\nAllocated ranges (start/size) in sectors:\n");
range = ranges; range = ranges;
while (range) { while (range) {
if (verbose)
fprintf(stderr, " %12d %9d\n", fprintf(stderr, " %12d %9d\n",
range->start, range->size); range->start, range->size);
total += range->size; total += range->size;
range = range->next; range = range->next;
}
} }
fprintf(stderr, fprintf(stderr,
"Total Number of Valid Sectors: %d (bytes %qd)\n", "Total Number of Valid Sectors: %d (bytes %qd)\n",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment