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*:
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
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.
......@@ -20,3 +22,6 @@ Things to do for image*:
5. Imageunzip could be triple-threaded like frisbee, i.e., split the
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)
struct range *skip;
if (size < frangesize)
if (size == 0 || size < frangesize)
if ((skip = (struct range *) malloc(sizeof(*skip))) == NULL) {
......@@ -888,15 +888,15 @@ dumpranges(int verbose)
struct range *range;
uint32_t total = 0;
if (verbose) {
if (verbose)
fprintf(stderr, "\nAllocated ranges (start/size) in sectors:\n");
range = ranges;
while (range) {
range = ranges;
while (range) {
if (verbose)
fprintf(stderr, " %12d %9d\n",
range->start, range->size);
total += range->size;
range = range->next;
total += range->size;
range = range->next;
"Total Number of Valid Sectors: %d (bytes %qd)\n",
Supports Markdown
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