1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-03 05:18:29 +03:00
lvm2/daemons/lvmetad/testclient.c
Petr Rockai 94bb67ab37 Add int/str lookup routines specific to the reply (in client) and request (in
server) for nicer-looking code (thin wrapping around find_config_{int,str}).
2011-06-27 14:03:58 +00:00

15 lines
436 B
C

#include "lvmetad-client.h"
int main() {
daemon_handle h = lvmetad_open();
int i;
for (i = 0; i < 5; ++i ) {
daemon_reply reply = daemon_send_simple(h, "hello world", "param = %d", 3, NULL);
fprintf(stderr, "[C] REPLY: %s, param = %d\n", daemon_reply_str(reply, "request", "NONE"),
daemon_reply_int(reply, "param", -1));
daemon_reply_destroy(reply);
}
daemon_close(h);
return 0;
}