Changeset c0e0a928 in rtems


Ignore:
Timestamp:
Nov 12, 2009, 3:32:11 PM (10 years ago)
Author:
Thomas Doerfler <Thomas.Doerfler@…>
Branches:
4.10, 4.11, master
Children:
b27799c
Parents:
8509ec2
Message:

Changed set and get IO controls to use the buffer argument for data exchange.

Location:
cpukit
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • cpukit/ChangeLog

    r8509ec2 rc0e0a928  
     12009-11-12      Sebastian Huber <sebastian.huber@embedded-brains.de>
     2
     3        * libblock/include/rtems/blkdev.h, libblock/src/blkdev.c: Changed set
     4        and get IO controls to use the buffer argument for data exchange.
     5
     6
    172009-11-11      Sebastian Huber <sebastian.huber@embedded-brains.de>
    28
  • cpukit/libblock/include/rtems/blkdev.h

    r8509ec2 rc0e0a928  
    158158
    159159#define RTEMS_BLKIO_REQUEST         _IOWR('B', 1, rtems_blkdev_request)
    160 #define RTEMS_BLKIO_GETMEDIABLKSIZE _IO('B', 2)
    161 #define RTEMS_BLKIO_GETBLKSIZE      _IO('B', 3)
    162 #define RTEMS_BLKIO_SETBLKSIZE      _IO('B', 4)
    163 #define RTEMS_BLKIO_GETSIZE         _IO('B', 5)
     160#define RTEMS_BLKIO_GETMEDIABLKSIZE _IOR('B', 2, uint32_t)
     161#define RTEMS_BLKIO_GETBLKSIZE      _IOR('B', 3, uint32_t)
     162#define RTEMS_BLKIO_SETBLKSIZE      _IOW('B', 4, uint32_t)
     163#define RTEMS_BLKIO_GETSIZE         _IOR('B', 5, rtems_blkdev_bnum)
    164164#define RTEMS_BLKIO_SYNCDEV         _IO('B', 6)
    165165#define RTEMS_BLKIO_DELETED         _IO('B', 7)
  • cpukit/libblock/src/blkdev.c

    r8509ec2 rc0e0a928  
    227227    {
    228228        case RTEMS_BLKIO_GETMEDIABLKSIZE:
    229             args->ioctl_return = dd->media_block_size;
     229            *((uint32_t *) args->buffer) = dd->media_block_size;
     230            args->ioctl_return = 0;
    230231            break;
    231232
    232233        case RTEMS_BLKIO_GETBLKSIZE:
    233             args->ioctl_return = dd->block_size;
     234            *((uint32_t *) args->buffer) = dd->block_size;
     235            args->ioctl_return = 0;
    234236            break;
    235237
    236238        case RTEMS_BLKIO_SETBLKSIZE:
    237             dd->block_size = *((size_t*) args->buffer);
     239            dd->block_size = *((uint32_t *) args->buffer);
     240            args->ioctl_return = 0;
    238241            break;
    239242
    240243        case RTEMS_BLKIO_GETSIZE:
    241             args->ioctl_return = dd->size;
     244            *((rtems_blkdev_bnum *) args->buffer) = dd->size;
     245            args->ioctl_return = 0;
    242246            break;
    243247
Note: See TracChangeset for help on using the changeset viewer.