summaryrefslogtreecommitdiffstats
path: root/perl-install/c/stuff.xs.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2000-02-28 21:23:35 +0000
committerPascal Rigaux <pixel@mandriva.com>2000-02-28 21:23:35 +0000
commitc38c6b14952c25b51b1c0f9fa05aec2d34dc8ddf (patch)
tree6ab9fab8ff9e4273ce051c7947877e38c1c08ea6 /perl-install/c/stuff.xs.pm
parentdbb92fc24abd933eff171909db38d78e1d2f40c6 (diff)
downloaddrakx-c38c6b14952c25b51b1c0f9fa05aec2d34dc8ddf.tar
drakx-c38c6b14952c25b51b1c0f9fa05aec2d34dc8ddf.tar.gz
drakx-c38c6b14952c25b51b1c0f9fa05aec2d34dc8ddf.tar.bz2
drakx-c38c6b14952c25b51b1c0f9fa05aec2d34dc8ddf.tar.xz
drakx-c38c6b14952c25b51b1c0f9fa05aec2d34dc8ddf.zip
no_comment
Diffstat (limited to 'perl-install/c/stuff.xs.pm')
-rw-r--r--perl-install/c/stuff.xs.pm3
1 files changed, 1 insertions, 2 deletions
diff --git a/perl-install/c/stuff.xs.pm b/perl-install/c/stuff.xs.pm
index fbdc8bf09..d4a272a53 100644
--- a/perl-install/c/stuff.xs.pm
+++ b/perl-install/c/stuff.xs.pm
@@ -102,8 +102,7 @@ total_sectors(fd)
CODE:
{
struct hd_driveid s;
- ioctl(fd, HDIO_GET_IDENTITY, &s);
- RETVAL = s.lba_capacity;
+ RETVAL = ioctl(fd, HDIO_GET_IDENTITY, &s) == 0 ? s.lba_capacity : 0;
}
OUTPUT:
RETVAL