Coding question: finding the size of a block device
- From: Andrew <andrew.chace@xxxxxxxxx>
- Date: Thu, 22 Jun 2006 15:40:39 -0500
Hello,
First off, is this the appropriate list for coding questions? I read
questions@, but I do not often see discussions about code there, so I
thought I might ask here instead. If not, please correct me.
I need to know the size of a block device in some code that I'm writing.
I checked the man pages, and I was thinking that I could use fstat(),
but after I call it on the device, stat->st_size is still 0. I tested
fstat()'s return value, and it's correct; there are no errors. So, I'm
thinking that this is not the correct way to do this.
So I guess my question is: is there a POSIX compatible function that
will allow me to check the size of a given block device?
Thanks,
-Andrew
_______________________________________________
freebsd-hackers@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@xxxxxxxxxxx"
- Follow-Ups:
- Re: Coding question: finding the size of a block device
- From: Frank Mitchell
- Re: Coding question: finding the size of a block device
- From: Mike Meyer
- Re: Coding question: finding the size of a block device
- Prev by Date: problem of boot/reboot from SimpleTech SP-U25/60 USB drive on PCG-6J2L
- Next by Date: Re: Coding question: finding the size of a block device
- Previous by thread: problem of boot/reboot from SimpleTech SP-U25/60 USB drive on PCG-6J2L
- Next by thread: Re: Coding question: finding the size of a block device
- Index(es):
Relevant Pages
|
|