Changeset c649976 in rtems for cpukit/libblock


Ignore:
Timestamp:
Feb 28, 2012, 12:28:42 PM (8 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, master
Children:
c93fc2b3
Parents:
4f3cbd9
git-author:
Sebastian Huber <sebastian.huber@…> (02/28/12 12:28:42)
git-committer:
Sebastian Huber <sebastian.huber@…> (03/13/12 11:24:17)
Message:

libblock: New block IO control support functions

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/libblock/include/rtems/blkdev.h

    r4f3cbd9 rc649976  
    166166/** @} */
    167167
     168static inline int rtems_disk_fd_get_media_block_size(
     169  int fd,
     170  uint32_t *media_block_size
     171)
     172{
     173  return ioctl(fd, RTEMS_BLKIO_GETMEDIABLKSIZE, media_block_size);
     174}
     175
     176static inline int rtems_disk_fd_get_block_size(int fd, uint32_t *block_size)
     177{
     178  return ioctl(fd, RTEMS_BLKIO_GETBLKSIZE, block_size);
     179}
     180
     181static inline int rtems_disk_fd_set_block_size(int fd, uint32_t block_size)
     182{
     183  return ioctl(fd, RTEMS_BLKIO_SETBLKSIZE, &block_size);
     184}
     185
     186static inline int rtems_disk_fd_get_block_count(
     187  int fd,
     188  rtems_blkdev_bnum *block_count
     189)
     190{
     191  return ioctl(fd, RTEMS_BLKIO_GETSIZE, block_count);
     192}
     193
     194static inline int rtems_disk_fd_get_disk_device(
     195  int fd,
     196  const rtems_disk_device **dd_ptr
     197)
     198{
     199  return ioctl(fd, RTEMS_BLKIO_GETDISKDEV, dd_ptr);
     200}
     201
     202static inline int rtems_disk_fd_sync(int fd)
     203{
     204  return ioctl(fd, RTEMS_BLKIO_SYNCDEV);
     205}
     206
    168207/**
    169208 * Only consecutive multi-sector buffer requests are supported.
Note: See TracChangeset for help on using the changeset viewer.