summaryrefslogtreecommitdiffstats
path: root/perl-install/c/stuff.xs.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2001-08-29 09:36:45 +0000
committerPascal Rigaux <pixel@mandriva.com>2001-08-29 09:36:45 +0000
commit701635b319c0153cf68896d34cb74b2906e02407 (patch)
treed7a3cf890e8f1c52603b99a5e6159e1b6df474f8 /perl-install/c/stuff.xs.pm
parent8d03aa6906756ad7ae6f6b513f34704376890683 (diff)
downloaddrakx-backup-do-not-use-701635b319c0153cf68896d34cb74b2906e02407.tar
drakx-backup-do-not-use-701635b319c0153cf68896d34cb74b2906e02407.tar.gz
drakx-backup-do-not-use-701635b319c0153cf68896d34cb74b2906e02407.tar.bz2
drakx-backup-do-not-use-701635b319c0153cf68896d34cb74b2906e02407.tar.xz
drakx-backup-do-not-use-701635b319c0153cf68896d34cb74b2906e02407.zip
better floppy detection/info
Diffstat (limited to 'perl-install/c/stuff.xs.pm')
-rw-r--r--perl-install/c/stuff.xs.pm15
1 files changed, 15 insertions, 0 deletions
diff --git a/perl-install/c/stuff.xs.pm b/perl-install/c/stuff.xs.pm
index f6e63a85d..563c97013 100644
--- a/perl-install/c/stuff.xs.pm
+++ b/perl-install/c/stuff.xs.pm
@@ -26,6 +26,7 @@ print '
#include <linux/kd.h>
#include <linux/hdreg.h>
#include <linux/vt.h>
+#include <linux/fd.h>
#include <linux/cdrom.h>
#include <linux/loop.h>
#include <net/if.h>
@@ -236,6 +237,20 @@ isDvdDrive(fd)
OUTPUT:
RETVAL
+char *
+floppy_info(name)
+ char * name
+ CODE:
+ int fd = open(name, O_RDONLY | O_NONBLOCK);
+ RETVAL = NULL;
+ if (fd != -1) {
+ char drivtyp[17];
+ ioctl(fd, FDGETDRVTYP, (void *)drivtyp);
+ RETVAL = drivtyp;
+ }
+ OUTPUT:
+ RETVAL
+
unsigned int
total_sectors(fd)
int fd