diff options
author | Thierry Vignaud <tvignaud@mandriva.org> | 2003-11-07 16:21:40 +0000 |
---|---|---|
committer | Thierry Vignaud <tvignaud@mandriva.org> | 2003-11-07 16:21:40 +0000 |
commit | 205207c98ab68f83ef61bf77e36ed9bb11914b3b (patch) | |
tree | e05b3a90a5fd296c9a681de354b44a0ae0311ecb | |
parent | cd3694d5b06730bf9d0626c0fd04fc002436224b (diff) | |
download | drakx-205207c98ab68f83ef61bf77e36ed9bb11914b3b.tar drakx-205207c98ab68f83ef61bf77e36ed9bb11914b3b.tar.gz drakx-205207c98ab68f83ef61bf77e36ed9bb11914b3b.tar.bz2 drakx-205207c98ab68f83ef61bf77e36ed9bb11914b3b.tar.xz drakx-205207c98ab68f83ef61bf77e36ed9bb11914b3b.zip |
(get_usb_ups_name) introduce it to map usb devices to hiddev devices
-rw-r--r-- | perl-install/c/stuff.xs.pl | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/perl-install/c/stuff.xs.pl b/perl-install/c/stuff.xs.pl index 5ea0f8734..b1e9d0691 100644 --- a/perl-install/c/stuff.xs.pl +++ b/perl-install/c/stuff.xs.pl @@ -48,6 +48,9 @@ typedef __uint8_t u8; #include <ext2fs/ext2_fs.h> #include <ext2fs/ext2fs.h> +// for UPS on USB: +#include <linux/hiddev.h> + #include <libldetect.h> #include <X11/Xlib.h> #include <X11/extensions/xf86misc.h> @@ -404,6 +407,20 @@ usb_probe() unsigned int getpagesize() + +char* +get_usb_ups_name(int fd) + CODE: + /* from nut/drivers/hidups.c::upsdrv_initups() : */ + char name[256]; + ioctl(fd, HIDIOCGNAME(sizeof(name)), name); + RETVAL=name; + ioctl(fd, HIDIOCINITREPORT, 0); + OUTPUT: + RETVAL + + + int hasNetDevice(device) char * device |