summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install')
-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