From: Dirk Grunwald <grunwald@foobar.cs.colorado.edu>
Subject: How do I determine size of disk partition from C?
Date: 1997/09/18 [thread overview]
Message-ID: <qxphgbhvp0q.fsf@foobar.cs.colorado.edu> (raw)
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
reply other threads:[~1997-09-18 4:00 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox