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
fe9aa364
Commit
fe9aa364
authored
May 11, 2015
by
Mike Hibler
Browse files
Nits uncovered by the test framework.
parent
7c0a0617
Changes
2
Show whitespace changes
Inline
Side-by-side
clientside/os/imagezip/imagedump.c
View file @
fe9aa364
/*
* Copyright (c) 2000-201
4
University of Utah and the Flux Group.
* Copyright (c) 2000-201
5
University of Utah and the Flux Group.
*
* {{{EMULAB-LICENSE
*
...
...
@@ -141,6 +141,7 @@ main(int argc, char **argv)
if
(
!
isstdin
)
{
if
((
infd
=
open
(
argv
[
0
],
O_RDONLY
,
0666
))
<
0
)
{
perror
(
argv
[
0
]);
errors
++
;
continue
;
}
}
else
...
...
@@ -155,13 +156,14 @@ main(int argc, char **argv)
fprintf
(
stderr
,
"%s: Cannot validate checksum signing key
\n
"
,
argv
[
0
]);
errors
++
;
continue
;
}
}
#endif
#endif
errors
=
dumpfile
(
isstdin
?
"<stdin>"
:
argv
[
0
],
infd
);
errors
+
=
dumpfile
(
isstdin
?
"<stdin>"
:
argv
[
0
],
infd
);
#ifdef WITH_CRYPTO
#ifdef SIGN_CHECKSUM
...
...
@@ -192,7 +194,7 @@ usage(void)
static
char
chunkbuf
[
CHUNKSIZE
];
static
unsigned
int
magic
;
static
unsigned
long
chunkcount
;
static
uint32_t
nextsector
;
static
uint32_t
nextsector
,
nextcovered
;
static
uint32_t
fmax
,
fmin
,
franges
,
amax
,
amin
,
aranges
;
static
uint32_t
adist
[
8
];
/* <4k, <8k, <16k, <32k, <64k, <128k, <256k, >=256k */
static
int
regmax
,
regmin
;
...
...
@@ -213,6 +215,7 @@ dumpfile(char *name, int fd)
isstdin
=
(
fd
==
fileno
(
stdin
));
wasted
=
sectinuse
=
sectfree
=
0
;
nextsector
=
0
;
nextcovered
=
0
;
relocs
=
0
;
relocbytes
=
0
;
hisect
=
0
;
...
...
@@ -549,6 +552,15 @@ dumpchunk(char *name, char *buf, int chunkno, int checkindex)
printf
(
" Chunk %d: %u compressed bytes, "
,
chunkno
,
hdr
->
size
);
if
(
hdr
->
magic
>
COMPRESSED_V1
)
{
if
(
hdr
->
firstsect
!=
nextcovered
)
{
printf
(
" WARNING: chunk %d %s in covered "
"range, %u/%u last-end/cur-start
\n
"
,
chunkno
,
(
hdr
->
firstsect
<
nextcovered
)
?
"overlap"
:
"gap"
,
nextcovered
,
hdr
->
firstsect
);
}
nextcovered
=
hdr
->
lastsect
;
printf
(
"sector range [%u-%u], "
,
hdr
->
firstsect
,
hdr
->
lastsect
-
1
);
if
(
hdr
->
reloccount
>
0
)
...
...
clientside/os/imagezip/imageundelta.c
View file @
fe9aa364
...
...
@@ -1093,6 +1093,13 @@ main(int argc, char **argv)
}
#endif
#if 1
/*
* Range of the new map is the same as the delta.
*/
new
.
ndz
->
maplo
=
delta
.
ndz
->
maplo
;
new
.
ndz
->
maphi
=
delta
.
ndz
->
maphi
;
#else
/*
* Compute the range of the new map. We look at the first and last
* ranges in the merged map and use the source entries of those to
...
...
@@ -1122,6 +1129,7 @@ main(int argc, char **argv)
fflush
(
stdout
);
}
}
#endif
/*
* Iterate through the produced map hashing (if necessary) and
...
...
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