qemu-pr-helper: Actually allow users to specify pidfile
authorMichal Privoznik <mprivozn@redhat.com>
Sat, 24 Mar 2018 05:14:49 +0000 (06:14 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 26 Mar 2018 12:37:15 +0000 (14:37 +0200)
commitf8e1a989644f22ba2f7afb0e13b6ce2309ea9503
tree27b9c93635786957336364ba7e4bc2b38dcd600a
parent12051d82f004024d5d0202279be898c7b38cea56
qemu-pr-helper: Actually allow users to specify pidfile

Due to wrong specification of arguments to getopt_long() any
attempt to set pidfile resulted in:

1) the default to be leaked
2) the @pidfile variable to be set to NULL (because optarg is
NULL without this patch).

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Message-Id: <6f10cd53d361a395aa0e85a9311ec4e9a8fc11e5.1521868451.git.mprivozn@redhat.com>
Cc: qemu-stable@nongnu.org
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
scsi/qemu-pr-helper.c