summaryrefslogtreecommitdiffstats
path: root/perl-install/c
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2003-11-07 16:21:40 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2003-11-07 16:21:40 +0000
commit205207c98ab68f83ef61bf77e36ed9bb11914b3b (patch)
treee05b3a90a5fd296c9a681de354b44a0ae0311ecb /perl-install/c
parentcd3694d5b06730bf9d0626c0fd04fc002436224b (diff)
downloaddrakx-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
Diffstat (limited to 'perl-install/c')
-rw-r--r--perl-install/c/stuff.xs.pl17
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
8477'>don't security::various::config_security_user() can fail, don't let it bother usPascal Rigaux2003-02-171-1/+1 * (to_string): simpler way to handle the "default" resolution of frame-bufferPascal Rigaux2003-02-171-1/+1 * 9.1 rc1Florent Villard2003-02-171-0/+0 * use fbdev when the graphic card is unknownPascal Rigaux2003-02-171-5/+9 * warn when auto conf failPascal Rigaux2003-02-171-1/+4 * add module2description()Pascal Rigaux2003-02-171-3/+9 * correction for non-latin1 locales,Pablo Saratxaga2003-02-171-2/+6 * in the old days, on cannot disable shrink1, resize2 or shrink2 since they alw...Thierry Vignaud2003-02-171-2/+5 * better sound card description in summaryPascal Rigaux2003-02-171-1/+3 * enhance summary layoutPascal Rigaux2003-02-171-2/+4 * fix help popping all the timePascal Rigaux2003-02-171-1/+1 * 9.1-0.33mdkThierry Vignaud2003-02-171-1/+8 * fix setting pop_it for wizard in standalonePascal Rigaux2003-02-171-1/+2 * updated Russian and Arabic filesPablo Saratxaga2003-02-172-20216/+32221 * simplify translator job by propaging pixel english typo fixThierry Vignaud2003-02-17