RE: How to get the size of the block device ???? (Important)

From: Matt_Domsch@Dell.com
Date: Tue Dec 17 2002 - 13:49:09 EST


> I think the question being asked is 'how do I find out how many block
> long the device is?'

You can use the BLKGETSIZE64 ioctl() too. I refer you to the GNU Parted
code (ftp.gnu.org/gnu/parted) in libparted/linux.c to see how it's done
there. It first tries BLKGETSIZE64, then if that fails, tries BLKGETSIZE
instead.

Thanks,
Matt

--
Matt Domsch
Sr. Software Engineer, Lead Engineer, Architect
Dell Linux Solutions www.dell.com/linux
Linux on Dell mailing lists @ http://lists.us.dell.com

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Mon Dec 23 2002 - 22:00:17 EST