git.droids-corp.org
/
libcmdline.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
eca0807
)
genconf: in choice node, when value is "", it means no value
author
Olivier Matz
<zer0@droids-corp.org>
Fri, 24 Dec 2010 12:14:56 +0000
(13:14 +0100)
committer
Olivier Matz
<zer0@droids-corp.org>
Sun, 2 Jan 2011 20:53:15 +0000
(21:53 +0100)
Signed-off-by: Olivier Matz <zer0@droids-corp.org>
src/genconf/confnode_choice.c
patch
|
blob
|
history
diff --git
a/src/genconf/confnode_choice.c
b/src/genconf/confnode_choice.c
index
20e1efb
..
cb36658
100644
(file)
--- a/
src/genconf/confnode_choice.c
+++ b/
src/genconf/confnode_choice.c
@@
-150,6
+150,8
@@
static int confnode_choice_set_user_strvalue(struct confnode *n,
static int confnode_choice_get_user_strvalue(const struct confnode *n, char *buf,
unsigned buflen)
{
+ if (strcmp("", n->value) == 0)
+ return -1;
snprintf(buf, buflen, n->value);
return 0;
}