Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-devel
Commits
f5b69486
Commit
f5b69486
authored
Dec 18, 2002
by
Mike Hibler
Browse files
another bug fix to the ignore code, wasn't tracking inputmaxsec correctly
parent
5bece580
Changes
1
Hide whitespace changes
Inline
Side-by-side
os/imagezip/imagezip.c
View file @
f5b69486
...
...
@@ -451,12 +451,8 @@ read_image()
if
(
slicemode
&&
i
!=
(
slice
-
1
)
/* DOS Numbering */
)
continue
;
if
(
ignore
[
i
])
{
fprintf
(
stderr
,
"Slice %d ignored, NOT SAVING
\n
"
,
i
+
1
);
if
(
start
!=
size
)
addskip
(
start
,
size
);
continue
;
}
if
(
ignore
[
i
])
type
=
DOSPTYP_UNUSED
;
switch
(
type
)
{
case
DOSPTYP_386BSD
:
...
...
@@ -475,8 +471,8 @@ read_image()
#endif
case
DOSPTYP_UNUSED
:
fprintf
(
stderr
,
" Slice %d
is unused
, NOT SAVING.
\n
"
,
i
+
1
/* DOS Numbering */
);
" Slice %d
%s
, NOT SAVING.
\n
"
,
i
+
1
,
i
gnore
[
i
]
?
"ignored"
:
"is unused"
);
if
(
start
!=
size
)
addskip
(
start
,
size
);
break
;
...
...
@@ -1424,6 +1420,7 @@ makeranges(void)
* Last piece, but only if there is something to compress.
*/
if
(
inputmaxsec
==
0
||
(
inputmaxsec
-
offset
)
!=
0
)
{
assert
(
inputmaxsec
==
0
||
inputmaxsec
>
offset
);
if
((
range
=
(
struct
range
*
)
malloc
(
sizeof
(
*
range
)))
==
NULL
)
{
fprintf
(
stderr
,
"Out of memory!
\n
"
);
exit
(
1
);
...
...
@@ -2050,7 +2047,8 @@ compress_chunk(off_t off, off_t size, int *full, uint32_t *subblksize)
}
if
(
cc
!=
count
&&
!
eof
)
{
fprintf
(
stderr
,
"Bad count in read!
\n
"
);
fprintf
(
stderr
,
"Bad count in read, %d != %d at %qu
\n
"
,
cc
,
count
,
off
+
total
);
exit
(
1
);
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment