[Nut-upsdev] [PATCH] few additions to the nut-usbups.rules

Stanislav Brabec sbrabec at suse.cz
Wed Nov 2 18:06:44 UTC 2011


Stanislav Brabec wrote:

> I just compared black list of ModemManager-0.5 and nut-2.6.2 udev rules
> and created a patch that contains apparent UPS devices listed in
> ModemManager-0.5 and not listed in nut-2.6.2 as UPSes.

Surprisingly, nut-usbups.rules.in is a generated file and it is
overwritten during build. Attached patch modifies real sources.

Index: nut-2.6.2/drivers/blazer_usb.c
===================================================================
--- nut-2.6.2.orig/drivers/blazer_usb.c
+++ nut-2.6.2/drivers/blazer_usb.c
@@ -305,8 +305,8 @@ static void *phoenix_subdriver(void)
 
 static usb_device_id_t blazer_usb_id[] = {
 	{ USB_DEVICE(0x05b8, 0x0000), &cypress_subdriver },	/* Agiler UPS */
-	{            0x0001, 0x0000,  &krauler_subdriver },	/* Krauler UP-M500VA */
-	{            0xffff, 0x0000,  &krauler_subdriver },	/* Ablerex 625L USB */
+	{ USB_DEVICE(0x0001, 0x0000), &krauler_subdriver },	/* Krauler UP-M500VA */
+	{ USB_DEVICE(0xffff, 0x0000), &krauler_subdriver },	/* Ablerex 625L USB */
 	{ USB_DEVICE(0x0665, 0x5161), &cypress_subdriver },	/* Belkin F6C1200-UNV */
 	{ USB_DEVICE(0x06da, 0x0003), &ippon_subdriver },	/* Mustek Powermust */
 	{ USB_DEVICE(0x0f03, 0x0001), &cypress_subdriver },	/* Unitek Alpha 1200Sx */
Index: nut-2.6.2/drivers/belkin-hid.c
===================================================================
--- nut-2.6.2.orig/drivers/belkin-hid.c
+++ nut-2.6.2/drivers/belkin-hid.c
@@ -33,6 +33,9 @@
 /* Belkin */
 #define BELKIN_VENDORID	0x050d
 
+/* Cypress Semiconductor */
+#define CYPRESS_VENDORID	0x0665
+
 /* Liebert */
 #define LIEBERT_VENDORID	0x10af
 
@@ -54,9 +57,10 @@ static usb_device_id_t belkin_usb_device
 	{ USB_DEVICE(BELKIN_VENDORID, 0x0751), NULL },
 	/* F6H375-USB */
 	{ USB_DEVICE(BELKIN_VENDORID, 0x0375), NULL },
-	/* F6C1100-UNV, F6C1200-UNV */
+	/* F6C1100-UNV */
 	{ USB_DEVICE(BELKIN_VENDORID, 0x1100), NULL },
-
+	/* F6C1200-UNV */
+	{ USB_DEVICE(CYPRESS_VENDORID, 0x5161), NULL },
 	/* Liebert PowerSure PSA UPS */
 	{ USB_DEVICE(LIEBERT_VENDORID, 0x0001), NULL },
 
Index: nut-2.6.2/drivers/cps-hid.c
===================================================================
--- nut-2.6.2.orig/drivers/cps-hid.c
+++ nut-2.6.2/drivers/cps-hid.c
@@ -48,9 +48,9 @@ static void *cps_battery_scale(void)
 
 /* USB IDs device table */
 static usb_device_id_t cps_usb_device_table[] = {
-	/* 900AVR/BC900D, CP1200AVR/BC1200D */
+	/* 900AVR/BC900D */
 	{ USB_DEVICE(CPS_VENDORID, 0x0005), NULL },
-	/* Dynex DX-800U? */
+	/* CP1200AVR/BC1200D, Dynex DX-800U? */
 	{ USB_DEVICE(CPS_VENDORID, 0x0501), &cps_battery_scale },
 	/* OR2200LCDRM2U */
 	{ USB_DEVICE(CPS_VENDORID, 0x0601), NULL },


-- 
Best Regards / S pozdravem,

Stanislav Brabec
software developer
---------------------------------------------------------------------
SUSE LINUX, s. r. o.                          e-mail: sbrabec at suse.cz
Lihovarská 1060/12                            tel: +49 911 7405384547
190 00 Praha 9                                  fax: +420 284 028 951
Czech Republic                                    http://www.suse.cz/





More information about the Nut-upsdev mailing list