virtfs-proxy-helper: add missing long option terminator
The getopt_long(3) long options array must have a zeroed terminator. This patch solves a segmentation fault when an unknown command-line option is encountered: $ fsdev/virtfs-proxy-helper --help Segmentation fault (core dumped) Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
This commit is contained in:
parent
93f6d1c160
commit
bf6667d63e
@ -49,6 +49,7 @@ static struct option helper_opts[] = {
|
|||||||
{"socket", required_argument, NULL, 's'},
|
{"socket", required_argument, NULL, 's'},
|
||||||
{"uid", required_argument, NULL, 'u'},
|
{"uid", required_argument, NULL, 'u'},
|
||||||
{"gid", required_argument, NULL, 'g'},
|
{"gid", required_argument, NULL, 'g'},
|
||||||
|
{},
|
||||||
};
|
};
|
||||||
|
|
||||||
static bool is_daemon;
|
static bool is_daemon;
|
||||||
|
Loading…
Reference in New Issue
Block a user