[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 32/60] pr-helper: fix --socket-path default in help
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PULL 32/60] pr-helper: fix --socket-path default in help |
Date: |
Thu, 28 Jun 2018 22:04:42 +0200 |
Currently --help shows "(default '(null)')" for the -k/--socket-path
option. Fix it by getting the default path in /var/run.
Signed-off-by: Paolo Bonzini <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
---
scsi/qemu-pr-helper.c | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/scsi/qemu-pr-helper.c b/scsi/qemu-pr-helper.c
index d0f8317..4057cf3 100644
--- a/scsi/qemu-pr-helper.c
+++ b/scsi/qemu-pr-helper.c
@@ -74,8 +74,16 @@ static int uid = -1;
static int gid = -1;
#endif
+static void compute_default_paths(void)
+{
+ if (!socket_path) {
+ socket_path = qemu_get_local_state_pathname("run/qemu-pr-helper.sock");
+ }
+}
+
static void usage(const char *name)
{
+ compute_default_paths();
(printf) (
"Usage: %s [OPTIONS] FILE\n"
"Persistent Reservation helper program for QEMU\n"
@@ -845,13 +853,6 @@ static const char *socket_activation_validate_opts(void)
return NULL;
}
-static void compute_default_paths(void)
-{
- if (!socket_path) {
- socket_path = qemu_get_local_state_pathname("run/qemu-pr-helper.sock");
- }
-}
-
static void termsig_handler(int signum)
{
atomic_cmpxchg(&state, RUNNING, TERMINATE);
--
1.8.3.1
- [Qemu-devel] [PULL 16/60] qemu-options: Add missing newline to -accel help text, (continued)
- [Qemu-devel] [PULL 16/60] qemu-options: Add missing newline to -accel help text, Paolo Bonzini, 2018/06/28
- [Qemu-devel] [PULL 20/60] pc-dimm: remove pc_dimm_get_free_slot() from header, Paolo Bonzini, 2018/06/28
- [Qemu-devel] [PULL 24/60] pc-dimm: merge get_(vmstate_)memory_region(), Paolo Bonzini, 2018/06/28
- [Qemu-devel] [PULL 26/60] nvdimm: convert nvdimm_mr into a pointer, Paolo Bonzini, 2018/06/28
- [Qemu-devel] [PULL 27/60] nvdimm: make get_memory_region() perform checks and initialization, Paolo Bonzini, 2018/06/28
- [Qemu-devel] [PULL 28/60] pc-dimm: get_memory_region() will not fail after realize, Paolo Bonzini, 2018/06/28
- [Qemu-devel] [PULL 29/60] numa: report all DIMM/NVDIMMs as plugged memory, Paolo Bonzini, 2018/06/28
- [Qemu-devel] [PULL 31/60] Deprecate the -enable-hax option, Paolo Bonzini, 2018/06/28
- [Qemu-devel] [PULL 30/60] osdep: work around Coverity parsing errors, Paolo Bonzini, 2018/06/28
- [Qemu-devel] [PULL 32/60] pr-helper: fix --socket-path default in help,
Paolo Bonzini <=
- [Qemu-devel] [PULL 33/60] pr-helper: fix assertion failure on failed multipath PERSISTENT RESERVE IN, Paolo Bonzini, 2018/06/28
- [Qemu-devel] [PULL 34/60] pr-manager-helper: avoid SIGSEGV when writing to the socket fail, Paolo Bonzini, 2018/06/28
- [Qemu-devel] [PULL 35/60] pr-manager: put stubs in .c file, Paolo Bonzini, 2018/06/28
- [Qemu-devel] [PULL 40/60] WHPX workaround bug in OSVW handling, Paolo Bonzini, 2018/06/28
- [Qemu-devel] [PULL 36/60] pr-manager: add query-pr-managers QMP command, Paolo Bonzini, 2018/06/28
- [Qemu-devel] [PULL 39/60] esp: remove legacy esp_init() function, Paolo Bonzini, 2018/06/28
- [Qemu-devel] [PULL 38/60] hw/mips/jazz: create ESP device directly via qdev, Paolo Bonzini, 2018/06/28
- [Qemu-devel] [PULL 37/60] pr-manager-helper: report event on connection/disconnection, Paolo Bonzini, 2018/06/28
- [Qemu-devel] [PULL 41/60] WHPX: register for unrecognized MSR exits, Paolo Bonzini, 2018/06/28
- [Qemu-devel] [PULL 43/60] target-i386: Add NMI interception to SVM, Paolo Bonzini, 2018/06/28