Yes, I need the details without mounting it. Right now I am doing this by
reading /sys/class/block/sda2/size, but that feels so... wrong.
I CAN get the size via FileStream.Length, but not with UnixStream.Length.
Since it has been implemented for FileStream, maybe UnixStream has been
forgotten.
>From strace from blockdevice --getsize:
open("/dev/sda2", O_RDONLY) = 3
ioctl(3, BLKGETSIZE, 0x7fff98da5750) = 0
Unfortunately mono has no wrapper for ioctl.
--
View this message in context:
http://mono.1490590.n4.nabble.com/Unable-to-get-block-device-size-in-UnixStream-tp4658310p4658374.html
Sent from the Mono - General mailing list archive at Nabble.com.
_______________________________________________
Mono-list maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-list