modinfo: support -b basedir and -k kernel.release, fix two bugs
authorIsaac Dunham <idunham@lavabit.com>
Fri, 28 Jun 2013 07:11:48 +0000 (02:11 -0500)
committerIsaac Dunham <idunham@lavabit.com>
Fri, 28 Jun 2013 07:11:48 +0000 (02:11 -0500)
commit7bb5221b1f943c53c9abb96f7a25ef922ae9972d
tree1fef4c7a7f032d1ff0a486003c9b7dccf79e05c1
parentaafa148d9d2c0dd59abed1a4e3715d1e9dee318c
modinfo: support -b basedir and -k kernel.release, fix two bugs
Add two less-frequently used flags for modinfo; -b specifies an alternate
root and -k replaces the output of uname -r.

Additionally, avoid a potential overflow in sprintf,
and correct an inverted test.
toys/other/modinfo.c