lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <22e1d85d8896681a3f3f9abdc323e634b49fa1fd.1708422122.git.mchehab@kernel.org>
Date: Tue, 20 Feb 2024 10:46:01 +0100
From: Mauro Carvalho Chehab <mchehab@...nel.org>
To: 
Cc: Mauro Carvalho Chehab <mchehab@...nel.org>,
	Benjamin Tissoires <benjamin.tissoires@...hat.com>,
	Dan Carpenter <dan.carpenter@...aro.org>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Hans Verkuil <hverkuil-cisco@...all.nl>,
	Hyunwoo Kim <imv4bel@...il.com>,
	Sakari Ailus <sakari.ailus@...ux.intel.com>,
	Zhipeng Lu <alexious@....edu.cn>,
	linux-kernel@...r.kernel.org,
	linux-media@...r.kernel.org
Subject: [PATCH 1/2] media: dvbdev: export adapter's name and bus ID to DVB uevent variables

Add two new variables for uevent, helping udev to be able to setup
a persistent name for the device.

Signed-off-by: Mauro Carvalho Chehab <mchehab@...nel.org>
---
 drivers/media/dvb-core/dvbdev.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/media/dvb-core/dvbdev.c b/drivers/media/dvb-core/dvbdev.c
index 733d0bc4b4cc..01227c695cbd 100644
--- a/drivers/media/dvb-core/dvbdev.c
+++ b/drivers/media/dvb-core/dvbdev.c
@@ -1064,6 +1064,8 @@ static int dvb_uevent(const struct device *dev, struct kobj_uevent_env *env)
 {
 	const struct dvb_device *dvbdev = dev_get_drvdata(dev);
 
+	add_uevent_var(env, "DVB_ADAPTER_NAME=%s", dvbdev->adapter->name);
+	add_uevent_var(env, "DVB_ADAPTER_PDEV=%s", dev_name(dev->parent));
 	add_uevent_var(env, "DVB_ADAPTER_NUM=%d", dvbdev->adapter->num);
 	add_uevent_var(env, "DVB_DEVICE_TYPE=%s", dnames[dvbdev->type]);
 	add_uevent_var(env, "DVB_DEVICE_NUM=%d", dvbdev->id);
-- 
2.43.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