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  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:	Fri, 18 May 2007 13:53:26 -0700
From:	Kristen Carlson Accardi <>
Subject: [PATCH] ACPI: bay: send envp with uevent

Make the bay driver send env information on bay events.  

Upon any bay event, we will send the string "BAY_EVENT=%d" along with the 
KOBJ_CHANGE, and report the event number.  What the event number means will 
be platform specific.  Event 3 is always an eject request, but an insert 
may be either event 1, or it may be event 0.  Event 1 may also be a
remove request.  It would be best if you check the number of your event 
with udevmonitor before writing any udev scripts for inserting and 
removing drive bays.

Signed-off-by:  Kristen Carlson Accardi <>
Cc:  Stephan Berberig <>

Index: 2.6-git/drivers/acpi/bay.c
--- 2.6-git.orig/drivers/acpi/bay.c
+++ 2.6-git/drivers/acpi/bay.c
@@ -328,18 +328,12 @@ static void bay_notify(acpi_handle handl
 	struct bay *bay_dev = (struct bay *)data;
 	struct device *dev = &bay_dev->pdev->dev;
+	char event_string[12];
+	char *envp[] = { event_string, NULL };
 	bay_dprintk(handle, "Bay event");
-	switch(event) {
-		kobject_uevent(&dev->kobj, KOBJ_CHANGE);
-		break;
-	default:
-		printk(KERN_ERR PREFIX "Bay: unknown event %d\n", event);
-	}
+	sprintf(event_string, "BAY_EVENT=%d\n", event);
+	kobject_uevent_env(&dev->kobj, KOBJ_CHANGE, envp);
 static acpi_status
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

Powered by blists - more mailing lists