diff options
Diffstat (limited to 'perl-install/c')
-rw-r--r-- | perl-install/c/stuff.xs.pm | 3 |
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 |