Page MenuHomeFreeBSD

D41417.diff
No OneTemporary

D41417.diff

diff --git a/usr.sbin/ndp/ndp.c b/usr.sbin/ndp/ndp.c
--- a/usr.sbin/ndp/ndp.c
+++ b/usr.sbin/ndp/ndp.c
@@ -103,7 +103,6 @@
#include <stdio.h>
#include <string.h>
#include <paths.h>
-#include <err.h>
#include <stdint.h>
#include <stdlib.h>
#include <fcntl.h>
@@ -350,7 +349,8 @@
break;
}
xo_close_container("ndp");
- xo_finish();
+ if (xo_finish() < 0)
+ xo_err(1, "stdout");
return (ret);
}
@@ -921,16 +921,16 @@
static void
usage(void)
{
- printf("usage: ndp [-nt] hostname\n");
- printf(" ndp [-nt] -a | -c | -p | -r | -H | -P | -R\n");
- printf(" ndp [-nt] -A wait\n");
- printf(" ndp [-nt] -d hostname\n");
- printf(" ndp [-nt] -f filename\n");
- printf(" ndp [-nt] -i interface [flags...]\n");
+ xo_error("usage: ndp [-nt] hostname\n");
+ xo_error(" ndp [-nt] -a | -c | -p | -r | -H | -P | -R\n");
+ xo_error(" ndp [-nt] -A wait\n");
+ xo_error(" ndp [-nt] -d hostname\n");
+ xo_error(" ndp [-nt] -f filename\n");
+ xo_error(" ndp [-nt] -i interface [flags...]\n");
#ifdef SIOCSDEFIFACE_IN6
- printf(" ndp [-nt] -I [interface|delete]\n");
+ xo_error(" ndp [-nt] -I [interface|delete]\n");
#endif
- printf(" ndp [-nt] -s nodename etheraddr [temp] [proxy]\n");
+ xo_error(" ndp [-nt] -s nodename etheraddr [temp] [proxy]\n");
exit(1);
}
diff --git a/usr.sbin/ndp/ndp_netlink.c b/usr.sbin/ndp/ndp_netlink.c
--- a/usr.sbin/ndp/ndp_netlink.c
+++ b/usr.sbin/ndp/ndp_netlink.c
@@ -28,7 +28,6 @@
#include <stdio.h>
#include <string.h>
#include <paths.h>
-#include <err.h>
#include <stdlib.h>
#include <fcntl.h>
#include <unistd.h>
@@ -42,7 +41,6 @@
#include <netlink/netlink_snl_route_compat.h>
#include <netlink/netlink_snl_route_parsers.h>
-#include <libxo/xo.h>
#include "ndp.h"
#define RTF_ANNOUNCE RTF_PROTO2
@@ -56,12 +54,12 @@
if (modfind("netlink") == -1 && errno == ENOENT) {
/* Try to load */
if (kldload("netlink") == -1)
- err(1, "netlink is not loaded and load attempt failed");
+ xo_err(1, "netlink is not loaded and load attempt failed");
if (snl_init(ss, NETLINK_ROUTE))
return;
}
- err(1, "unable to open netlink socket");
+ xo_err(1, "unable to open netlink socket");
}
static bool

File Metadata

Mime Type
text/plain
Expires
Sat, Jan 18, 6:45 AM (2 h, 48 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15851529
Default Alt Text
D41417.diff (2 KB)

Event Timeline