From: "M. Mohan Kumar" <mohan@in.ibm.com>
To: qemu-devel@nongnu.org,
"Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
Cc: "M. Mohan Kumar" <mohan@in.ibm.com>
Subject: [Qemu-devel] [PATCH] fsdev: parameter parsing for proxy helper
Date: Thu, 19 Jan 2012 16:15:56 +0530 [thread overview]
Message-ID: <1326969956-11573-1-git-send-email-mohan@in.ibm.com> (raw)
From: "M. Mohan Kumar" <mohan@in.ibm.com>
Signed-off-by: M. Mohan Kumar <mohan@in.ibm.com>
---
fsdev/virtfs-proxy-helper.c | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/fsdev/virtfs-proxy-helper.c b/fsdev/virtfs-proxy-helper.c
index baafee2..5aafc38 100644
--- a/fsdev/virtfs-proxy-helper.c
+++ b/fsdev/virtfs-proxy-helper.c
@@ -1040,7 +1040,13 @@ int main(int argc, char **argv)
return -1;
}
- if (*sock_name && (own_u == -1 || own_g == -1)) {
+ if (sock_name && sock != -1) {
+ fprintf(stderr, "both named socket and socket descriptor specified\n");
+ usage(argv[0]);
+ exit(EXIT_FAILURE);
+ }
+
+ if (sock_name && (own_u == -1 || own_g == -1)) {
fprintf(stderr, "owner uid:gid not specified, ");
fprintf(stderr,
"owner uid:gid specifies who can access the socket file\n");
@@ -1068,7 +1074,7 @@ int main(int argc, char **argv)
}
do_log(LOG_INFO, "Started\n");
- if (*sock_name) {
+ if (sock_name) {
sock = proxy_socket(sock_name, own_u, own_g);
if (sock < 0) {
goto error;
--
1.7.6
reply other threads:[~2012-01-19 10:46 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1326969956-11573-1-git-send-email-mohan@in.ibm.com \
--to=mohan@in.ibm.com \
--cc=aneesh.kumar@linux.vnet.ibm.com \
--cc=qemu-devel@nongnu.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: link
Be 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 NNTP newsgroup(s).