diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2012-10-31 11:54:39 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2012-11-02 09:40:58 +0100 |
commit | 9f0a68ce5afca9d21d34bab83d42fbe4bb0cf8ef (patch) | |
tree | db24c42e065ac766c55215f39eb729a337609cde /cpukit/libblock/src/nvdisk.c | |
parent | bsp/mpc55xx: SMSC9218i avoid mbuf migration (diff) | |
download | rtems-9f0a68ce5afca9d21d34bab83d42fbe4bb0cf8ef.tar.bz2 |
libblock: Block device transfer request API change
Add and use rtems_blkdev_request_done(). Block device transfer requests
must signal the completion status now with rtems_blkdev_request_done().
The return value of the block device IO control will be ignored for
transfer requests.
The first parameter of rtems_blkdev_request_cb is now the transfer
request structure.
Renamed rtems_blkdev_request::req_done to rtems_blkdev_request::done to
break third party drivers at compile time, otherwise this API change
would result in runtime errors.
Diffstat (limited to 'cpukit/libblock/src/nvdisk.c')
-rw-r--r-- | cpukit/libblock/src/nvdisk.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/cpukit/libblock/src/nvdisk.c b/cpukit/libblock/src/nvdisk.c index c90f319693..127291df71 100644 --- a/cpukit/libblock/src/nvdisk.c +++ b/cpukit/libblock/src/nvdisk.c @@ -597,10 +597,9 @@ rtems_nvdisk_read (rtems_nvdisk* nvd, rtems_blkdev_request* req) } } - req->status = ret ? RTEMS_IO_ERROR : RTEMS_SUCCESSFUL; - req->req_done (req->done_arg, req->status); + rtems_blkdev_request_done (req, ret ? RTEMS_IO_ERROR : RTEMS_SUCCESSFUL); - return ret; + return 0; } /** @@ -637,8 +636,7 @@ rtems_nvdisk_write (rtems_nvdisk* nvd, rtems_blkdev_request* req) } } - req->status = ret ? RTEMS_IO_ERROR : RTEMS_SUCCESSFUL; - req->req_done (req->done_arg, req->status); + rtems_blkdev_request_done (req, ret ? RTEMS_IO_ERROR : RTEMS_SUCCESSFUL); return 0; } |