Overwriting of device block size from fat_init_volume_info

Sebastian Huber sebastian.huber at embedded-brains.de
Tue Apr 22 06:56:45 UTC 2014


On 2014-04-22 08:45, ali nasir wrote:
> Yes. I noticed that the length is an integral multiple of the media block size.
> So is this length field reliable enough to be used as a mesaure to determine
> how many blocks to read from the device.

The length field is guaranteed to be an integral multiple of the media blocks size.

> For e.g. if the media block size is 512 and the length field is 4096. Should i
> interpret in the device driver (ioctl) that the request is to read 8 blocks of
> data (4096/512)?

Yes.

> I was trying to read the block_size field of the struct rtems_disk_device. But
> the ioctl receives the pointer to the physical device and the block_size of the
> physical device is set to the media_block_size (512 in my case). There is no
> relation in the physical device pointer to the logical device (the partition on
> the disk).

You should only use the rtems_disk_device dd for rtems_disk_get_driver_data(dd) 
and for all other information the rtems_blkdev_request.

-- 
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax     : +49 89 189 47 41-09
E-Mail  : sebastian.huber at embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.



More information about the users mailing list