mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-08-17 01:45:09 +00:00
Merge pull request #1015 from stewartbrodie/confile-value-quotes
Allow configuration file values to be quoted
This commit is contained in:
commit
9504f141c2
@ -1964,6 +1964,14 @@ static int parse_line(char *buffer, void *data)
|
|||||||
value += lxc_char_left_gc(value, strlen(value));
|
value += lxc_char_left_gc(value, strlen(value));
|
||||||
value[lxc_char_right_gc(value, strlen(value))] = '\0';
|
value[lxc_char_right_gc(value, strlen(value))] = '\0';
|
||||||
|
|
||||||
|
if (*value == '\'' || *value == '\"') {
|
||||||
|
size_t len = strlen(value);
|
||||||
|
if (len > 1 && value[len-1] == *value) {
|
||||||
|
value[len-1] = '\0';
|
||||||
|
value++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
config = lxc_getconfig(key);
|
config = lxc_getconfig(key);
|
||||||
if (!config) {
|
if (!config) {
|
||||||
ERROR("unknown key %s", key);
|
ERROR("unknown key %s", key);
|
||||||
|
Loading…
Reference in New Issue
Block a user