Mercurial > hg > toybox
changeset 1155:63f8c7fa94d7 draft
Ashwini sharma pointed out that show_help() doesn't exit so "ifconfig eth0 netmask" would segfault. Replace it with an error_exit(), see list for aesthetic issue this raises re: help text.
author | Rob Landley <rob@landley.net> |
---|---|
date | Sun, 22 Dec 2013 20:15:54 -0600 |
parents | f7b777035025 |
children | faf7117c4489 |
files | toys/other/ifconfig.c |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/toys/other/ifconfig.c Sun Dec 22 19:39:12 2013 -0600 +++ b/toys/other/ifconfig.c Sun Dec 22 20:15:54 2013 -0600 @@ -478,7 +478,7 @@ // Is this an SIOCSI entry? if ((off|0xff) == 0x89ff) { if (!rev) { - if (!*++argv) show_help(); + if (!*++argv) error_exit("%s needs argument", t->name); // Assign value to ifre field and call ioctl? (via IFREQ_OFFSZ.) if (on < 0) {