Page MenuHomeFreeBSD

D47233.diff
No OneTemporary

D47233.diff

diff --git a/usr.sbin/ndp/ndp.h b/usr.sbin/ndp/ndp.h
--- a/usr.sbin/ndp/ndp.h
+++ b/usr.sbin/ndp/ndp.h
@@ -10,6 +10,7 @@
bool tflag;
int flags;
time_t expire_time;
+ int repeat;
};
extern struct ndp_opts opts;
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
@@ -121,7 +121,6 @@
static pid_t pid;
static int32_t thiszone; /* time difference with gmt */
static int s = -1;
-static int repeat = 0;
static char host_buf[NI_MAXHOST]; /* getnameinfo() */
static char ifix_buf[IFNAMSIZ]; /* if_indextoname() */
@@ -249,8 +248,8 @@
/*NOTREACHED*/
}
mode = 'a';
- repeat = atoi(optarg);
- if (repeat < 0) {
+ opts.repeat = atoi(optarg);
+ if (opts.repeat < 0) {
usage();
/*NOTREACHED*/
}
@@ -828,10 +827,10 @@
if (buf != NULL)
free(buf);
- if (repeat) {
+ if (opts.repeat) {
xo_emit("\n");
xo_flush();
- sleep(repeat);
+ sleep(opts.repeat);
goto again;
}

File Metadata

Mime Type
text/plain
Expires
Fri, Nov 8, 5:38 AM (22 h, 10 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14314176
Default Alt Text
D47233.diff (977 B)

Event Timeline