Commit e1083021 authored by Konstantin Khlebnikov's avatar Konstantin Khlebnikov

ioping: make block device support optional

This patch turns lack of block device size getter into warning. In this case
ioping woudnt handle block devices but still be able to do file requests.
Signed-off-by: default avatarKonstantin Khlebnikov <koct9i@gmail.com>
parent 153b7f38
......@@ -612,7 +612,10 @@ off_t get_device_size(int fd, struct stat *st)
ret = ioctl(fd, DKIOCGMEDIAINFO, &dkmp);
blksize = dkmp.dki_capacity * dkmp.dki_lbsize;
#else
# error no get disk size method
# warning no get disk size method
ret = -1;
errno = ENOSYS;
blksize = 0;
#endif
(void)fd;
(void)st;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment