projects
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d0dedf2
)
util: use qemu_write_full() in qemu_write_pidfile()
author
Marc-André Lureau
<marcandre.lureau@redhat.com>
Wed, 20 Apr 2022 13:26:19 +0000
(17:26 +0400)
committer
Marc-André Lureau
<marcandre.lureau@redhat.com>
Thu, 21 Apr 2022 13:09:09 +0000
(17:09 +0400)
Mostly for correctness.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Message-Id: <
20220420132624
.
2439741
-37-marcandre.lureau@redhat.com>
util/oslib-posix.c
patch
|
blob
|
history
diff --git
a/util/oslib-posix.c
b/util/oslib-posix.c
index fd2bdc9ac7b37cf80dce3ffa05419143feea3a99..9751bc6be9d7a2e305a572f5b2e8a46ee976085c 100644
(file)
--- a/
util/oslib-posix.c
+++ b/
util/oslib-posix.c
@@
-184,7
+184,7
@@
bool qemu_write_pidfile(const char *path, Error **errp)
}
snprintf(pidstr, sizeof(pidstr), FMT_pid "\n", getpid());
- if (
write
(fd, pidstr, strlen(pidstr)) != strlen(pidstr)) {
+ if (
qemu_write_full
(fd, pidstr, strlen(pidstr)) != strlen(pidstr)) {
error_setg(errp, "Failed to write pid file");
goto fail_unlink;
}