Commit 14186c60 authored by Russ Fish's avatar Russ Fish
Browse files

Fix arithmetic computing waits from number of chunks. XP images greater than...

Fix arithmetic computing waits from number of chunks.  XP images greater than 2 gig in size overflow signed ints.  Shift is unsigned.
parent 7d05a5a2
......@@ -223,7 +223,7 @@ sub osload ($$) {
#
if (!exists($maxwaits{$imageid})) {
my $sb = stat($imagepath);
my $chunks = $sb->size / (1024 * 1024);
my $chunks = $sb->size >> 20; # Size may be > 2^31. Shift is unsigned.
$maxwaits{$imageid} = int((($chunks / 100.0) * 30) + (5 * 60));
}
......
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