this code is present since first ujail commit (
dfcfcca7)
Signed-off-by: Etienne CHAMPETIER <champetier.etienne@gmail.com>
{
struct library *l;
static char path[PATH_MAX];
{
struct library *l;
static char path[PATH_MAX];
l = avl_find_element(&libraries, file, l, avl);
if (!l)
return NULL;
l = avl_find_element(&libraries, file, l, avl);
if (!l)
return NULL;
- p = l->path;
- if (strstr(p, "local"))
- p = "/lib";
-
- snprintf(path, sizeof(path), "%s/%s", p, file);
+ snprintf(path, sizeof(path), "%s/%s", l->path, file);
static int mount_bind(const char *root, const char *path, const char *name, int readonly, int error)
{
static int mount_bind(const char *root, const char *path, const char *name, int readonly, int error)
{
struct stat s;
char old[PATH_MAX];
char new[PATH_MAX];
int fd;
struct stat s;
char old[PATH_MAX];
char new[PATH_MAX];
int fd;
- if (strstr(p, "local"))
- p = "/lib";
-
snprintf(old, sizeof(old), "%s/%s", path, name);
snprintf(old, sizeof(old), "%s/%s", path, name);
- snprintf(new, sizeof(new), "%s%s", root, p);
+ snprintf(new, sizeof(new), "%s%s", root, path);
- snprintf(new, sizeof(new), "%s%s/%s", root, p, name);
+ snprintf(new, sizeof(new), "%s%s/%s", root, path, name);
if (stat(old, &s)) {
ERROR("%s does not exist\n", old);
if (stat(old, &s)) {
ERROR("%s does not exist\n", old);