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
6b5f0e45
Commit
6b5f0e45
authored
May 05, 2015
by
Mike Hibler
Browse files
Add option to force generation of relocations.
parent
628478f9
Changes
3
Hide whitespace changes
Inline
Side-by-side
clientside/os/imagezip/extfs/extfs.c
View file @
6b5f0e45
/*
* 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
*
...
...
@@ -66,7 +66,7 @@ read_linuxslice(int slice, iz_type stype, iz_lba start, iz_size size,
* Check for a LILO boot block and create relocations as necessary
* (if the partition starts at 0, the values are already relative)
*/
if
(
dorelocs
&&
start
>
0
&&
if
(
dorelocs
&&
(
start
>
0
||
forcerelocs
)
&&
fixup_lilo
(
slice
,
stype
,
start
,
size
,
sname
,
infd
,
&
rval
)
!=
0
)
return
1
;
...
...
clientside/os/imagezip/ffs/ffs.c
View file @
6b5f0e45
/*
* 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
*
...
...
@@ -254,8 +254,8 @@ _read_bsdslice(int slice, iz_type bsdtype, iz_lba start, iz_size size,
* Note that event if partitions were relative (absoffset == 0) we
* have converted the value in dlabel to absolute by this point.
*/
if
(
dorelocs
&&
start
!=
0
&&
dlabel
.
label
.
d_partitions
[
0
].
p_offset
==
start
)
{
if
(
dorelocs
&&
(
start
>
0
||
forcerelocs
)
&&
dlabel
.
label
.
d_partitions
[
0
].
p_offset
==
start
)
{
for
(
i
=
0
;
i
<
npart
;
i
++
)
{
if
(
dlabel
.
label
.
d_partitions
[
i
].
p_size
==
0
)
continue
;
...
...
clientside/os/imagezip/global.h
View file @
6b5f0e45
...
...
@@ -30,6 +30,7 @@ extern int slicemode;
extern
int
dorelocs
;
extern
int
metaoptimize
;
extern
int
excludenonfs
;
extern
int
forcerelocs
;
extern
off_t
devlseek
(
int
fd
,
off_t
off
,
int
whence
);
extern
ssize_t
devread
(
int
fd
,
void
*
buf
,
size_t
nbytes
);
...
...
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