From patchwork Thu Mar 22 15:22:18 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergiy Kibrik X-Patchwork-Id: 889423 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=darkstar.site Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="hT2KZoip"; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=pobox.com header.i=@pobox.com header.b="n5lQb28R"; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=darkstar.site header.i=@darkstar.site header.b="n/rqb8fv"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 406Vmr599Wz9s1B for ; Fri, 23 Mar 2018 02:23:24 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Subject:Message-Id: Date:To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=NlJNkVkCtlruXUQoFpbh5xo5GvxnBIMZgYvnd3T7r68=; b=hT2KZoipPffO9h C6J+Sbnhjf9zv6+j1v+MDCCKMHbElLjxMYUfOWJFP1se/TJeJEKTGv/pQ5eoAB3s6JlFF6ZihROY4 2qk8hO2IzlDkKqO2U9ZzksXtoa6IHiizTsaXR8Xt5WHi+61ayQ/0HLt2nJrfwovSwVPI+9QZMcveY hHwalmJn0K/Th4A2eN9BvZuznjDFPObrEFhD/AFD32tASY4WR5IyzyY+zsxaIZdceWeEt0oxzE61n Nc6dJOTQgwdW+y0YEjz4DTKsHu7rfp3pUIjmTqXmAzaOEnT7GoeapE9IWv6Ks9epEA8qpQ3xUKA6f OKREaS6ERJ+mcFcSF0YQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1ez23V-0006lj-KQ; Thu, 22 Mar 2018 15:23:05 +0000 Received: from pb-smtp1.pobox.com ([64.147.108.70]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1ez23Q-0006j5-1h for lede-dev@lists.infradead.org; Thu, 22 Mar 2018 15:23:03 +0000 Received: from pb-smtp1.pobox.com (unknown [127.0.0.1]) by pb-smtp1.pobox.com (Postfix) with ESMTP id 9D73FD748C; Thu, 22 Mar 2018 11:22:42 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:date:message-id; s=sasl; bh=BjBkfxUtvddacUhMU46DVRbGd80 =; b=n5lQb28RpmK7i5ciU9nhujqYIdbBFnh4aiV+Ixadmfpms6Z8i7+2uW7jddZ yzyTPJakS2jRkfjl+jJynAARPRFHtoPqA6DznoMaL0f/mgHXVA8QGwBLILRAcOm6 GFssPCLxEWs1wtCWxTCUGmB375CbaQol8JegtIybSPZ9Ngyo= Received: from pb-smtp1.nyi.icgroup.com (unknown [127.0.0.1]) by pb-smtp1.pobox.com (Postfix) with ESMTP id 8D669D748B; Thu, 22 Mar 2018 11:22:42 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=darkstar.site; h=from:to:cc:subject:date:message-id; s=2016-12.pbsmtp; bh=0YoAgatGk50am5eOVD0i4WbKVPlAy/BcEeP/WWp3opw=; b=n/rqb8fv+UHhEBiK2ygTp19b2KJhUcvGQ+RMhOJZIhCJaxiYZCIun06gxuj5iy54ICh1No4Eo5xJrBoH9oiO3iQHbkgTuXJcrGMB6XbxrrRlNynwK34ONa5neryaRJbCM04FG9GWiVBLOhaSBBuNC0ajvV/ZWeCY2EzJBRSuqk4= Received: from localhost (unknown [95.67.106.230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pb-smtp1.pobox.com (Postfix) with ESMTPSA id D480AD7489; Thu, 22 Mar 2018 11:22:41 -0400 (EDT) From: Sergiy Kibrik To: lede-dev@lists.infradead.org Date: Thu, 22 Mar 2018 15:22:18 +0000 Message-Id: <1521732138-10688-1-git-send-email-sakib@darkstar.site> X-Mailer: git-send-email 2.7.4 X-Pobox-Relay-ID: DD074552-2DE4-11E8-955D-44CE1968708C-90055647!pb-smtp1.pobox.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180322_082300_477573_A2E30DA5 X-CRM114-Status: GOOD ( 11.75 ) X-Spam-Score: -0.8 (/) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-0.8 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [64.147.108.70 listed in list.dnswl.org] 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Subject: [LEDE-DEV] [PATCH V1][RFC][procd] udevtrigger: trigger devices w/o dev sysfs entry X-BeenThere: lede-dev@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Sergiy Kibrik MIME-Version: 1.0 Sender: "Lede-dev" Errors-To: lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org A lot of devices aren't represented via major/minor numbers and thus don't have dev entry in their sysfs directory, like network devices, USB, power supplies etc. It looks to be the rigth thing to trigger them as well. Anyway, it's up to the hotplug daemon to decide what to do with devices, it needs full vision of what's present in the system. Signed-off-by: Sergiy Kibrik --- plug/udevtrigger.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/plug/udevtrigger.c b/plug/udevtrigger.c index f87a95e..d6c4c4c 100644 --- a/plug/udevtrigger.c +++ b/plug/udevtrigger.c @@ -161,9 +161,8 @@ static int device_list_insert(const char *path) dbg("add '%s'" , path); - /* we only have a device, if we have a dev and an uevent file */ - if (!device_has_attribute(path, "/dev", S_IRUSR) || - !device_has_attribute(path, "/uevent", S_IWUSR)) + /* we only have a device, if we have an uevent file */ + if (!device_has_attribute(path, "/uevent", S_IWUSR)) return -1; strlcpy(devpath, &path[4], sizeof(devpath));