From c38c6b14952c25b51b1c0f9fa05aec2d34dc8ddf Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Mon, 28 Feb 2000 21:23:35 +0000 Subject: no_comment --- perl-install/c/stuff.xs.pm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'perl-install/c') 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 -- cgit v1.2.1