Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F102068471
D47233.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
977 B
Referenced Files
None
Subscribers
None
D47233.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D47233: ndp: Move the option repeat to struct ndp_opts
Attached
Detach File
Event Timeline
Log In to Comment