git.samba.org
/
sahlberg
/
ctdb.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e550c7b
)
Add -Y machinereadable output to ctdb listvars and ctdb getvar
author
Ronnie Sahlberg
<ronniesahlberg@gmail.com>
Tue, 2 Jun 2009 07:56:20 +0000
(17:56 +1000)
committer
Ronnie Sahlberg
<ronniesahlberg@gmail.com>
Tue, 2 Jun 2009 07:56:20 +0000
(17:56 +1000)
tools/ctdb.c
patch
|
blob
|
history
diff --git
a/tools/ctdb.c
b/tools/ctdb.c
index b85354c001930dca9d29fe7ff07b7d24186e466c..43a577e5ae1ba163cb40f2e6046b009237cbdece 100644
(file)
--- a/
tools/ctdb.c
+++ b/
tools/ctdb.c
@@
-2080,7
+2080,11
@@
static int control_getvar(struct ctdb_context *ctdb, int argc, const char **argv
return -1;
}
- printf("%-19s = %u\n", name, value);
+ if (options.machinereadable){
+ printf(":%s:%u:\n", name, value);
+ } else {
+ printf("%-19s = %u\n", name, value);
+ }
return 0;
}