From patchwork Tue Sep 29 16:22:19 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Michael Jones X-Patchwork-Id: 1373513 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.openwrt.org (client-ip=2001:8b0:10b:1231::1; helo=merlin.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=meshplusplus.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=merlin.20170209 header.b=PakUPypX; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=meshplusplus-com.20150623.gappssmtp.com header.i=@meshplusplus-com.20150623.gappssmtp.com header.a=rsa-sha256 header.s=20150623 header.b=TlnD4KeU; dkim-atps=neutral Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4C14Sg6J0Sz9sSG for ; Wed, 30 Sep 2020 02:23:31 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe :List-Id:MIME-Version:Date:Message-ID:To:Subject:From:Reply-To:Cc:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Owner; bh=iT3PO+04AFxouDY7NQ9BztFrJW7f6WSUNve2a6zzNZM=; b=PakUPypXsxRRlScST+zMRSTnGz ZCg9mwEeUWFZGeMfpeTe2KiXHLABdclXn4I39PbTh/wGoLqCUJobX0Ou8M/sFFz7MhPG57eXS+nM5 3IZF9oNURsdt4vJ/o4S/iCSJITb+R8HvRd9TPj9feMxSlBdXYHue0bmPo2a50FjE7TCQhRXdRqkbt cLeba1wJe6oKX1dQtzXjG6ra0jqchv6wf4H1p/Enlr+57Gzh2Cx1wJlQ35kkhjptR/iRX1KYHQ/Dj /WzY/z6T1figcK2yy8arpqr0toiJhfE5zN/6aDvOP42Dh4t40uefC1hV436Gx+5lhP9p4ZvMMM2WA TvZ6sKjA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kNIOY-0000y0-Ne; Tue, 29 Sep 2020 16:22:26 +0000 Received: from mail-il1-x142.google.com ([2607:f8b0:4864:20::142]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kNIOV-0000wT-4g for openwrt-devel@lists.openwrt.org; Tue, 29 Sep 2020 16:22:23 +0000 Received: by mail-il1-x142.google.com with SMTP id l16so5498694ilt.13 for ; Tue, 29 Sep 2020 09:22:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=meshplusplus-com.20150623.gappssmtp.com; s=20150623; h=from:subject:to:message-id:date:user-agent:mime-version :content-transfer-encoding:content-language; bh=yTexHSLkoAethw0m2yISMedBU2TlSpSSP+qE+tw2FY8=; b=TlnD4KeUAHe+p2LUQI99Ij/ezZ667f+84nhP1PTztwa3t6a6Vl2AfUe1BEBnbm1HzE 0wko75YHPEDqkP6GMJ0hWnetZqe6Xs0/cGjgeXmfbrV1Fcagki59Li15hycEnGZhWtsI xgmTyxU+oBjGhZ478/dB1hbGcOuhXy9mTOJb44YCLFNetS15r9c358+8y8whlB7WI9PN YON7xDKMlgcfNZ8XyWW2ZWcC3XIEUbNMXxSLg5lI3QJUCO9fTL0SqCIZPOuDnfaWIsx2 ClEX4wMyd7rsXcymo15oN/MViG9LvdkZlVhhNaD8iRD31mEjBDl3UU4ZmyjyGnhILaXw fe/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:subject:to:message-id:date:user-agent :mime-version:content-transfer-encoding:content-language; bh=yTexHSLkoAethw0m2yISMedBU2TlSpSSP+qE+tw2FY8=; b=qWpk90ikRDmoVXzhmpDtF6izXZwD2yRnXiXhM+Jfh3RsRY4IucBmn0lqNX2nFV62ew bi+NE15deGMTZBNRbKPDWNPzdQV//Qr3aaLEQv1ggxo4n3LTXUtOS4P12DEY71TN9lzT 9U6reI2XsMXJsOsk1/pWdpTXUYJzVDoYvm8tQ6Ktdr7O1fns9CJ0r5so61LT22YE0kxT p1/JXuvquSR3+Oo5sMTIdqWHVCJOXDq2qfttOz3cFOv0DujAxSexxN/qmdQgVOxquIc3 hiVQe/XBoVvyG7ZRCwkNwgFU+5qZbEpKu0RSd568HvRv3fXvr7UzYnPH4+EIrKFM8su+ 6tmQ== X-Gm-Message-State: AOAM5327O8+9enUo+I1DG0xDYtd7xHfPArUaq6a62Axw0Ff8Bzzd/lj3 NcYz3SMFC5jBOjLYva4hpyh+uop7nz8Z1WL9 X-Google-Smtp-Source: ABdhPJxacl3KIgRK5+d+gQk1asZ2WyE+qcOvIq7A4tN7FVyJXOzzv6S0eH9QU10AnZouuz+/WZVO6A== X-Received: by 2002:a05:6e02:c04:: with SMTP id d4mr3858903ile.104.1601396541331; Tue, 29 Sep 2020 09:22:21 -0700 (PDT) Received: from ?IPv6:2601:248:4200:25a::71? ([2601:248:4200:25a::71]) by smtp.gmail.com with ESMTPSA id v17sm669437ilj.58.2020.09.29.09.22.20 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 29 Sep 2020 09:22:20 -0700 (PDT) From: Michael Jones Subject: [PATCH 4/5] initd: Don't search the environment list if the watchdog, fd is initialized To: openwrt-devel@lists.openwrt.org Message-ID: <888e39cb-5cce-762e-d52a-0b23459f78e8@meshplusplus.com> Date: Tue, 29 Sep 2020 11:22:19 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200929_122223_195282_07AEDD0D X-CRM114-Status: GOOD ( 14.37 ) X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:142 listed in] [list.dnswl.org] 0.0 SPF_NONE SPF: sender does not publish an SPF Record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org Signed-off-by: Michael Jones ---  watchdog.c | 4 ++--  1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/watchdog.c b/watchdog.c index 20830c3..ac5b656 100644 --- a/watchdog.c +++ b/watchdog.c @@ -49,11 +49,11 @@ static void watchdog_timeout_cb(struct uloop_timeout *t)    static int watchdog_open(bool cloexec)  { -    char *env = getenv("WDTFD"); -      if (wdt_fd >= 0)          return wdt_fd;   +    char *env = getenv("WDTFD"); +      if (env) {          DEBUG(2, "Watchdog handover: fd=%s\n", env);          wdt_fd = atoi(env);