diff options
author | 2002-07-05 17:36:02 +0000 | |
---|---|---|
committer | 2002-07-05 17:36:02 +0000 | |
commit | 8887da0a08140923a5cd48e36ca79a40f85e6039 (patch) | |
tree | 985856e05fa3ee322994497b3edd7f4bccfe462f /ifconfig.c | |
parent | there is no such thing as -i option for ifconfig (diff) | |
download | net-tools-8887da0a08140923a5cd48e36ca79a40f85e6039.tar.gz net-tools-8887da0a08140923a5cd48e36ca79a40f85e6039.tar.bz2 net-tools-8887da0a08140923a5cd48e36ca79a40f85e6039.zip |
Jack Bloch noticed that the hw comamnd of ifconfig returns a
confusing -EBUSY if interface is up (on lkml).
Diffstat (limited to 'ifconfig.c')
-rw-r--r-- | ifconfig.c | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -3,7 +3,7 @@ * that either displays or sets the characteristics of * one or more of the system's networking interfaces. * - * Version: $Id: ifconfig.c,v 1.55 2002/07/03 23:40:47 ecki Exp $ + * Version: $Id: ifconfig.c,v 1.56 2002/07/05 17:36:02 ecki Exp $ * * Author: Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org> * and others. Copyright 1993 MicroWalt Corporation @@ -699,8 +699,12 @@ int main(int argc, char **argv) memcpy((char *) &ifr.ifr_hwaddr, (char *) &sa, sizeof(struct sockaddr)); if (ioctl(skfd, SIOCSIFHWADDR, &ifr) < 0) { - fprintf(stderr, "SIOCSIFHWADDR: %s\n", - strerror(errno)); + if (errno == EBUSY) + fprintf(stderr, "SIOCSIFHWADDR: %s - you may need to down the interface\n", + strerror(errno)); + else + fprintf(stderr, "SIOCSIFHWADDR: %s\n", + strerror(errno)); goterr = 1; } spp++; |