mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-08-06 05:17:59 +00:00
lxc_info: Fix -H with -c
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com> Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
This commit is contained in:
parent
58ab99ae4b
commit
44fa8e7e91
@ -338,11 +338,17 @@ static int print_info(const char *name, const char *lxcpath)
|
||||
if (c->get_config_item(c, key[i], val, len + 1) != len) {
|
||||
fprintf(stderr, "unable to read %s from configuration\n", key[i]);
|
||||
} else {
|
||||
printf("%s = %s\n", key[i], val);
|
||||
if (!humanize && keys == 1)
|
||||
printf("%s\n", val);
|
||||
else
|
||||
printf("%s = %s\n", key[i], val);
|
||||
}
|
||||
free(val);
|
||||
} else if (len == 0) {
|
||||
printf("%s =\n", key[i]);
|
||||
if (!humanize && keys == 1)
|
||||
printf("\n");
|
||||
else
|
||||
printf("%s =\n", key[i]);
|
||||
} else {
|
||||
fprintf(stderr, "%s invalid\n", key[i]);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user