mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-08-06 05:17:59 +00:00
cleanup config.h
Rename lxc_config.h to confile.h Signed-off-by: Daniel Lezcano <daniel.lezcano@free.fr>
This commit is contained in:
parent
35d2c3e71d
commit
a871ff6bdf
@ -85,7 +85,7 @@ lxc_unshare_LDADD = liblxc.la
|
||||
lxc_init_SOURCES = lxc_init.c
|
||||
lxc_init_LDADD = liblxc.la
|
||||
|
||||
lxc_create_SOURCES = lxc_create.c lxc_config.c lxc_config.h
|
||||
lxc_create_SOURCES = lxc_create.c confile.c confile.h
|
||||
lxc_create_LDADD = liblxc.la
|
||||
|
||||
lxc_destroy_SOURCES = lxc_destroy.c
|
||||
@ -97,7 +97,7 @@ lxc_start_LDADD = liblxc.la
|
||||
lxc_stop_SOURCES = lxc_stop.c
|
||||
lxc_stop_LDADD = liblxc.la
|
||||
|
||||
lxc_execute_SOURCES = lxc_execute.c lxc_config.c lxc_config.h
|
||||
lxc_execute_SOURCES = lxc_execute.c confile.c confile.h
|
||||
lxc_execute_LDADD = liblxc.la
|
||||
|
||||
lxc_monitor_SOURCES = lxc_monitor.c
|
||||
|
@ -83,7 +83,7 @@ static struct config *getconfig(const char *key)
|
||||
int i;
|
||||
|
||||
for (i = 0; i < config_size; i++)
|
||||
if (!strncmp(config[i].name, key,
|
||||
if (!strncmp(config[i].name, key,
|
||||
strlen(config[i].name)))
|
||||
return &config[i];
|
||||
return NULL;
|
||||
@ -102,7 +102,7 @@ static int config_network_type(const char *key, char *value, struct lxc_conf *lx
|
||||
lxc_log_syserror("failed to allocate memory");
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
lxc_list_init(&network->netdev);
|
||||
|
||||
netdev = malloc(sizeof(*netdev));
|
||||
@ -136,7 +136,7 @@ static int config_network_type(const char *key, char *value, struct lxc_conf *lx
|
||||
list->elem = network;
|
||||
|
||||
lxc_list_add(networks, list);
|
||||
|
||||
|
||||
if (!strcmp(value, "veth"))
|
||||
network->type = VETH;
|
||||
else if (!strcmp(value, "macvlan"))
|
||||
@ -442,7 +442,7 @@ static int config_cgroup(const char *key, char *value, struct lxc_conf *lxc_conf
|
||||
|
||||
if (strlen(subkey) == strlen(token))
|
||||
return -1;
|
||||
|
||||
|
||||
subkey += strlen(token);
|
||||
|
||||
cglist = malloc(sizeof(*cglist));
|
||||
@ -507,7 +507,7 @@ static int config_utsname(const char *key, char *value, struct lxc_conf *lxc_con
|
||||
}
|
||||
|
||||
if (strlen(value) >= sizeof(utsname->nodename)) {
|
||||
lxc_log_error("node name '%s' is too long",
|
||||
lxc_log_error("node name '%s' is too long",
|
||||
utsname->nodename);
|
||||
return -1;
|
||||
}
|
||||
@ -538,7 +538,7 @@ static int parse_line(void *buffer, void *data)
|
||||
lxc_log_error("invalid configuration line: %s", line);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
*dot = '\0';
|
||||
value = dot + 1;
|
||||
|
@ -32,7 +32,7 @@
|
||||
#include <net/if.h>
|
||||
|
||||
#include <lxc/lxc.h>
|
||||
#include <lxc/lxc_config.h>
|
||||
#include "confile.h"
|
||||
|
||||
void usage(char *cmd)
|
||||
{
|
||||
|
@ -31,7 +31,7 @@
|
||||
#include <sys/param.h>
|
||||
|
||||
#include <lxc/lxc.h>
|
||||
#include <lxc/lxc_config.h>
|
||||
#include "confile.h"
|
||||
|
||||
void usage(char *cmd)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user