From 8b961495bbc5cc4efa9a199dd0dc2397ba0c33ca Mon Sep 17 00:00:00 2001 From: Ralf Corsepius Date: Sat, 17 Apr 2004 08:15:17 +0000 Subject: Remove stray white spaces. --- cpukit/libblock/include/rtems/bdbuf.h | 26 ++++----- cpukit/libblock/include/rtems/blkdev.h | 20 +++---- cpukit/libblock/include/rtems/diskdevs.h | 14 ++--- cpukit/libblock/include/rtems/ide_part_table.h | 2 +- cpukit/libblock/src/bdbuf.c | 74 +++++++++++++------------- cpukit/libblock/src/blkdev.c | 10 ++-- cpukit/libblock/src/diskdevs.c | 20 +++---- cpukit/libblock/src/ide_part_table.c | 30 +++++------ cpukit/libblock/src/ramdisk.c | 10 ++-- 9 files changed, 103 insertions(+), 103 deletions(-) (limited to 'cpukit/libblock') diff --git a/cpukit/libblock/include/rtems/bdbuf.h b/cpukit/libblock/include/rtems/bdbuf.h index 0de2bd77f8..f2c2bfa567 100644 --- a/cpukit/libblock/include/rtems/bdbuf.h +++ b/cpukit/libblock/include/rtems/bdbuf.h @@ -31,13 +31,13 @@ extern "C" { * Descriptors organized in AVL-tree to speedup buffer lookup. * dev and block fields are search key in AVL-tree. * Modified buffers, free buffers and used buffers linked in 'mod', 'free' and - * 'lru' chains appropriately. + * 'lru' chains appropriately. */ typedef struct bdbuf_buffer { Chain_Node link; /* Link in the lru, mod or free chains */ - struct bdbuf_avl_node { + struct bdbuf_avl_node { signed char cache; /* Cache */ struct bdbuf_buffer* left; /* Left Child */ @@ -86,9 +86,9 @@ extern rtems_bdbuf_config rtems_bdbuf_configuration[]; extern int rtems_bdbuf_configuration_size; /* rtems_bdbuf_init -- - * Prepare buffering layer to work - initialize buffer descritors + * Prepare buffering layer to work - initialize buffer descritors * and (if it is neccessary) buffers. Buffers will be allocated accoriding - * to the configuration table, each entry describes kind of block and + * to the configuration table, each entry describes kind of block and * amount requested. After initialization all blocks is placed into * free elements lists. * @@ -107,11 +107,11 @@ rtems_bdbuf_init(rtems_bdbuf_config *conf_table, int size); /* rtems_bdbuf_get -- * Obtain block buffer. If specified block already cached (i.e. there's * block in the _modified_, or _recently_used_), return address - * of appropriate buffer descriptor and increment reference counter to 1. - * If block is not cached, allocate new buffer and return it. Data - * shouldn't be read to the buffer from media; buffer may contains - * arbitrary data. This primitive may be blocked if there are no free - * buffer descriptors available and there are no unused non-modified + * of appropriate buffer descriptor and increment reference counter to 1. + * If block is not cached, allocate new buffer and return it. Data + * shouldn't be read to the buffer from media; buffer may contains + * arbitrary data. This primitive may be blocked if there are no free + * buffer descriptors available and there are no unused non-modified * (or synchronized with media) buffers available. * * PARAMETERS: @@ -163,7 +163,7 @@ rtems_bdbuf_read(dev_t device, blkdev_bnum block, bdbuf_buffer **bdb_ptr); * * PARAMETERS: * bd_buf - pointer to the bdbuf_buffer structure previously obtained using - * get/read primitive. + * get/read primitive. * * RETURNS: * RTEMS status code (RTEMS_SUCCESSFUL if operation completed successfully @@ -177,7 +177,7 @@ rtems_bdbuf_release(bdbuf_buffer *bd_buf); /* rtems_bdbuf_release_modified -- * Release buffer allocated before, assuming that it is _modified_ by - * it's owner. This primitive decrease usage counter for buffer, mark + * it's owner. This primitive decrease usage counter for buffer, mark * buffer descriptor as modified. If usage counter is 0, insert it at * end of mod chain and release flush_sema semaphore to activate the * flush task. @@ -242,7 +242,7 @@ rtems_bdbuf_syncdev(dev_t dev); * * RETURNS: * RTEMS status code: RTEMS_SUCCESSFUL if operation completed successfully, - * RTEMS_INVALID_SIZE if specified block size is invalid (not a power + * RTEMS_INVALID_SIZE if specified block size is invalid (not a power * of 2), RTEMS_NOT_DEFINED if buffer pool for this or greater block size * is not configured. */ @@ -256,7 +256,7 @@ rtems_bdbuf_find_pool(int block_size, rtems_bdpool_id *pool); * pool - buffer pool number * block_size - block size for which buffer pool is configured returned * there - * blocks - number of buffers in buffer pool returned there + * blocks - number of buffers in buffer pool returned there * * RETURNS: * RTEMS status code: RTEMS_SUCCESSFUL if operation completed successfully, diff --git a/cpukit/libblock/include/rtems/blkdev.h b/cpukit/libblock/include/rtems/blkdev.h index e6424c6944..fac71522b6 100644 --- a/cpukit/libblock/include/rtems/blkdev.h +++ b/cpukit/libblock/include/rtems/blkdev.h @@ -1,4 +1,4 @@ -/* +/* * blkdev.h - block device driver interface definitions * * Copyright (C) 2001 OKTET Ltd., St.-Petersburg, Russia @@ -18,7 +18,7 @@ extern "C" { #endif /* Interface with device drivers - * Block device looks, initialized and behaves like traditional RTEMS device + * Block device looks, initialized and behaves like traditional RTEMS device * driver. Heart of the block device driver is in BIOREQUEST ioctl. This call * puts I/O request to the block device queue, in priority order, for * asynchronous processing. When driver executes request, req_done @@ -43,7 +43,7 @@ typedef enum blkdev_request_op { * errno - errno value to be passed to the user when * status != RTEMS_SUCCESSFUL */ -typedef void (* blkdev_request_cb)(void *arg, +typedef void (* blkdev_request_cb)(void *arg, rtems_status_code status, int error); @@ -56,19 +56,19 @@ typedef struct blkdev_sg_buffer { } blkdev_sg_buffer; /* blkdev_request (Block Device Request) structure is - * used to read/write a number of blocks from/to device. + * used to read/write a number of blocks from/to device. */ typedef struct blkdev_request { blkdev_request_op req; /* Block device operation (read or write) */ blkdev_request_cb req_done; /* Callback function */ void *done_arg; /* Argument to be passed to callback function*/ rtems_status_code status; /* Last I/O operation completion status */ - int error; /* If status != RTEMS_SUCCESSFUL, this field + int error; /* If status != RTEMS_SUCCESSFUL, this field * contains error code */ blkdev_bnum start; /* Start block number */ uint32_t count; /* Number of blocks to be exchanged */ - uint32_t bufnum; /* Number of buffers provided */ + uint32_t bufnum; /* Number of buffers provided */ blkdev_sg_buffer bufs[0];/* List of scatter/gather buffers */ } blkdev_request; @@ -80,8 +80,8 @@ typedef struct blkdev_request { #define BLKIO_SYNCDEV _IO('B', 4) /* Device driver interface conventions suppose that driver may - * contain initialize/open/close/read/write/ioctl entry points. These - * primitives (except initialize) can be implemented in generic fashion, + * contain initialize/open/close/read/write/ioctl entry points. These + * primitives (except initialize) can be implemented in generic fashion, * based upon supplied block device driver ioctl handler. Every block * device driver should provide initialize entry point, which is register * all block devices and appropriate ioctl handlers. @@ -104,8 +104,8 @@ rtems_blkdev_generic_read( ); /* blkdev_generic_write -- - * Generic block device driver write primitive. Implemented using block - * device buffer management primitives. + * Generic block device driver write primitive. Implemented using block + * device buffer management primitives. */ rtems_device_driver rtems_blkdev_generic_write( diff --git a/cpukit/libblock/include/rtems/diskdevs.h b/cpukit/libblock/include/rtems/diskdevs.h index 46a3921663..b2bf652b1d 100644 --- a/cpukit/libblock/include/rtems/diskdevs.h +++ b/cpukit/libblock/include/rtems/diskdevs.h @@ -1,4 +1,4 @@ -/* +/* * logdisk.h - Physical and logical block devices (disks) support * * Copyright (C) 2001 OKTET Ltd., St.-Petersburg, Russia @@ -48,7 +48,7 @@ typedef struct disk_device { int size; /* Size of physical or logical disk in disk blocks */ int block_size; /* Size of device block (minimum - transfer unit) in bytes + transfer unit) in bytes (must be power of 2) */ int block_size_log2; /* log2 of block_size */ rtems_bdpool_id pool; /* Buffer pool assigned to this @@ -91,13 +91,13 @@ rtems_disk_create_phys(dev_t dev, int block_size, int disk_size, * (DOS-like partition table, BSD disk label, etc). This function usually * invoked from application when application-specific splitting are in use, * or from generic code which handle different logical disk organizations. - * This primitive will register device in rtems (invoke + * This primitive will register device in rtems (invoke * rtems_io_register_name). * * PARAMETERS: * dev - logical device identifier (major, minor numbers) * phys - physical device (block device which holds this logical disk) - * identifier + * identifier * start - starting block number on the physical device * size - logical disk size in blocks * name - logical disk name @@ -105,7 +105,7 @@ rtems_disk_create_phys(dev_t dev, int block_size, int disk_size, * RETURNS: * RTEMS_SUCCESSFUL if logical device successfully added, or error code * if error occured (device already registered, no physical device - * exists, logical disk is out of physical disk boundaries, no memory + * exists, logical disk is out of physical disk boundaries, no memory * available). */ rtems_status_code @@ -180,7 +180,7 @@ rtems_disk_next(dev_t dev); * none * * RETURNS: - * RTEMS_SUCCESSFUL if library initialized, or error code if error + * RTEMS_SUCCESSFUL if library initialized, or error code if error * occured. */ rtems_status_code @@ -193,7 +193,7 @@ rtems_disk_io_initialize(void); * none * * RETURNS: - * RTEMS_SUCCESSFUL if all resources released, or error code if error + * RTEMS_SUCCESSFUL if all resources released, or error code if error * occured. */ rtems_status_code diff --git a/cpukit/libblock/include/rtems/ide_part_table.h b/cpukit/libblock/include/rtems/ide_part_table.h index 88ffc93105..e00f610e40 100644 --- a/cpukit/libblock/include/rtems/ide_part_table.h +++ b/cpukit/libblock/include/rtems/ide_part_table.h @@ -77,7 +77,7 @@ * sector_data_t -- * corresponds to the sector on the device */ -typedef struct sector_data_s +typedef struct sector_data_s { uint32_t sector_num; /* sector number on the device */ uint8_t data[0]; /* raw sector data */ diff --git a/cpukit/libblock/src/bdbuf.c b/cpukit/libblock/src/bdbuf.c index 89cd8bb484..dd0cdbe83c 100644 --- a/cpukit/libblock/src/bdbuf.c +++ b/cpukit/libblock/src/bdbuf.c @@ -61,9 +61,9 @@ struct bdbuf_context { int npools; /* Number of entries in pool table */ Chain_Control mod; /* Modified buffers list */ - rtems_id flush_sema; /* Buffer flush semaphore; counting + rtems_id flush_sema; /* Buffer flush semaphore; counting semaphore; incremented when buffer - flushed to the disk; decremented when + flushed to the disk; decremented when buffer modified */ rtems_id swapout_task; /* Swapout task ID */ }; @@ -462,7 +462,7 @@ avl_remove(bdbuf_buffer **root, const bdbuf_buffer *node) { r = q->avl.left; if (r != NULL) - { + { r->avl.bal = 0; } q = r; @@ -762,9 +762,9 @@ bdbuf_release_pool(rtems_bdpool_id pool) } /* rtems_bdbuf_init -- - * Prepare buffering layer to work - initialize buffer descritors + * Prepare buffering layer to work - initialize buffer descritors * and (if it is neccessary)buffers. Buffers will be allocated accoriding - * to the configuration table, each entry describes kind of block and + * to the configuration table, each entry describes kind of block and * amount requested. After initialization all blocks is placed into * free elements lists. * @@ -831,7 +831,7 @@ rtems_bdbuf_init(rtems_bdbuf_config *conf_table, int size) rc = rtems_task_create( rtems_build_name('B', 'S', 'W', 'P'), SWAPOUT_PRIORITY, - SWAPOUT_STACK_SIZE, + SWAPOUT_STACK_SIZE, RTEMS_DEFAULT_MODES | RTEMS_NO_PREEMPT, RTEMS_DEFAULT_ATTRIBUTES, &bd_ctx.swapout_task); @@ -862,11 +862,11 @@ rtems_bdbuf_init(rtems_bdbuf_config *conf_table, int size) * Looks for buffer already assigned for this dev/block. If one is found * obtain block buffer. If specified block already cached (i.e. there's * block in the _modified_, or _recently_used_), return address - * of appropriate buffer descriptor and increment reference counter to 1. - * If block is not cached, allocate new buffer and return it. Data - * shouldn't be read to the buffer from media; buffer contains arbitrary - * data. This primitive may be blocked if there are no free buffer - * descriptors available and there are no unused non-modified (or + * of appropriate buffer descriptor and increment reference counter to 1. + * If block is not cached, allocate new buffer and return it. Data + * shouldn't be read to the buffer from media; buffer contains arbitrary + * data. This primitive may be blocked if there are no free buffer + * descriptors available and there are no unused non-modified (or * synchronized with media) buffers available. * * PARAMETERS: @@ -886,7 +886,7 @@ rtems_bdbuf_init(rtems_bdbuf_config *conf_table, int size) */ static rtems_status_code find_or_assign_buffer(disk_device *dd, - blkdev_bnum block, + blkdev_bnum block, bdbuf_buffer **ret_buf) { bdbuf_buffer *bd_buf; @@ -908,9 +908,9 @@ again: if (bd_buf == NULL) { /* Try to obtain semaphore without waiting first. It is the most - frequent case when reasonable number of buffers configured. If - it is failed, obtain semaphore blocking on it. In this case - it should be checked that appropriate buffer hasn't been loaded + frequent case when reasonable number of buffers configured. If + it is failed, obtain semaphore blocking on it. In this case + it should be checked that appropriate buffer hasn't been loaded by another thread, because this thread is preempted */ rc = rtems_semaphore_obtain(bd_pool->bufget_sema, RTEMS_NO_WAIT, 0); if (rc == RTEMS_UNSATISFIED) @@ -931,7 +931,7 @@ again: bd_buf = (bdbuf_buffer *)Chain_Get(&bd_pool->lru); if (bd_buf != NULL) { - int avl_result; + int avl_result; avl_result = avl_remove(&bd_pool->tree, bd_buf); if (avl_result != 0) { @@ -986,17 +986,17 @@ again: * that our buffer descriptor is in the list. */ if (bd_buf->modified) { - rc = rtems_semaphore_obtain(bd_ctx.flush_sema, + rc = rtems_semaphore_obtain(bd_ctx.flush_sema, RTEMS_NO_WAIT, 0); } else { - rc = rtems_semaphore_obtain(bd_pool->bufget_sema, + rc = rtems_semaphore_obtain(bd_pool->bufget_sema, RTEMS_NO_WAIT, 0); } - /* It is possible that we couldn't obtain flush or bufget sema + /* It is possible that we couldn't obtain flush or bufget sema * although buffer in the appropriate chain is available: - * semaphore may be released to swapout task, but this task + * semaphore may be released to swapout task, but this task * actually did not start to process it. */ if (rc == RTEMS_UNSATISFIED) rc = RTEMS_SUCCESSFUL; @@ -1026,11 +1026,11 @@ again: /* rtems_bdbuf_get -- * Obtain block buffer. If specified block already cached (i.e. there's * block in the _modified_, or _recently_used_), return address - * of appropriate buffer descriptor and increment reference counter to 1. - * If block is not cached, allocate new buffer and return it. Data - * shouldn't be read to the buffer from media; buffer may contains - * arbitrary data. This primitive may be blocked if there are no free - * buffer descriptors available and there are no unused non-modified + * of appropriate buffer descriptor and increment reference counter to 1. + * If block is not cached, allocate new buffer and return it. Data + * shouldn't be read to the buffer from media; buffer may contains + * arbitrary data. This primitive may be blocked if there are no free + * buffer descriptors available and there are no unused non-modified * (or synchronized with media) buffers available. * * PARAMETERS: @@ -1093,7 +1093,7 @@ bdbuf_initialize_transfer_sema(bdbuf_buffer *bd_buf) mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_FIFO; mutex_attr.priority_ceiling = 0; - _CORE_mutex_Initialize(&bd_buf->transfer_sema, + _CORE_mutex_Initialize(&bd_buf->transfer_sema, &mutex_attr, CORE_MUTEX_LOCKED); } @@ -1120,7 +1120,7 @@ bdbuf_write_transfer_done(void *arg, rtems_status_code status, int error) bd_buf->error = RTEMS_IO_ERROR; bd_buf->in_progress = bd_buf->modified = FALSE; _CORE_mutex_Surrender(&bd_buf->transfer_sema, 0, NULL); - _CORE_mutex_Flush(&bd_buf->transfer_sema, NULL, + _CORE_mutex_Flush(&bd_buf->transfer_sema, NULL, CORE_MUTEX_STATUS_SUCCESSFUL); } @@ -1146,7 +1146,7 @@ bdbuf_read_transfer_done(void *arg, rtems_status_code status, int error) bd_buf->status = status; bd_buf->error = RTEMS_IO_ERROR; _CORE_mutex_Surrender(&bd_buf->transfer_sema, 0, NULL); - _CORE_mutex_Flush(&bd_buf->transfer_sema, NULL, + _CORE_mutex_Flush(&bd_buf->transfer_sema, NULL, CORE_MUTEX_STATUS_SUCCESSFUL); } @@ -1172,7 +1172,7 @@ bdbuf_read_transfer_done(void *arg, rtems_status_code status, int error) * bufget_sema and transfer_sema semaphores obtained by this primitive. */ rtems_status_code -rtems_bdbuf_read(dev_t device, +rtems_bdbuf_read(dev_t device, blkdev_bnum block, bdbuf_buffer **bd) { @@ -1294,7 +1294,7 @@ bdbuf_release(bdbuf_buffer *bd_buf) } else { - /* Buffer was not modified. Add this descriptor to the + /* Buffer was not modified. Add this descriptor to the * end of lru chain and make it available for reuse. */ Chain_Append(&bd_pool->lru, &bd_buf->link); rc = rtems_semaphore_release(bd_pool->bufget_sema); @@ -1314,7 +1314,7 @@ bdbuf_release(bdbuf_buffer *bd_buf) * * PARAMETERS: * bd_buf - pointer to the bdbuf_buffer structure previously obtained using - * get/read primitive. + * get/read primitive. * * RETURNS: * RTEMS status code (RTEMS_SUCCESSFUL if operation completed successfully @@ -1343,7 +1343,7 @@ rtems_bdbuf_release(bdbuf_buffer *bd_buf) /* rtems_bdbuf_release_modified -- * Release buffer allocated before, assuming that it is _modified_ by - * it's owner. This primitive decrease usage counter for buffer, mark + * it's owner. This primitive decrease usage counter for buffer, mark * buffer descriptor as modified. If usage counter is 0, insert it at * end of mod chain and release flush_sema semaphore to activate the * flush task. @@ -1376,7 +1376,7 @@ rtems_bdbuf_release_modified(bdbuf_buffer *bd_buf) } bd_buf->modified = TRUE; bd_buf->actual = TRUE; - rc = bdbuf_release(bd_buf); + rc = bdbuf_release(bd_buf); ENABLE_PREEMPTION(key); @@ -1479,7 +1479,7 @@ rtems_bdbuf_syncdev(dev_t dev) * Body of task which take care on flushing modified buffers to the * disk. */ -static rtems_task +static rtems_task bdbuf_swapout_task(rtems_task_argument unused) { rtems_status_code rc; @@ -1521,7 +1521,7 @@ bdbuf_swapout_task(rtems_task_argument unused) req.req.bufs[0].length = dd->block_size; req.req.bufs[0].buffer = bd_buf->buffer; - /* transfer_sema initialized when bd_buf inserted in the mod chain + /* transfer_sema initialized when bd_buf inserted in the mod chain first time */ result = dd->ioctl(dd->phys_dev->dev, BLKIO_REQUEST, &req); @@ -1575,7 +1575,7 @@ bdbuf_swapout_task(rtems_task_argument unused) * * RETURNS: * RTEMS status code: RTEMS_SUCCESSFUL if operation completed successfully, - * RTEMS_INVALID_SIZE if specified block size is invalid (not a power + * RTEMS_INVALID_SIZE if specified block size is invalid (not a power * of 2), RTEMS_NOT_DEFINED if buffer pool for this or greater block size * is not configured. */ @@ -1623,7 +1623,7 @@ rtems_bdbuf_find_pool(int block_size, rtems_bdpool_id *pool) * pool - buffer pool number * block_size - block size for which buffer pool is configured returned * there - * blocks - number of buffers in buffer pool returned there + * blocks - number of buffers in buffer pool returned there * * RETURNS: * RTEMS status code: RTEMS_SUCCESSFUL if operation completed successfully, diff --git a/cpukit/libblock/src/blkdev.c b/cpukit/libblock/src/blkdev.c index f5d7bacc6e..bc6ec4b7f2 100644 --- a/cpukit/libblock/src/blkdev.c +++ b/cpukit/libblock/src/blkdev.c @@ -1,5 +1,5 @@ -/* - * blkdev.h - block device driver generic support +/* + * blkdev.h - block device driver generic support * * Copyright (C) 2001 OKTET Ltd., St.-Petersburg, Russia * Author: Victor V. Vengerov @@ -82,7 +82,7 @@ rtems_blkdev_generic_read( /* rtems_blkdev_generic_write -- * Generic block device write primitive. Implemented using block device - * buffer management primitives. + * buffer management primitives. */ rtems_device_driver rtems_blkdev_generic_write( @@ -233,13 +233,13 @@ rtems_blkdev_generic_ioctl( { blkdev_request *req = args->buffer; req->start += dd->start; - args->ioctl_return = dd->ioctl(dd->phys_dev->dev, args->command, + args->ioctl_return = dd->ioctl(dd->phys_dev->dev, args->command, req); break; } default: - args->ioctl_return = dd->ioctl(dd->phys_dev->dev, args->command, + args->ioctl_return = dd->ioctl(dd->phys_dev->dev, args->command, args->buffer); break; } diff --git a/cpukit/libblock/src/diskdevs.c b/cpukit/libblock/src/diskdevs.c index 7b8d5c631a..3e7f9fd598 100644 --- a/cpukit/libblock/src/diskdevs.c +++ b/cpukit/libblock/src/diskdevs.c @@ -1,4 +1,4 @@ -/* +/* * diskdevs.c - Physical and logical block devices (disks) support * * Copyright (C) 2001 OKTET Ltd., St.-Petersburg, Russia @@ -297,13 +297,13 @@ rtems_disk_create_phys(dev_t dev, int block_size, int disk_size, * (DOS-like partition table, BSD disk label, etc). This function usually * invoked from application when application-specific splitting are in use, * or from generic code which handle different logical disk organizations. - * This primitive will register device in rtems (invoke + * This primitive will register device in rtems (invoke * rtems_io_register_name). * * PARAMETERS: * dev - logical device identifier (major, minor numbers) * phys - physical device (block device which holds this logical disk) - * identifier + * identifier * start - starting block number on the physical device * size - logical disk size in blocks * name - logical disk name @@ -311,7 +311,7 @@ rtems_disk_create_phys(dev_t dev, int block_size, int disk_size, * RETURNS: * RTEMS_SUCCESSFUL if logical device successfully added, or error code * if error occured (device already registered, no physical device - * exists, logical disk is out of physical disk boundaries, no memory + * exists, logical disk is out of physical disk boundaries, no memory * available). */ rtems_status_code @@ -458,7 +458,7 @@ rtems_disk_lookup(dev_t dev) if (diskdevs_protected) { rtems_interrupt_enable(level); - rc = rtems_semaphore_obtain(diskdevs_mutex, RTEMS_WAIT, + rc = rtems_semaphore_obtain(diskdevs_mutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (rc != RTEMS_SUCCESSFUL) return NULL; @@ -524,7 +524,7 @@ rtems_disk_next(dev_t dev) return NULL; dtab = disktab + major; - while (TRUE) + while (TRUE) { if ((dtab == NULL) || (minor > dtab->size)) { @@ -550,7 +550,7 @@ rtems_disk_next(dev_t dev) * none * * RETURNS: - * RTEMS_SUCCESSFUL if library initialized, or error code if error + * RTEMS_SUCCESSFUL if library initialized, or error code if error * occured. */ rtems_status_code @@ -569,7 +569,7 @@ rtems_disk_io_initialize(void) diskdevs_protected = FALSE; rc = rtems_semaphore_create( rtems_build_name('D', 'D', 'E', 'V'), 1, - RTEMS_FIFO | RTEMS_BINARY_SEMAPHORE | RTEMS_NO_INHERIT_PRIORITY | + RTEMS_FIFO | RTEMS_BINARY_SEMAPHORE | RTEMS_NO_INHERIT_PRIORITY | RTEMS_NO_PRIORITY_CEILING | RTEMS_LOCAL, 0, &diskdevs_mutex); if (rc != RTEMS_SUCCESSFUL) @@ -599,7 +599,7 @@ rtems_disk_io_initialize(void) * none * * RETURNS: - * RTEMS_SUCCESSFUL if all resources released, or error code if error + * RTEMS_SUCCESSFUL if all resources released, or error code if error * occured. */ rtems_status_code @@ -609,7 +609,7 @@ rtems_disk_io_done(void) rtems_device_minor_number min; rtems_status_code rc; - /* Free data structures */ + /* Free data structures */ for (maj = 0; maj < disktab_size; maj++) { struct disk_device_table *dtab = disktab + maj; diff --git a/cpukit/libblock/src/ide_part_table.c b/cpukit/libblock/src/ide_part_table.c index 2e84ed37a8..23583dc3ee 100644 --- a/cpukit/libblock/src/ide_part_table.c +++ b/cpukit/libblock/src/ide_part_table.c @@ -46,7 +46,7 @@ * and does not support devices with sector size other than 512 bytes */ static rtems_status_code -get_sector(dev_t dev, uint32_t sector_num, sector_data_t **sector) +get_sector(dev_t dev, uint32_t sector_num, sector_data_t **sector) { sector_data_t *s; bdbuf_buffer *buf; @@ -92,7 +92,7 @@ get_sector(dev_t dev, uint32_t sector_num, sector_data_t **sector) * TRUE if sector has msdos signature, FALSE otherwise */ static rtems_boolean -msdos_signature_check (sector_data_t *sector) +msdos_signature_check (sector_data_t *sector) { uint8_t *p = sector->data + RTEMS_IDE_PARTITION_MSDOS_SIGNATURE_OFFSET; @@ -112,7 +112,7 @@ msdos_signature_check (sector_data_t *sector) * TRUE if partition type is extended, FALSE otherwise */ static rtems_boolean -is_extended(uint8_t type) +is_extended(uint8_t type) { return ((type == EXTENDED_PARTITION) || (type == LINUX_EXTENDED)); } @@ -128,7 +128,7 @@ is_extended(uint8_t type) * TRUE if partition type is extended, FALSE otherwise */ static rtems_boolean -is_fat_partition(uint8_t type) +is_fat_partition(uint8_t type) { static const uint8_t fat_part_types[] = { DOS_FAT12_PARTITION,DOS_FAT16_PARTITION, @@ -186,7 +186,7 @@ data_to_part_desc(uint8_t *data, part_desc_t **new_part_desc) part_desc->size = LE_TO_CPU_U32(temp); /* - * use partitions that are + * use partitions that are * - extended * or * - FAT type and non-zero @@ -195,7 +195,7 @@ data_to_part_desc(uint8_t *data, part_desc_t **new_part_desc) ((is_fat_partition(part_desc->sys_type)) && (part_desc->size != 0))) { *new_part_desc = part_desc; } - else { + else { /* empty partition */ free(part_desc); } @@ -209,7 +209,7 @@ data_to_part_desc(uint8_t *data, part_desc_t **new_part_desc) * and constructs the partition table tree * * PARAMETERS: - * start - start sector of primary extended partition, used for + * start - start sector of primary extended partition, used for * calculation of absolute partition sector address * ext_part - description of extended partition to process * @@ -219,7 +219,7 @@ data_to_part_desc(uint8_t *data, part_desc_t **new_part_desc) * RTEMS_INTERNAL_ERROR if other error occurs. */ static rtems_status_code -read_extended_partition(uint32_t start, part_desc_t *ext_part) +read_extended_partition(uint32_t start, part_desc_t *ext_part) { int i; dev_t dev; @@ -256,7 +256,7 @@ read_extended_partition(uint32_t start, part_desc_t *ext_part) data = sector->data + RTEMS_IDE_PARTITION_TABLE_OFFSET; - for (i = 0; i < RTEMS_IDE_PARTITION_MAX_SUB_PARTITION_NUMBER; i++) + for (i = 0; i < RTEMS_IDE_PARTITION_MAX_SUB_PARTITION_NUMBER; i++) { /* if data_to_part_desc fails skip this partition * and parse the next one @@ -278,13 +278,13 @@ read_extended_partition(uint32_t start, part_desc_t *ext_part) new_part_desc->ext_part = ext_part; new_part_desc->disk_desc = ext_part->disk_desc; - if (is_extended(new_part_desc->sys_type)) + if (is_extended(new_part_desc->sys_type)) { new_part_desc->log_id = EMPTY_PARTITION; new_part_desc->start += start; - read_extended_partition(start, new_part_desc); + read_extended_partition(start, new_part_desc); } - else + else { disk_desc_t *disk_desc = new_part_desc->disk_desc; disk_desc->partitions[disk_desc->last_log_id] = new_part_desc; @@ -314,7 +314,7 @@ read_extended_partition(uint32_t start, part_desc_t *ext_part) * RTEMS_INTERNAL_ERROR otherwise */ static rtems_status_code -read_mbr(disk_desc_t *disk_desc) +read_mbr(disk_desc_t *disk_desc) { int part_num; sector_data_t *sector; @@ -351,13 +351,13 @@ read_mbr(disk_desc_t *disk_desc) return rc; } - if (part_desc != NULL) + if (part_desc != NULL) { part_desc->log_id = part_num + 1; part_desc->disk_desc = disk_desc; part_desc->end = part_desc->start + part_desc->size - 1; disk_desc->partitions[part_num] = part_desc; - } + } else { disk_desc->partitions[part_num] = NULL; diff --git a/cpukit/libblock/src/ramdisk.c b/cpukit/libblock/src/ramdisk.c index b54838c62d..7d3c8987f5 100644 --- a/cpukit/libblock/src/ramdisk.c +++ b/cpukit/libblock/src/ramdisk.c @@ -29,7 +29,7 @@ struct ramdisk { int block_num; /* Number of blocks on this RAM disk */ void *area; /* RAM disk memory area */ rtems_boolean initialized;/* RAM disk is initialized */ - rtems_boolean malloced; /* != 0, if memory allocated by malloc for this + rtems_boolean malloced; /* != 0, if memory allocated by malloc for this RAM disk */ }; @@ -40,7 +40,7 @@ static int nramdisks; * RAM disk READ request handler. This primitive copies data from RAM * disk to supplied buffer and invoke the callout function to inform * upper layer that reading is completed. - * + * * PARAMETERS: * req - pointer to the READ block device request info * @@ -75,7 +75,7 @@ ramdisk_read(struct ramdisk *rd, blkdev_request *req) * RAM disk WRITE request handler. This primitive copies data from * supplied buffer to RAM disk and invoke the callout function to inform * upper layer that writing is completed. - * + * * PARAMETERS: * req - pointer to the WRITE block device request info * @@ -159,7 +159,7 @@ ramdisk_ioctl(dev_t dev, int req, void *argp) } /* ramdisk_initialize -- - * RAM disk device driver initialization. Run through RAM disk + * RAM disk device driver initialization. Run through RAM disk * configuration information and configure appropriate RAM disks. * * PARAMETERS: @@ -185,7 +185,7 @@ ramdisk_initialize( if (rc != RTEMS_SUCCESSFUL) return rc; - r = ramdisk = calloc(rtems_ramdisk_configuration_size, + r = ramdisk = calloc(rtems_ramdisk_configuration_size, sizeof(struct ramdisk)); for (i = 0; i < rtems_ramdisk_configuration_size; i++, c++, r++) -- cgit v1.2.3