[From nobody Thu Jun 25 05:54:56 2020
Received: from smtp-eu11.fugro.com ([46.34.88.151])
 by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux))
 id 1gVChm-0000Ss-4d
 for openwrt-devel@lists.openwrt.org; Fri, 07 Dec 2018 09:45:56 +0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=fugro.com; i=@fugro.com; q=dns/txt; s=mail1;
 t=1544175954; x=1575711954; h=from:to:subject:date:message-id:
 content-transfer-encoding:mime-version;
 bh=3S1Ve025hSyKmMHiRRihg9tzmLk6tlbrdXh01XkCcvo=;
 b=lURpFNFM9ixL4WoHluGrB05qhCtQTvnJbUAX7Z8m6R/EGcyM6ciYpykD
 MLtZkmAhVQOxTL3K5KFCFB165vSc3vWimV/D0IfGJ3sBgxKQCF6h5bTTA
 2KnhPmRc5HRuEzBb2S4rUjUakwRUg7IJ8YmzJeY7BGkWKptWfGuxlK9cu
 hwPO+yDqCKjDgcQfhC6vkJyEDAiUr3hQ5cyhbAh3pxuiKc6jkISP+jLb5
 vobhJrP8X1ThgGpo0C5hnKtbSMAxZ1o5OK2km4p6Q+TTe4QQHE9TEg8HP
 KZ+Ry0f8kaTXR7o1uNjEC7fN4zB8vr0jS7uxpO7Ke76DBeOmLVXU38PjX A==;
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: =?us-ascii?q?A2FAAABtQApc/z0AHaxiHgEGBwaBUQk?=
 =?us-ascii?q?LAYEwKiaBXAQyCoc3A5AVmicUgWYMARMZhEACgzo0CQ0BAwEBAQEBAQIBAQJ?=
 =?us-ascii?q?pHQuCNiKDJjoXARUpQiYBBBMIgk5LggIBA5oiAowmGgKKFAkBgnSKeT6BV4c?=
 =?us-ascii?q?1GoMzgiYCoA1VAwQCApFgiWIkA4csAYkPj2QCBAIEBQINAQEFgUY5gVVwgzy?=
 =?us-ascii?q?QW0ABMU1biH8BgR4BAQ?=
X-IPAS-Result: =?us-ascii?q?A2FAAABtQApc/z0AHaxiHgEGBwaBUQkLAYEwKiaBXAQyC?=
 =?us-ascii?q?oc3A5AVmicUgWYMARMZhEACgzo0CQ0BAwEBAQEBAQIBAQJpHQuCNiKDJjoXA?=
 =?us-ascii?q?RUpQiYBBBMIgk5LggIBA5oiAowmGgKKFAkBgnSKeT6BV4c1GoMzgiYCoA1VA?=
 =?us-ascii?q?wQCApFgiWIkA4csAYkPj2QCBAIEBQINAQEFgUY5gVVwgzyQW0ABMU1biH8Bg?=
 =?us-ascii?q?R4BAQ?=
X-IronPort-AV: E=Sophos;i=&quot;5.56,324,1539648000&quot;; d=&quot;scan'208&quot;;a=&quot;19253717&quot;
X-IRP-Internal: 1
X-IRP-FugroSender: 200661
Received: from unknown (HELO mail.fugro.com) ([172.29.0.61])
 by smtp-eu11.fugro.com with ESMTP/TLS/AES256-SHA; 07 Dec 2018 09:45:05 +0000
Received: from nldataex01.ad.fugro.com (172.29.0.61) by
 nldataex01.ad.fugro.com (172.29.0.61) with Microsoft SMTP Server (TLS) id
 15.0.1367.3; Fri, 7 Dec 2018 10:45:04 +0100
Received: from NAM03-DM3-obe.outbound.protection.outlook.com (104.47.41.56) by
 nldataex01.ad.fugro.com (172.29.0.61) with Microsoft SMTP Server
 (TLS) id
 15.0.1367.3 via Frontend Transport; Fri, 7 Dec 2018 10:45:04 +0100
Received: from BN6PR11MB1969.namprd11.prod.outlook.com (10.175.100.146) by
 BN6PR11MB1476.namprd11.prod.outlook.com (10.172.21.140) with Microsoft SMTP
 Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
 15.20.1404.20; Fri, 7 Dec 2018 09:45:01 +0000
Received: from BN6PR11MB1969.namprd11.prod.outlook.com
 ([fe80::f5e7:6655:5ba1:7f]) by BN6PR11MB1969.namprd11.prod.outlook.com
 ([fe80::f5e7:6655:5ba1:7f%7]) with mapi id 15.20.1404.021; Fri, 7 Dec 2018
 09:45:01 +0000
