From: Olaf Hering <olaf@aepfle.de>
To: "K. Y. Srinivasan" <kys@microsoft.com>
Cc: gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org,
devel@linuxdriverproject.org, apw@canonical.com,
jasowang@redhat.com, Evgeniy Polyakov <zbr@ioremap.net>
Subject: Re: [PATCH V2 1/1] Drivers: hv: Add a new driver to support host initiated backup
Date: Fri, 22 Mar 2013 17:14:53 +0100 [thread overview]
Message-ID: <20130322161453.GA2767@aepfle.de> (raw)
In-Reply-To: <1363375806-19979-1-git-send-email-kys@microsoft.com>
On Fri, Mar 15, K. Y. Srinivasan wrote:
> This driver has a user-level component (daemon) that invokes the appropriate
This change fixes a few compile errors:
hv_vss_daemon.c:64:15: warning: unknown escape sequence '\/'
hv_vss_daemon.c:64:15: warning: unknown escape sequence '\/'
hv_vss_daemon.c: In function 'vss_operate':
hv_vss_daemon.c:66: warning: 'return' with no value, in function returning non-void
hv_vss_daemon.c: In function 'main':
hv_vss_daemon.c:130: warning: ignoring return value of 'daemon', declared with attribute warn_unused_result
hv_vss_daemon.c: In function 'vss_operate':
hv_vss_daemon.c:47: warning: 'fs_op' may be used uninitialized in this function
Signed-off-by: Olaf Hering <olaf@aepfle.de>
--- a/tools/hv/hv_vss_daemon.c 2013-03-22 17:06:41.000000000 +0100
+++ b/tools/hv/hv_vss_daemon.c 2013-03-22 17:09:41.000000000 +0100
@@ -51,7 +51,7 @@ static int vss_operate(int operation)
FILE *file;
char *p;
char *x;
- int error;
+ int error = -1;
switch (operation) {
case VSS_OP_FREEZE:
@@ -60,11 +60,13 @@ static int vss_operate(int operation)
case VSS_OP_THAW:
fs_op = "-u ";
break;
+ default:
+ goto out;
}
- file = popen("mount | awk '/^\/dev\// { print $3}'", "r");
+ file = popen("mount | awk '/^\\/dev\\// { print $3}'", "r");
if (file == NULL)
- return;
+ goto out;
while ((p = fgets(buf, sizeof(buf), file)) != NULL) {
x = strchr(p, '\n');
@@ -82,6 +84,7 @@ static int vss_operate(int operation)
syslog(LOG_INFO, "VSS cmd is %s\n", cmd);
error = system(cmd);
+out:
return error;
}
@@ -128,7 +131,9 @@ int main(void)
int op;
struct hv_vss_msg *vss_msg;
- daemon(1, 0);
+ if (daemon(1, 0))
+ return 1;
+
openlog("Hyper-V VSS", 0, LOG_USER);
syslog(LOG_INFO, "VSS starting; pid is:%d", getpid());
next prev parent reply other threads:[~2013-03-22 16:14 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-15 19:30 [PATCH V2 1/1] Drivers: hv: Add a new driver to support host initiated backup K. Y. Srinivasan
2013-03-22 16:14 ` Olaf Hering [this message]
2013-03-22 18:50 ` KY Srinivasan
2013-03-25 20:11 ` Greg KH
2013-03-26 9:02 ` Paolo Bonzini
2013-03-26 18:25 ` KY Srinivasan
-- strict thread matches above, loose matches on Subject: below --
2013-03-15 1:56 K. Y. Srinivasan
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=20130322161453.GA2767@aepfle.de \
--to=olaf@aepfle.de \
--cc=apw@canonical.com \
--cc=devel@linuxdriverproject.org \
--cc=gregkh@linuxfoundation.org \
--cc=jasowang@redhat.com \
--cc=kys@microsoft.com \
--cc=linux-kernel@vger.kernel.org \
--cc=zbr@ioremap.net \
/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