summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Hughes <richard@hughsie.com>2009-07-03 09:11:36 +0100
committerRichard Hughes <richard@hughsie.com>2009-07-03 09:11:36 +0100
commitccc3643f7e9d26e449ed362daca5de4f81891bb0 (patch)
treee41f417cbeda564e1e8bfc49d2a7416b5272c4df
parent56881f8eafbfbcf8bf774e2d8ed31eda4943872a (diff)
Add battery recall data rules
-rw-r--r--src/95-devkit-power-battery-recall-dell.rules61
-rw-r--r--src/95-devkit-power-battery-recall-fujitsu.rules31
-rw-r--r--src/95-devkit-power-battery-recall-gateway.rules28
-rw-r--r--src/95-devkit-power-battery-recall-ibm.rules35
-rw-r--r--src/95-devkit-power-battery-recall-lenovo.rules24
-rw-r--r--src/95-devkit-power-battery-recall-toshiba.rules29
-rw-r--r--src/Makefile.am34
7 files changed, 227 insertions, 15 deletions
diff --git a/src/95-devkit-power-battery-recall-dell.rules b/src/95-devkit-power-battery-recall-dell.rules
new file mode 100644
index 0000000..a9eeabb
--- /dev/null
+++ b/src/95-devkit-power-battery-recall-dell.rules
@@ -0,0 +1,61 @@
+##############################################################################################################
+# Battery recall notices: Dell
+#
+# These are properties defining the behavior:
+# DKP_RECALL_NOTICE
+# DKP_RECALL_VENDOR
+# DKP_RECALL_URL
+#
+
+# only match power_supply devices
+SUBSYSTEM!="power_supply", GOTO="dkp_battery_recall_dell_end"
+
+# only match batteries
+ATTR{type}!="Battery", GOTO="dkp_battery_recall_dell_end"
+
+# only match correct manufacturer
+ATTR{manufacturer}!="Dell", GOTO="dkp_battery_recall_dell_end"
+
+ATTR{model_name}=="1K055", ENV{DKP_RECALL_NOTICE}="1"
+ATTR{model_name}=="C5446", ENV{DKP_RECALL_NOTICE}="1"
+ATTR{model_name}=="F2100", ENV{DKP_RECALL_NOTICE}="1"
+ATTR{model_name}=="KD494", ENV{DKP_RECALL_NOTICE}="1"
+ATTR{model_name}=="W5915", ENV{DKP_RECALL_NOTICE}="1"
+ATTR{model_name}=="Y1333", ENV{DKP_RECALL_NOTICE}="1"
+ATTR{model_name}=="3K590", ENV{DKP_RECALL_NOTICE}="1"
+ATTR{model_name}=="C6269", ENV{DKP_RECALL_NOTICE}="1"
+ATTR{model_name}=="F5132", ENV{DKP_RECALL_NOTICE}="1"
+ATTR{model_name}=="OR331", ENV{DKP_RECALL_NOTICE}="1"
+ATTR{model_name}=="X5308", ENV{DKP_RECALL_NOTICE}="1"
+ATTR{model_name}=="Y4500", ENV{DKP_RECALL_NOTICE}="1"
+ATTR{model_name}=="5P474", ENV{DKP_RECALL_NOTICE}="1"
+ATTR{model_name}=="C6270", ENV{DKP_RECALL_NOTICE}="1"
+ATTR{model_name}=="GD785", ENV{DKP_RECALL_NOTICE}="1"
+ATTR{model_name}=="M3006", ENV{DKP_RECALL_NOTICE}="1"
+ATTR{model_name}=="X5329", ENV{DKP_RECALL_NOTICE}="1"
+ATTR{model_name}=="Y5466", ENV{DKP_RECALL_NOTICE}="1"
+ATTR{model_name}=="6P922", ENV{DKP_RECALL_NOTICE}="1"
+ATTR{model_name}=="D2961", ENV{DKP_RECALL_NOTICE}="1"
+ATTR{model_name}=="H3191", ENV{DKP_RECALL_NOTICE}="1"
+ATTR{model_name}=="RD857", ENV{DKP_RECALL_NOTICE}="1"
+ATTR{model_name}=="X5332", ENV{DKP_RECALL_NOTICE}="1"
+ATTR{model_name}=="C2603", ENV{DKP_RECALL_NOTICE}="1"
+ATTR{model_name}=="D5555", ENV{DKP_RECALL_NOTICE}="1"
+ATTR{model_name}=="J1524", ENV{DKP_RECALL_NOTICE}="1"
+ATTR{model_name}=="TD349", ENV{DKP_RECALL_NOTICE}="1"
+ATTR{model_name}=="X5333", ENV{DKP_RECALL_NOTICE}="1"
+ATTR{model_name}=="C5339", ENV{DKP_RECALL_NOTICE}="1"
+ATTR{model_name}=="D6024", ENV{DKP_RECALL_NOTICE}="1"
+ATTR{model_name}=="JD616", ENV{DKP_RECALL_NOTICE}="1"
+ATTR{model_name}=="U5867", ENV{DKP_RECALL_NOTICE}="1"
+ATTR{model_name}=="X5875", ENV{DKP_RECALL_NOTICE}="1"
+ATTR{model_name}=="C5340", ENV{DKP_RECALL_NOTICE}="1"
+ATTR{model_name}=="D6025", ENV{DKP_RECALL_NOTICE}="1"
+ATTR{model_name}=="JD617", ENV{DKP_RECALL_NOTICE}="1"
+ATTR{model_name}=="U5882", ENV{DKP_RECALL_NOTICE}="1"
+ATTR{model_name}=="X5877", ENV{DKP_RECALL_NOTICE}="1"
+
+ENV{DKP_RECALL_NOTICE}=="1", ENV{DKP_RECALL_VENDOR}="Dell", ENV{DKP_RECALL_URL}="https://www.dellbatteryprogram.com"
+
+LABEL="dkp_battery_recall_dell_end"
+
diff --git a/src/95-devkit-power-battery-recall-fujitsu.rules b/src/95-devkit-power-battery-recall-fujitsu.rules
new file mode 100644
index 0000000..7d95e36
--- /dev/null
+++ b/src/95-devkit-power-battery-recall-fujitsu.rules
@@ -0,0 +1,31 @@
+##############################################################################################################
+# Battery recall notices: Fujitsu
+#
+# These are properties defining the behavior:
+# DKP_RECALL_NOTICE
+# DKP_RECALL_VENDOR
+# DKP_RECALL_URL
+#
+
+# only match power_supply devices
+SUBSYSTEM!="power_supply", GOTO="dkp_battery_recall_fujitsu_end"
+
+# only match batteries
+ATTR{type}!="Battery", GOTO="dkp_battery_recall_fujitsu_end"
+
+# only match correct manufacturer
+ATTR{manufacturer}!="Fujitsu", GOTO="dkp_battery_recall_fujitsu_end"
+
+ATTR{model_name}=="CP255100", ENV{DKP_RECALL_NOTICE}="1"
+ATTR{model_name}=="CP255108", ENV{DKP_RECALL_NOTICE}="1"
+ATTR{model_name}=="CP229720", ENV{DKP_RECALL_NOTICE}="1"
+ATTR{model_name}=="CP229725", ENV{DKP_RECALL_NOTICE}="1"
+ATTR{model_name}=="CP234003", ENV{DKP_RECALL_NOTICE}="1"
+ATTR{model_name}=="CP234019", ENV{DKP_RECALL_NOTICE}="1"
+ATTR{model_name}=="CP283030", ENV{DKP_RECALL_NOTICE}="1"
+ATTR{model_name}=="CP267910", ENV{DKP_RECALL_NOTICE}="1"
+
+ENV{DKP_RECALL_NOTICE}=="1", ENV{DKP_RECALL_VENDOR}="Fujitsu", ENV{DKP_RECALL_URL}="http://www.computers.us.fujitsu.com/battery/"
+
+LABEL="dkp_battery_recall_fujitsu_end"
+
diff --git a/src/95-devkit-power-battery-recall-gateway.rules b/src/95-devkit-power-battery-recall-gateway.rules
new file mode 100644
index 0000000..fe08a4e
--- /dev/null
+++ b/src/95-devkit-power-battery-recall-gateway.rules
@@ -0,0 +1,28 @@
+##############################################################################################################
+# Battery recall notices: Gateway
+#
+# These are properties defining the behavior:
+# DKP_RECALL_NOTICE
+# DKP_RECALL_VENDOR
+# DKP_RECALL_URL
+#
+
+# only match power_supply devices
+SUBSYSTEM!="power_supply", GOTO="dkp_battery_recall_gateway_end"
+
+# only match batteries
+ATTR{type}!="Battery", GOTO="dkp_battery_recall_gateway_end"
+
+# only match correct manufacturer
+ATTR{manufacturer}!="Gateway", GOTO="dkp_battery_recall_gateway_end"
+
+ATTR{model_name}=="916C4610F", ENV{DKP_RECALL_NOTICE}="1"
+ATTR{model_name}=="916C4720F", ENV{DKP_RECALL_NOTICE}="1"
+ATTR{model_name}=="916C4730F", ENV{DKP_RECALL_NOTICE}="1"
+ATTR{model_name}=="916C5010F", ENV{DKP_RECALL_NOTICE}="1"
+ATTR{model_name}=="W230", ENV{DKP_RECALL_NOTICE}="1"
+
+ENV{DKP_RECALL_NOTICE}=="1", ENV{DKP_RECALL_VENDOR}="Gateway", ENV{DKP_RECALL_URL}="http://www.gateway.com/battery/\n"
+
+LABEL="dkp_battery_recall_gateway_end"
+
diff --git a/src/95-devkit-power-battery-recall-ibm.rules b/src/95-devkit-power-battery-recall-ibm.rules
new file mode 100644
index 0000000..ecff4fb
--- /dev/null
+++ b/src/95-devkit-power-battery-recall-ibm.rules
@@ -0,0 +1,35 @@
+##############################################################################################################
+# Battery recall notices: IBM
+#
+# These are properties defining the behavior:
+# DKP_RECALL_NOTICE
+# DKP_RECALL_VENDOR
+# DKP_RECALL_URL
+#
+
+# only match power_supply devices
+SUBSYSTEM!="power_supply", GOTO="dkp_battery_recall_ibm_end"
+
+# only match batteries
+ATTR{type}!="Battery", GOTO="dkp_battery_recall_ibm_end"
+
+# only match correct manufacturer
+ATTR{manufacturer}!="SONY", GOTO="dkp_battery_recall_ibm_end"
+
+ATTR{model_name}=="92P1072", ENV{DKP_RECALL_NOTICE}="1"
+ATTR{model_name}=="92P1073", ENV{DKP_RECALL_NOTICE}="1"
+ATTR{model_name}=="92P1088", ENV{DKP_RECALL_NOTICE}="1"
+ATTR{model_name}=="92P1089", ENV{DKP_RECALL_NOTICE}="1"
+ATTR{model_name}=="92P1142", ENV{DKP_RECALL_NOTICE}="1"
+ATTR{model_name}=="92P1141", ENV{DKP_RECALL_NOTICE}="1"
+ATTR{model_name}=="92P1170", ENV{DKP_RECALL_NOTICE}="1"
+ATTR{model_name}=="92P1169", ENV{DKP_RECALL_NOTICE}="1"
+ATTR{model_name}=="93P5028", ENV{DKP_RECALL_NOTICE}="1"
+ATTR{model_name}=="92P1174", ENV{DKP_RECALL_NOTICE}="1"
+ATTR{model_name}=="92P1173", ENV{DKP_RECALL_NOTICE}="1"
+ATTR{model_name}=="93P5030", ENV{DKP_RECALL_NOTICE}="1"
+
+ENV{DKP_RECALL_NOTICE}=="1", ENV{DKP_RECALL_VENDOR}="LENOVO", ENV{DKP_RECALL_URL}="http://www.lenovo.com/batteryprogram"
+
+LABEL="dkp_battery_recall_ibm_end"
+
diff --git a/src/95-devkit-power-battery-recall-lenovo.rules b/src/95-devkit-power-battery-recall-lenovo.rules
new file mode 100644
index 0000000..536630f
--- /dev/null
+++ b/src/95-devkit-power-battery-recall-lenovo.rules
@@ -0,0 +1,24 @@
+##############################################################################################################
+# Battery recall notices: Lenovo
+#
+# These are properties defining the behavior:
+# DKP_RECALL_NOTICE
+# DKP_RECALL_VENDOR
+# DKP_RECALL_URL
+#
+
+# only match power_supply devices
+SUBSYSTEM!="power_supply", GOTO="dkp_battery_recall_lenovo_end"
+
+# only match batteries
+ATTR{type}!="Battery", GOTO="dkp_battery_recall_lenovo_end"
+
+# only match correct manufacturer
+ATTR{manufacturer}!="SANYO", GOTO="dkp_battery_recall_lenovo_end"
+
+ATTR{model_name}=="92P1131", ENV{DKP_RECALL_NOTICE}="1"
+
+ENV{DKP_RECALL_NOTICE}=="1", ENV{DKP_RECALL_VENDOR}="LENOVO", ENV{DKP_RECALL_URL}="http://www.lenovo.com/batteryprogram"
+
+LABEL="dkp_battery_recall_lenovo_end"
+
diff --git a/src/95-devkit-power-battery-recall-toshiba.rules b/src/95-devkit-power-battery-recall-toshiba.rules
new file mode 100644
index 0000000..4a20a57
--- /dev/null
+++ b/src/95-devkit-power-battery-recall-toshiba.rules
@@ -0,0 +1,29 @@
+##############################################################################################################
+# Battery recall notices: Toshiba
+#
+# These are properties defining the behavior:
+# DKP_RECALL_NOTICE
+# DKP_RECALL_VENDOR
+# DKP_RECALL_URL
+#
+
+# only match power_supply devices
+SUBSYSTEM!="power_supply", GOTO="dkp_battery_recall_toshiba_end"
+
+# only match batteries
+ATTR{type}!="Battery", GOTO="dkp_battery_recall_toshiba_end"
+
+# only match correct manufacturer
+ATTR{manufacturer}!="TOSHIBA", GOTO="dkp_battery_recall_toshiba_end"
+
+ATTR{model_name}=="PA3465U, ENV{DKP_RECALL_NOTICE}="1"
+ATTR{model_name}=="PA3399U, ENV{DKP_RECALL_NOTICE}="1"
+ATTR{model_name}=="PA3400U, ENV{DKP_RECALL_NOTICE}="1"
+ATTR{model_name}=="PA3465U, ENV{DKP_RECALL_NOTICE}="1"
+ATTR{model_name}=="PA3399U, ENV{DKP_RECALL_NOTICE}="1"
+ATTR{model_name}=="PA3400U, ENV{DKP_RECALL_NOTICE}="1"
+
+ENV{DKP_RECALL_NOTICE}=="1", ENV{DKP_RECALL_VENDOR}="Toshiba", ENV{DKP_RECALL_URL}="http://bxinfo.toshiba.com/"
+
+LABEL="dkp_battery_recall_toshiba_end"
+
diff --git a/src/Makefile.am b/src/Makefile.am
index a7219a4..bff432b 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -54,13 +54,13 @@ dkp-wakeups-glue.h: org.freedesktop.DeviceKit.Power.Wakeups.xml Makefile.am
libexec_PROGRAMS = devkit-power-daemon
dbusifdir = $(datadir)/dbus-1/interfaces
-dbusif_DATA = \
- org.freedesktop.DeviceKit.Power.xml \
- org.freedesktop.DeviceKit.Power.Device.xml \
- org.freedesktop.DeviceKit.Power.QoS.xml \
+dbusif_DATA = \
+ org.freedesktop.DeviceKit.Power.xml \
+ org.freedesktop.DeviceKit.Power.Device.xml \
+ org.freedesktop.DeviceKit.Power.QoS.xml \
org.freedesktop.DeviceKit.Power.Wakeups.xml
-devkit_power_daemon_SOURCES = \
+devkit_power_daemon_SOURCES = \
egg-debug.c \
egg-debug.h \
dkp-polkit.h dkp-polkit.c \
@@ -79,13 +79,13 @@ devkit_power_daemon_SOURCES = \
dkp-main.c \
$(BUILT_SOURCES)
-devkit_power_daemon_CPPFLAGS = \
+devkit_power_daemon_CPPFLAGS = \
-I$(top_srcdir)/src \
-DG_LOG_DOMAIN=\"dkp-daemon\" \
$(DISABLE_DEPRECATED) \
$(AM_CPPFLAGS)
-devkit_power_daemon_LDADD = \
+devkit_power_daemon_LDADD = \
-lm \
$(USB_LIBS) \
$(GIO_LIBS) \
@@ -109,9 +109,15 @@ $(dbusconf_DATA): $(dbusconf_in_files) Makefile
cp $< $@
udevrulesdir = $(slashlibdir)/udev/rules.d
-udevrules_DATA = \
- 95-devkit-power-wup.rules \
- 95-devkit-power-hid.rules \
+udevrules_DATA = \
+ 95-devkit-power-battery-recall-dell.rules \
+ 95-devkit-power-battery-recall-fujitsu.rules \
+ 95-devkit-power-battery-recall-gateway.rules \
+ 95-devkit-power-battery-recall-ibm.rules \
+ 95-devkit-power-battery-recall-lenovo.rules \
+ 95-devkit-power-battery-recall-toshiba.rules \
+ 95-devkit-power-wup.rules \
+ 95-devkit-power-hid.rules \
95-devkit-power-csr.rules
install-data-hook:
@@ -122,15 +128,13 @@ install-data-hook:
CLEANFILES = $(BUILT_SOURCES)
EXTRA_DIST = \
- org.freedesktop.DeviceKit.Power.xml \
+ org.freedesktop.DeviceKit.Power.xml \
org.freedesktop.DeviceKit.Power.Device.xml \
org.freedesktop.DeviceKit.Power.QoS.xml \
org.freedesktop.DeviceKit.Power.Wakeups.xml \
dkp-marshal.list \
- 95-devkit-power-csr.rules \
- 95-devkit-power-hid.rules \
- 95-devkit-power-wup.rules \
- $(service_in_files) \
+ $(udevrules_DATA) \
+ $(service_in_files) \
$(dbusconf_in_files)
clean-local :