From: &quot;Hattink, Tjalling&quot; &lt;t.hattink@fugro.com&gt;
To: &quot;openwrt-devel@lists.openwrt.org&quot; &lt;openwrt-devel@lists.openwrt.org&gt;
Subject: [PATCH] procd: remove /dev filter on uevents
Thread-Topic: [PATCH] procd: remove /dev filter on uevents
Thread-Index: AdSOEF7aLhLKLKmORgG3uUii14SYWQ==
Date: Fri, 7 Dec 2018 09:45:01 +0000
Message-ID: &lt;BN6PR11MB1969F2110F80FBDC306C93ECE3AA0@BN6PR11MB1969.namprd11.prod.outlook.com&gt;
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
authentication-results: spf=none (sender IP is )
 smtp.mailfrom=t.hattink@fugro.com; 
x-originating-ip: [185.46.212.75]
x-ms-publictraffictype: Email
x-microsoft-exchange-diagnostics: 1; BN6PR11MB1476;
 6:WxEIwEnsnEICzlDcJ93DXLjiNKPFgn/Wd3N64PNw2kfpzo89sQbLOWm7hVuM7wzHBwVWBwN9+6jkKfbGRisvRIcAMJo6krOoFYyvUrbup+BlcTZ9zf5KmuHztXq4xfTeDtgzXT1TmgvZcZQwR1i6HmjpAZZ1bWqHwXizHr4LoI5E5caq266THun5vhnfyWhn7Q7qb8t7gNHdC+9lHXnH9/oMeK6Sbh4kV8WzbVeW5UfL/KLXN0myvpY0Ux6bsEVTkJbJBXeiVUCqqzamaK8n9nLiAoZkFQ7g5uBWr1z4RAPcmLwB6BzJ82Wx0HRkUn6ud/1z2/Nbw5+LPsIFqU4X2dEm4wRNFkx8OszTJVR747FLhvqT+NxQYTJnRj1npnWc+X3vYk1rLxErfPoag2RWQ2Yo68+MLt/0OMInm8T99jlbcTiJGI+CWaHVJHanaZbcNV759vzzmWIukGZ/Ah53YA==;
 5:zMF+yNyAnnpKgJvL74aXfOOOyXtAKiLX1peSBDOydibnEqxDiOU8j+Q3rerhZ9qMswmVUN+z9SKtjU2R+RKZ1xLkfyqBcJ4u/AfqrVcD74aF9OUXXcHHweOLztqSNqPrXtlyWGip69D/XCVHjXRDOxuWEH/dOChKx/b5C1Bpf44=;
 7:tBrE79Y0N0d7bzWTDbJ338B590nNNZmQhWcABFrPlS7GPAtwUb1G5/x6nmu24hglfphf8MlVTelyI5Ng3BESwhQ46Z0G8VDlSSW5dQvRqEbs6EkyCrMtEbdbQku54kFG6SfJX97QyUZ/eG451Vs1TQ==
x-ms-exchange-antispam-srfa-diagnostics: SOS;
x-ms-office365-filtering-correlation-id: f0f28525-534b-4505-25d4-08d65c28a875
x-microsoft-antispam: BCL:0; PCL:0;
 RULEID:(2390098)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(2017052603328)(7153060)(7193020);
 SRVR:BN6PR11MB1476; 
x-ms-traffictypediagnostic: BN6PR11MB1476:
x-microsoft-antispam-prvs: &lt;BN6PR11MB1476C02CE9910FEBF933E7C5E3AA0@BN6PR11MB1476.namprd11.prod.outlook.com&gt;
x-ms-exchange-senderadcheck: 1
x-exchange-antispam-report-cfa-test: BCL:0; PCL:0;
 RULEID:(6040522)(2401047)(5005006)(8121501046)(93006095)(93001095)(3231455)(999002)(944501520)(52105112)(3002001)(10201501046)(148016)(149066)(150057)(6041310)(20161123564045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123558120)(201708071742011)(7699051)(76991095);
 SRVR:BN6PR11MB1476; BCL:0; PCL:0; RULEID:; SRVR:BN6PR11MB1476; 
x-forefront-prvs: 0879599414
x-forefront-antispam-report: SFV:NSPM;
 SFS:(10019020)(979002)(396003)(376002)(136003)(39860400002)(366004)(346002)(199004)(189003)(6506007)(186003)(7696005)(8936002)(81156014)(81166006)(256004)(105586002)(2351001)(106356001)(71200400001)(71190400001)(68736007)(99286004)(26005)(7736002)(102836004)(305945005)(74316002)(5660300001)(9686003)(2906002)(2501003)(5640700003)(575784001)(86362001)(53936002)(478600001)(66066001)(14454004)(476003)(486006)(316002)(8676002)(33656002)(6436002)(97736004)(6916009)(25786009)(6116002)(55016002)(3846002)(969003)(989001)(999001)(1009001)(1019001);
 DIR:OUT; SFP:1102; SCL:1; SRVR:BN6PR11MB1476;
 H:BN6PR11MB1969.namprd11.prod.outlook.com; FPR:; SPF:None; LANG:en;
 PTR:InfoNoRecords; A:1; MX:1; 
