diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2012-03-26 13:19:33 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2012-04-02 10:07:38 +0200 |
commit | 4de9e69d53d3b348f3e2d148e50873c497f5214a (patch) | |
tree | 888692cabf183f4d342878289646ed58976abffb | |
parent | libblock: Use unprotected chain operations (diff) | |
download | rtems-4de9e69d53d3b348f3e2d148e50873c497f5214a.tar.bz2 |
libblock: Change error status to fatal error
Calling the bdbuf API functions in the not configured state is now a
fatal error.
-rw-r--r-- | cpukit/libblock/include/rtems/bdbuf.h | 9 | ||||
-rw-r--r-- | cpukit/libblock/src/bdbuf.c | 11 |
2 files changed, 0 insertions, 20 deletions
diff --git a/cpukit/libblock/include/rtems/bdbuf.h b/cpukit/libblock/include/rtems/bdbuf.h index 254c745c7a..c2fe0ddb94 100644 --- a/cpukit/libblock/include/rtems/bdbuf.h +++ b/cpukit/libblock/include/rtems/bdbuf.h @@ -475,8 +475,6 @@ rtems_bdbuf_init (void); * @param bd [out] Reference to the buffer descriptor pointer. * * @retval RTEMS_SUCCESSFUL Successful operation. - * @retval RTEMS_NOT_CONFIGURED Not initialized. - * @retval RTEMS_INVALID_ID No such device. * @retval RTEMS_INVALID_NUMBER Invalid block size. */ rtems_status_code @@ -506,8 +504,6 @@ rtems_bdbuf_get ( * @param bd [out] Reference to the buffer descriptor pointer. * * @retval RTEMS_SUCCESSFUL Successful operation. - * @retval RTEMS_NOT_CONFIGURED Not initialized. - * @retval RTEMS_INVALID_ID No such device. * @retval RTEMS_INVALID_NUMBER Invalid block size. * @retval RTEMS_IO_ERROR IO error. */ @@ -529,7 +525,6 @@ rtems_bdbuf_read ( * @param bd [in] Reference to the buffer descriptor. * * @retval RTEMS_SUCCESSFUL Successful operation. - * @retval RTEMS_NOT_CONFIGURED Not initialized. * @retval RTEMS_INVALID_ADDRESS The reference is NULL. */ rtems_status_code @@ -548,7 +543,6 @@ rtems_bdbuf_release (rtems_bdbuf_buffer* bd); * @param bd [in] Reference to the buffer descriptor. * * @retval RTEMS_SUCCESSFUL Successful operation. - * @retval RTEMS_NOT_CONFIGURED Not initialized. * @retval RTEMS_INVALID_ADDRESS The reference is NULL. */ rtems_status_code @@ -566,7 +560,6 @@ rtems_bdbuf_release_modified (rtems_bdbuf_buffer* bd); * @param bd [in] Reference to the buffer descriptor. * * @retval RTEMS_SUCCESSFUL Successful operation. - * @retval RTEMS_NOT_CONFIGURED Not initialized. * @retval RTEMS_INVALID_ADDRESS The reference is NULL. */ rtems_status_code @@ -584,8 +577,6 @@ rtems_bdbuf_sync (rtems_bdbuf_buffer* bd); * @param dd [in] The disk device. * * @retval RTEMS_SUCCESSFUL Successful operation. - * @retval RTEMS_NOT_CONFIGURED Not initialized. - * @retval RTEMS_INVALID_ID No such device. */ rtems_status_code rtems_bdbuf_syncdev (const rtems_disk_device *dd); diff --git a/cpukit/libblock/src/bdbuf.c b/cpukit/libblock/src/bdbuf.c index 9af2f4ac25..bfbf9f0357 100644 --- a/cpukit/libblock/src/bdbuf.c +++ b/cpukit/libblock/src/bdbuf.c @@ -1741,9 +1741,6 @@ rtems_bdbuf_obtain_disk (const rtems_disk_device *dd, rtems_blkdev_bnum *media_block_ptr, size_t *bds_per_group_ptr) { - if (!bdbuf_cache.initialised) - return RTEMS_NOT_CONFIGURED; - if (media_block_ptr != NULL) { /* @@ -2069,8 +2066,6 @@ rtems_bdbuf_read (const rtems_disk_device *dd, static rtems_status_code rtems_bdbuf_check_bd_and_lock_cache (rtems_bdbuf_buffer *bd, const char *kind) { - if (!bdbuf_cache.initialised) - return RTEMS_NOT_CONFIGURED; if (bd == NULL) return RTEMS_INVALID_ADDRESS; if (rtems_bdbuf_tracer) @@ -2184,15 +2179,9 @@ rtems_bdbuf_sync (rtems_bdbuf_buffer *bd) rtems_status_code rtems_bdbuf_syncdev (const rtems_disk_device *dd) { - rtems_status_code sc = RTEMS_SUCCESSFUL; - if (rtems_bdbuf_tracer) printf ("bdbuf:syncdev: %08x\n", (unsigned) dd->dev); - sc = rtems_bdbuf_obtain_disk (dd, 0, NULL, NULL); - if (sc != RTEMS_SUCCESSFUL) - return sc; - /* * Take the sync lock before locking the cache. Once we have the sync lock we * can lock the cache. If another thread has the sync lock it will cause this |