mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-07-15 10:10:54 +00:00
Remove dead code
Remove dead code. Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
This commit is contained in:
parent
bf601689a9
commit
932b94f5de
@ -963,29 +963,6 @@ static int setup_network(struct lxc_list *network)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int conf_has(const char *name, const char *info)
|
|
||||||
{
|
|
||||||
int ret = 0;
|
|
||||||
char path[MAXPATHLEN];
|
|
||||||
struct stat st;
|
|
||||||
|
|
||||||
snprintf(path, MAXPATHLEN, LXCPATH "/%s/%s", name, info);
|
|
||||||
|
|
||||||
if (!stat(path, &st) || !lstat(path, &st)) {
|
|
||||||
ret = 1;
|
|
||||||
goto out;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (errno == ENOENT) {
|
|
||||||
ret = 0;
|
|
||||||
goto out;
|
|
||||||
}
|
|
||||||
|
|
||||||
SYSERROR("failed to stat %s info", info);
|
|
||||||
out:
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
struct lxc_conf *lxc_conf_init(void)
|
struct lxc_conf *lxc_conf_init(void)
|
||||||
{
|
{
|
||||||
struct lxc_conf *new;
|
struct lxc_conf *new;
|
||||||
|
@ -188,15 +188,4 @@ struct lxc_handler;
|
|||||||
|
|
||||||
extern int lxc_setup(const char *name, struct lxc_conf *lxc_conf);
|
extern int lxc_setup(const char *name, struct lxc_conf *lxc_conf);
|
||||||
|
|
||||||
extern int conf_has(const char *name, const char *info);
|
|
||||||
|
|
||||||
#define conf_has_fstab(__name) conf_has(__name, "fstab")
|
|
||||||
#define conf_has_rootfs(__name) conf_has(__name, "rootfs")
|
|
||||||
#define conf_has_pivotdir(__name) conf_has(__name, "pivotdir")
|
|
||||||
#define conf_has_utsname(__name) conf_has(__name, "utsname")
|
|
||||||
#define conf_has_network(__name) conf_has(__name, "network")
|
|
||||||
#define conf_has_console(__name) conf_has(__name, "console")
|
|
||||||
#define conf_has_cgroup(__name) conf_has(__name, "cgroup")
|
|
||||||
#define conf_has_tty(__name) conf_has(__name, "tty")
|
|
||||||
#define conf_has_pts(__name) conf_has(__name, "pts")
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user