Unverified Commit 2238c216 by Christian Brauner Committed by Stéphane Graber

network: mv config_value_empty() to confile_utils

and rename it to lxc_config_value_empty() Signed-off-by: 's avatarChristian Brauner <christian.brauner@ubuntu.com>
parent 0d75d4a4
...@@ -20,6 +20,8 @@ ...@@ -20,6 +20,8 @@
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
#include "conf.h"
#include "log.h"
#include "utils.h" #include "utils.h"
int parse_idmaps(const char *idmap, char *type, unsigned long *nsid, int parse_idmaps(const char *idmap, char *type, unsigned long *nsid,
...@@ -146,3 +148,11 @@ on_error: ...@@ -146,3 +148,11 @@ on_error:
return ret; return ret;
} }
bool lxc_config_value_empty(const char *value)
{
if (value && strlen(value) > 0)
return false;
return true;
}
...@@ -20,7 +20,11 @@ ...@@ -20,7 +20,11 @@
#ifndef __LXC_CONFILE_UTILS_H #ifndef __LXC_CONFILE_UTILS_H
#define __LXC_CONFILE_UTILS_H #define __LXC_CONFILE_UTILS_H
#include <stdbool.h>
extern int parse_idmaps(const char *idmap, char *type, unsigned long *nsid, extern int parse_idmaps(const char *idmap, char *type, unsigned long *nsid,
unsigned long *hostid, unsigned long *range); unsigned long *hostid, unsigned long *range);
extern bool lxc_config_value_empty(const char *value);
#endif /* __LXC_CONFILE_UTILS_H */ #endif /* __LXC_CONFILE_UTILS_H */
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