received-spf: None (protection.outlook.com: fugro.com does not designate
 permitted sender hosts)
x-microsoft-antispam-message-info: ohGDGM42A8mhevzTfiTjCntA7DP/DlLYSbR751jFtJAVu+3VcqUf8jwMk8Adxi8YWv+uwplIkAECJmUxDRvtnpL3pGDotxfkYT3ooyNdBY5lkO/jqzjrAR5nBK/Z1DvH0RXzjGcH0UFbrgfQbqjcCkFNA2UaUxjsmFvUbDRJmiBuM9365pUqYuPD5rr70PIZ2E+ei3QuEkb65eHMHHPND+XE9WDMW3JVXHJ/kXQba8XEmc3UQLTFhWiqOmz+k8xnjmHaMJTWjtBUVKpRjLaDIRVcO2UFa20xtyQ7DKG8CB1rQ++40xsBuIdBP+wMsD1xm2wgYlO8x36DRX0nyitL2iB8kngG9PL4+H+RfI1XcZg=
spamdiagnosticoutput: 1:99
spamdiagnosticmetadata: NSPM
Content-Type: text/plain; charset=&quot;us-ascii&quot;
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-MS-Exchange-CrossTenant-Network-Message-Id: f0f28525-534b-4505-25d4-08d65c28a875
X-MS-Exchange-CrossTenant-originalarrivaltime: 07 Dec 2018 09:45:01.2409 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: e3b48527-4cbe-42a2-b4d2-11b3cc7a86fc
X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR11MB1476
X-OriginatorOrg: fugro.com
X-TM-AS-Product-Ver: SMEX-12.0.0.1727-8.200.1013-24268.005
X-TM-AS-Result: No--3.699900-8.000000-31
X-TM-AS-MatchedID: 702039-704156-701618-703523-711521-702084-702171-708712-7
 09584-106420-188019-706290-700472-704421-702829-700767-148004-148007-148020
 -148050-42000-42003-63
X-TM-AS-User-Approved-Sender: No
X-TM-AS-User-Blocked-Sender: No
X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 
X-CRM114-CacheID: sfid-20181207_014554_548423_942B0799 
X-CRM114-Status: GOOD (  11.89  )
X-Spam-Score: -2.5 (--)
X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary:
 Content analysis details:   (-2.5 points)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -2.3 RCVD_IN_DNSWL_MED      RBL: Sender listed at http://www.dnswl.org/,
 medium trust [46.34.88.151 listed in list.dnswl.org]
 -0.0 SPF_PASS               SPF: sender matches SPF record
 -0.0 SPF_HELO_PASS          SPF: HELO matches SPF record
 -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature
 -0.1 DKIM_VALID_EF          Message has a valid DKIM or DK signature from
 envelope-from domain
 -0.1 DKIM_VALID_AU          Message has a valid DKIM or DK signature from
 author's domain
 0.1 DKIM_SIGNED            Message has a DKIM or DK signature, not necessarily
 valid

The udevtrigger tool is responsible for firing hotplug
events for all devices that have been enumerated by
the kernel before the hotplug daemon is running. This
happens during the 'early' (coldplug) stage of procd.

A filter is in place during the scan of devices that
requires a dev attribute file to be present in the
sysfs. The argument is that without this attribute you
are not able to create a device node under '/dev'.

But there might be other hotplug scripts that are for
example do detection of certain connected devices that
do not have a dev attribute file, for example USB
devices and their siblings. To make sure these hotplug
scripts are also called during coldplug the filter is
removed.

Signed-off-by: Tjalling Hattink &lt;t.hattink@fugro.com&gt;
---
 plug/udevtrigger.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/plug/udevtrigger.c b/plug/udevtrigger.c
index f87a95e..db0c29a 100644
--- a/plug/udevtrigger.c
+++ b/plug/udevtrigger.c
@@ -161,9 +161,8 @@ static int device_list_insert(const char *path)
=20
 	dbg(&quot;add '%s'&quot; , path);
=20
-	/* we only have a device, if we have a dev and an uevent file */
-	if (!device_has_attribute(path, &quot;/dev&quot;, S_IRUSR) ||
-	    !device_has_attribute(path, &quot;/uevent&quot;, S_IWUSR))
+	/* we can only trigger a hotplug event, if we have an uevent file */
+	if (!device_has_attribute(path, &quot;/uevent&quot;, S_IWUSR))
 		return -1;
=20
 	strlcpy(devpath, &amp;path[4], sizeof(devpath));
--=20
2.14.1

]