Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 363228
b: refs/heads/master
c: eb8905b
h: refs/heads/master
v: v3
  • Loading branch information
Olaf Hering authored and Greg Kroah-Hartman committed Apr 24, 2013
1 parent 7f5c107 commit fd91366
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 98097858ccf34367905067ce0af2e6d1fab27241
refs/heads/master: eb8905b8ff4a887901779504d2ede95dc072bb16
12 changes: 8 additions & 4 deletions trunk/tools/hv/hv_vss_daemon.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ static int vss_operate(int operation)
FILE *file;
char *p;
char *x;
int error;
int error = 0;

switch (operation) {
case VSS_OP_FREEZE:
Expand All @@ -60,11 +60,13 @@ static int vss_operate(int operation)
case VSS_OP_THAW:
fs_op = "-u ";
break;
default:
return -1;
}

file = popen("mount | awk '/^\/dev\// { print $3}'", "r");
file = popen("mount | awk '/^\\/dev\\// { print $3}'", "r");
if (file == NULL)
return;
return -1;

while ((p = fgets(buf, sizeof(buf), file)) != NULL) {
x = strchr(p, '\n');
Expand Down Expand Up @@ -128,7 +130,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());

Expand Down

0 comments on commit fd91366

Please sign in to comment.