Skip carrier detection with Ctrl-C
This commit is contained in:
parent
4fa516602c
commit
b24e72c645
1 changed files with 4 additions and 2 deletions
6
nmrp.c
6
nmrp.c
|
@ -445,7 +445,7 @@ int nmrp_do(struct nmrpd_args *args)
|
|||
goto out;
|
||||
}
|
||||
|
||||
printf("Waiting for Ethernet connection.\n");
|
||||
printf("Waiting for Ethernet connection (Ctrl-C to skip).\n");
|
||||
|
||||
bool unplugged = true;
|
||||
time_t beg = time_monotonic();
|
||||
|
@ -460,8 +460,10 @@ int nmrp_do(struct nmrpd_args *args)
|
|||
if (unplugged) {
|
||||
if (!g_interrupted) {
|
||||
fprintf(stderr, "Error: Ethernet cable is unplugged.\n");
|
||||
goto out;
|
||||
} else {
|
||||
g_interrupted = false;
|
||||
}
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue