summaryrefslogtreecommitdiffstats
path: root/perl-install/c/stuff.xs.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/c/stuff.xs.pm')
-rw-r--r--perl-install/c/stuff.xs.pm12
1 files changed, 12 insertions, 0 deletions
diff --git a/perl-install/c/stuff.xs.pm b/perl-install/c/stuff.xs.pm
index 69e7f2d78..fbdc8bf09 100644
--- a/perl-install/c/stuff.xs.pm
+++ b/perl-install/c/stuff.xs.pm
@@ -96,6 +96,18 @@ lseek_sector(fd, sector, offset)
OUTPUT:
RETVAL
+unsigned int
+total_sectors(fd)
+ int fd
+ CODE:
+ {
+ struct hd_driveid s;
+ ioctl(fd, HDIO_GET_IDENTITY, &s);
+ RETVAL = s.lba_capacity;
+ }
+ OUTPUT:
+ RETVAL
+
void
openlog(ident)
char *ident