From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,9f2e481472d56810,start X-Google-Attributes: gidfee84,public X-Google-Thread: 1164f8,9f2e481472d56810,start X-Google-Attributes: gid1164f8,public From: Dirk Grunwald Subject: How do I determine size of disk partition from C? Date: 1997/09/18 Message-ID: #1/1 X-Deja-AN: 273718576 Organization: University of Colorado Newsgroups: comp.sys.dec,comp.unix.osf.osf1 I want to read/write to a raw disk partition, including standard disk partitions and LSM partitions/volumes. I can just open e.g., /dev/rrz8c and pount away using 'read' and 'write', but I can't seem to figure out th proper way to determine the file (== volume) size. Using lseek returns zero. This is annoying because files behave different than devices in this case. I assume there is a sanctioned interface. I have DU 4.0a sources, and am happy to UTSL ("use the source, luke"), but want to know the "proper" way of doing this, rather than perhaps, the non-standard way in some utilities. Any good pointers? -- Dirk Grunwald Assoc. Prof, Univ. of Colorado at Boulder