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:
Stefan Hajnoczi 2015-03-30 14:57:15 +01:00 committed by Aneesh Kumar K.V
parent 93f6d1c160
commit bf6667d63e
1 changed files with 1 additions and 0 deletions

View File

@ -49,6 +49,7 @@ static struct option helper_opts[] = {
{"socket", required_argument, NULL, 's'},
{"uid", required_argument, NULL, 'u'},
{"gid", required_argument, NULL, 'g'},
{},
};
static bool is_daemon;