public inbox for lvm2-cvs@sourceware.org help / color / mirror / Atom feed
From: mornfall@sourceware.org To: lvm-devel@redhat.com, lvm2-cvs@sourceware.org Subject: LVM2/daemons/common daemon-client.c daemon-ser ... Date: Wed, 29 Jun 2011 22:20:00 -0000 [thread overview] Message-ID: <20110629222017.14836.qmail@sourceware.org> (raw) CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: mornfall@sourceware.org 2011-06-29 22:20:14 Modified files: daemons/common : daemon-client.c daemon-server.c daemon-shared.c daemon-shared.h Log message: Differentiate the request and response format, in daemon/common. Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/daemons/common/daemon-client.c.diff?cvsroot=lvm2&r1=1.4&r2=1.5 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/daemons/common/daemon-server.c.diff?cvsroot=lvm2&r1=1.6&r2=1.7 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/daemons/common/daemon-shared.c.diff?cvsroot=lvm2&r1=1.2&r2=1.3 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/daemons/common/daemon-shared.h.diff?cvsroot=lvm2&r1=1.2&r2=1.3 --- LVM2/daemons/common/daemon-client.c 2011/06/27 13:58:11 1.4 +++ LVM2/daemons/common/daemon-client.c 2011/06/29 22:20:14 1.5 @@ -60,7 +60,7 @@ { va_list ap; va_start(ap, id); - daemon_request rq = { .buffer = format_buffer(id, ap) }; + daemon_request rq = { .buffer = format_buffer("request", id, ap) }; if (!rq.buffer) { daemon_reply err = { .error = ENOMEM, .buffer = NULL, .cft = NULL }; --- LVM2/daemons/common/daemon-server.c 2011/06/27 13:58:11 1.6 +++ LVM2/daemons/common/daemon-server.c 2011/06/29 22:20:14 1.7 @@ -205,7 +205,7 @@ { va_list ap; va_start(ap, id); - response res = { .buffer = format_buffer(id, ap), .cft = NULL }; + response res = { .buffer = format_buffer("response", id, ap), .cft = NULL }; if (!res.buffer) res.error = ENOMEM; --- LVM2/daemons/common/daemon-shared.c 2011/06/27 13:15:49 1.2 +++ LVM2/daemons/common/daemon-shared.c 2011/06/29 22:20:14 1.3 @@ -70,13 +70,13 @@ return 0; } -char *format_buffer(char *id, va_list ap) +char *format_buffer(const char *what, const char *id, va_list ap) { char *buffer, *old; char *next; char *format; - dm_asprintf(&buffer, "request = \"%s\"\n", id); + dm_asprintf(&buffer, "%s = \"%s\"\n", what, id); if (!buffer) goto fail; while (next = va_arg(ap, char *)) { --- LVM2/daemons/common/daemon-shared.h 2011/06/27 13:15:49 1.2 +++ LVM2/daemons/common/daemon-shared.h 2011/06/29 22:20:14 1.3 @@ -3,4 +3,4 @@ int read_buffer(int fd, char **buffer); int write_buffer(int fd, char *buffer, int length); -char *format_buffer(char *id, va_list ap); +char *format_buffer(const char *what, const char *id, va_list ap);
next reply other threads:[~2011-06-29 22:20 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2011-06-29 22:20 mornfall [this message] 2011-08-31 12:18 mornfall 2011-09-17 14:49 zkabelac
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20110629222017.14836.qmail@sourceware.org \ --to=mornfall@sourceware.org \ --cc=lvm-devel@redhat.com \ --cc=lvm2-cvs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).