diff options
author | Rafael Zalamena <rzalamena@cvs.openbsd.org> | 2016-10-17 10:49:18 +0000 |
---|---|---|
committer | Rafael Zalamena <rzalamena@cvs.openbsd.org> | 2016-10-17 10:49:18 +0000 |
commit | 9ce01925c4866200b9fd26e9104d789d76fe61f0 (patch) | |
tree | c0c69d029111d05455b4b15444b0cb381d850650 /sbin/ifconfig | |
parent | ec0dea9344fcdb40f3b5b61ffbc17604d18b90bc (diff) |
Use strtoull() to read the datapath id and expect "datapath" instead of
"datapathid" as stated by the man page.
ok reyk@
Diffstat (limited to 'sbin/ifconfig')
-rw-r--r-- | sbin/ifconfig/brconfig.c | 4 | ||||
-rw-r--r-- | sbin/ifconfig/ifconfig.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/sbin/ifconfig/brconfig.c b/sbin/ifconfig/brconfig.c index 1e2580352f0..436e9920e34 100644 --- a/sbin/ifconfig/brconfig.c +++ b/sbin/ifconfig/brconfig.c @@ -1,4 +1,4 @@ -/* $OpenBSD: brconfig.c,v 1.11 2016/09/03 17:13:48 chl Exp $ */ +/* $OpenBSD: brconfig.c,v 1.12 2016/10/17 10:49:17 rzalamena Exp $ */ /* * Copyright (c) 1999, 2000 Jason L. Wright (jason@thought.net) @@ -1051,7 +1051,7 @@ switch_datapathid(const char *arg, int d) char *endptr; errno = 0; - newdpid = strtoll(arg, &endptr, 0); + newdpid = strtoull(arg, &endptr, 0); if (arg[0] == '\0' || endptr[0] != '\0' || errno == ERANGE) errx(1, "invalid arg for datapath-id: %s", arg); diff --git a/sbin/ifconfig/ifconfig.c b/sbin/ifconfig/ifconfig.c index f213d21d18c..803e13a6bd6 100644 --- a/sbin/ifconfig/ifconfig.c +++ b/sbin/ifconfig/ifconfig.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ifconfig.c,v 1.330 2016/09/03 13:46:57 reyk Exp $ */ +/* $OpenBSD: ifconfig.c,v 1.331 2016/10/17 10:49:17 rzalamena Exp $ */ /* $NetBSD: ifconfig.c,v 1.40 1997/10/01 02:19:43 enami Exp $ */ /* @@ -517,7 +517,7 @@ const struct cmd { { "-roaming", 0, 0, umb_roaming }, { "patch", NEXTARG, 0, setpair }, { "-patch", 1, 0, unsetpair }, - { "datapathid", NEXTARG, 0, switch_datapathid }, + { "datapath", NEXTARG, 0, switch_datapathid }, { "portno", NEXTARG2, 0, NULL, switch_portno }, { "addlocal", NEXTARG, 0, addlocal }, #else /* SMALL */ |