Skip to contentSkip to conversation

tools: hv: vss: fix the write()'s argument: error -> vss_msg

PATCH New Dexuan Cui 1 participant 1 message Dec 10, 2015 Hyper-V/Azure core and drivers

lore
Share & tools
lore

Dexuan Cui

author maintainer
#0 lore raw

PATCH 1/1 tools: hv: vss: fix the write()'s argument: error -> vss_msg

I found this by chance. I don't have a specific bug caused by this.

Cc Vitaly Kuznetsov <[email protected]>
Cc "K. Y. Srinivasan" <[email protected]>
---
 tools/hv/hv_vss_daemon.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/hv/hv_vss_daemon.c +1 -1
index 96234b6..5d51d6f 100644
@@ -254,7 +254,7 @@ int main(int argc, char *argv[])
 			syslog(LOG_ERR, "Illegal op:%d\n", op);
 		}
 		vss_msg->error = error;
-		len = write(vss_fd, &error, sizeof(struct hv_vss_msg));
+		len = write(vss_fd, vss_msg, sizeof(struct hv_vss_msg));
 		if (len != sizeof(struct hv_vss_msg)) {
 			syslog(LOG_ERR, "write failed; error: %d %s", errno,
 			       strerror(errno));
Signature · 1 line
1.9.1