mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-25 10:22:59 +02:00
wirelessctrl: Silence error messages when no BLUE device is configured.
This commit is contained in:
@@ -67,29 +67,22 @@ int main(void) {
|
||||
}
|
||||
|
||||
/* Get the GREEN interface details */
|
||||
if (!findkey(kv, "GREEN_DEV", green_dev)) {
|
||||
fprintf(stderr, "Cannot read GREEN_DEV\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if (!VALID_DEVICE(green_dev)) {
|
||||
fprintf(stderr, "Bad GREEN_DEV: %s\n", green_dev);
|
||||
exit(1);
|
||||
if (findkey(kv, "GREEN_DEV", green_dev) > 0) {
|
||||
if (!VALID_DEVICE(green_dev)) {
|
||||
fprintf(stderr, "Bad GREEN_DEV: %s\n", green_dev);
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
/* Get the BLUE interface details */
|
||||
if (!findkey(kv, "BLUE_DEV", blue_dev)) {
|
||||
fprintf(stderr, "Cannot read BLUE_DEV\n");
|
||||
exit(1);
|
||||
if (findkey(kv, "BLUE_DEV", blue_dev) > 0) {
|
||||
if ((strlen(blue_dev) > 0) && !VALID_DEVICE(blue_dev)) {
|
||||
fprintf(stderr, "Bad BLUE_DEV: %s\n", blue_dev);
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
if ((strlen(blue_dev) > 0) && !VALID_DEVICE(blue_dev)) {
|
||||
fprintf(stderr, "Bad BLUE_DEV: %s\n", blue_dev);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if (!strlen(blue_dev) > 0) {
|
||||
fprintf(stderr, "No BLUE interface\n");
|
||||
if (strlen(blue_dev) == 0) {
|
||||
exit(0);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user