fastly/jlog — pull request #4 by jhatala (2014-01-02 22:16:14+00:00)
Title: jlogctl: fix getopt use

Before this change, jlogctl treates its argv[0] and options as filenames to attempt to open:

$ ./jlogctl -d /tmp/vtc.49967.6b8b4567/vtc_jlog_foo
./jlogctl
error opening './jlogctl'
-d
error opening '-d'
/tmp/vtc.49967.6b8b4567/vtc_jlog_foo
00000000 [29 bytes] 0 pending readers
Message 1 at [0] of (16+13)
time: Thu Jan 2 21:46:30 2014
mlen: 13

Afer this change:

$ ./jlogctl -d /tmp/vtc.49967.6b8b4567/vtc_jlog_foo
/tmp/vtc.49967.6b8b4567/vtc_jlog_foo
00000000 [29 bytes] 0 pending readers
Message 1 at [0] of (16+13)
time: Thu Jan 2 21:46:30 2014
mlen: 13