Commit 5f30c249 authored by Pavel Emelyanov's avatar Pavel Emelyanov

mount: Do not set key to anything for auto-ext-mounts

Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
parent 5af9e2b1
...@@ -84,13 +84,17 @@ static struct ext_mount *ext_mount_lookup(char *key) ...@@ -84,13 +84,17 @@ static struct ext_mount *ext_mount_lookup(char *key)
return NULL; return NULL;
} }
static struct ext_mount *ext_mount_make_auto(char *key, char *val) static struct ext_mount *ext_mount_make_auto(char *val)
{ {
struct ext_mount *em; struct ext_mount *em;
em = xmalloc(sizeof(*em)); em = xmalloc(sizeof(*em));
if (em) { if (em) {
em->key = key; /*
* The key is (should) only be used for lookup by
* ext_mount_lookup() above.
*/
em->key = (char *)0x00BEDA00;
em->val = val; em->val = val;
} }
...@@ -878,7 +882,7 @@ static int resolve_external_mounts(struct mount_info *info) ...@@ -878,7 +882,7 @@ static int resolve_external_mounts(struct mount_info *info)
if (!p) if (!p)
return -1; return -1;
m->external = ext_mount_make_auto(p, AUTODETECTED_MOUNT); m->external = ext_mount_make_auto(AUTODETECTED_MOUNT);
if (!m->external) { if (!m->external) {
free(p); free(p);
return -1; return -1;
...@@ -3107,7 +3111,7 @@ static int get_mp_root(MntEntry *me, struct mount_info *mi) ...@@ -3107,7 +3111,7 @@ static int get_mp_root(MntEntry *me, struct mount_info *mi)
* dump by resolve_external_mounts(). * dump by resolve_external_mounts().
*/ */
em = ext_mount_make_auto(AUTODETECTED_MOUNT, mi->source); em = ext_mount_make_auto(mi->source);
if (!em) if (!em)
return -1; return -1;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment