]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
dev: Don't fail to start if we cannot open the dev plugin path
authorRoy Marples <roy@marples.name>
Wed, 8 Nov 2023 14:27:36 +0000 (14:27 +0000)
committerRoy Marples <roy@marples.name>
Fri, 10 Nov 2023 11:04:22 +0000 (11:04 +0000)
We accidently returned stdin fd in this case - return -1 instead.

src/dev.c

index eb158e4a64dadc1099bf9ac0dcae525ea940fb34..0abc3ee2660e31b673ed627b42a3dcddfc420b80 100644 (file)
--- a/src/dev.c
+++ b/src/dev.c
@@ -150,7 +150,7 @@ dev_start1(struct dhcpcd_ctx *ctx, const struct dev_dhcpcd *dev_dhcpcd)
        dp = opendir(DEVDIR);
        if (dp == NULL) {
                logdebug("dev: %s", DEVDIR);
-               return 0;
+               return -1;
        }
 
        r = 0;