projects
/
project
/
fstools.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a1f48fc
)
set LD_LIBRARY_PATH when invoking block extroot from temporary overlay
author
Jo-Philipp Wich
<
[email protected]
>
Thu, 17 Apr 2014 17:56:31 +0000
(19:56 +0200)
committer
Jo-Philipp Wich
<
[email protected]
>
Thu, 17 Apr 2014 17:56:31 +0000
(19:56 +0200)
Signed-off-by: Jo-Philipp Wich <
[email protected]
>
libfstools/extroot.c
patch
|
blob
|
history
diff --git
a/libfstools/extroot.c
b/libfstools/extroot.c
index a8c10288370495e3084c229b990e809e663134a9..9a05c494ad4a05cfd583f0274c0a84a82b5f1dc5 100644
(file)
--- a/
libfstools/extroot.c
+++ b/
libfstools/extroot.c
@@
-26,6
+26,7
@@
char const *extroot_prefix = NULL;
int mount_extroot(void)
{
+ char ldlib_path[32];
char block_path[32];
char kmod_loader[64];
struct stat s;
@@
-34,6
+35,7
@@
int mount_extroot(void)
if (!extroot_prefix)
return -1;
+ sprintf(ldlib_path, "%s/lib", extroot_prefix);
sprintf(block_path, "%s/sbin/block", extroot_prefix);
if (stat(block_path, &s))
@@
-45,6
+47,7
@@
int mount_extroot(void)
pid = fork();
if (!pid) {
mkdir("/tmp/extroot", 0755);
+ setenv("LD_LIBRARY_PATH", ldlib_path, 1);
execl(block_path, block_path, "extroot", NULL);
exit(-1);
} else if (pid > 0) {