Fix: '-g' conflicts with '-c' option and update help info
authorChengwei Yang <chengwei.yang@intel.com>
Mon, 5 Nov 2012 04:45:02 +0000 (12:45 +0800)
committerChengwei Yang <chengwei.yang@intel.com>
Mon, 5 Nov 2012 04:45:02 +0000 (12:45 +0800)
commit5e4b3f95cf50faf85ef60a894ee4e3ad8ca2dc81
tree08e09fceb264e16f6ce6f7c87e9a8e8162a5778c
parent4dc36c99cdfdad3463b94d2bd943208c17220db9
Fix: '-g' conflicts with '-c' option and update help info

Check options conflict and exit gracefully if conflict occurred.

Before applying this patch
$ dlogutil -g -c
arc = 3, optind = 3 ,Kb 0, rotate 4
ioctl: Bad file descriptor

After applying this patch, it prints help info and exit.

Change-Id: I9133398d6f67cad6aadb6224beddd75ed06ef0dc
Signed-off-by: Chengwei Yang <chengwei.yang@intel.com>
logutil.c