summaryrefslogtreecommitdiffstats
path: root/cpukit/libblock/src
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2009-05-15 12:52:12 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2009-05-15 12:52:12 +0000
commit4670d91898a0571866cca239b39d20281f3f88c6 (patch)
tree63c2f0d454ead1da091d4ee7be36057c8a535c93 /cpukit/libblock/src
parentcpu.c, cpu_asm.S, rtems/score/cpu.h: Cleanup of the floating point context in... (diff)
downloadrtems-4670d91898a0571866cca239b39d20281f3f88c6.tar.bz2
2009-05-15 Sebastian Huber <sebastian.huber@embedded-brains.de>
* Doxygen.in: Fixed project name. Added project number. Enabled auto brief. Disabled include graphs. * include/rtems/irq-extension.h, libblock/include/rtems/bdpart.h, libblock/include/rtems/bdbuf.h, libblock/include/rtems/bdpart.h, libblock/include/rtems/blkdev.h, libblock/include/rtems/diskdevs.h, libblock/include/rtems/ramdisk.h, libblock/src/bdbuf.c, libblock/src/blkdev.c, libblock/src/diskdevs.c, libblock/src/ramdisk.c: Documentation. * libblock/src/bdpart.c: Documentation. Fixed NULL pointer access.
Diffstat (limited to 'cpukit/libblock/src')
-rw-r--r--cpukit/libblock/src/bdbuf.c2
-rw-r--r--cpukit/libblock/src/bdpart.c13
-rw-r--r--cpukit/libblock/src/blkdev.c4
-rw-r--r--cpukit/libblock/src/diskdevs.c4
-rw-r--r--cpukit/libblock/src/ramdisk.c2
5 files changed, 16 insertions, 9 deletions
diff --git a/cpukit/libblock/src/bdbuf.c b/cpukit/libblock/src/bdbuf.c
index 6ae6c4dccc..8be4bd8180 100644
--- a/cpukit/libblock/src/bdbuf.c
+++ b/cpukit/libblock/src/bdbuf.c
@@ -1,6 +1,8 @@
/**
* @file
*
+ * @ingroup rtems_bdbuf
+ *
* Block device buffer management.
*/
diff --git a/cpukit/libblock/src/bdpart.c b/cpukit/libblock/src/bdpart.c
index b86780ccf4..355bd8014d 100644
--- a/cpukit/libblock/src/bdpart.c
+++ b/cpukit/libblock/src/bdpart.c
@@ -1,6 +1,8 @@
/**
* @file
*
+ * @ingroup rtems_bdpart
+ *
* Block device partition management.
*/
@@ -319,7 +321,7 @@ rtems_status_code rtems_bdpart_read(
rtems_status_code esc = RTEMS_SUCCESSFUL;
rtems_bdbuf_buffer *block = NULL;
rtems_bdpart_partition *p = pt - 1;
- rtems_bdpart_partition *p_end = NULL;
+ const rtems_bdpart_partition *p_end = pt + (count != NULL ? *count : 0);
rtems_blkdev_bnum ep_begin = 0; /* Extended partition begin */
rtems_blkdev_bnum ebr = 0; /* Extended boot record block index */
rtems_blkdev_bnum disk_end = 0;
@@ -332,8 +334,7 @@ rtems_status_code rtems_bdpart_read(
return RTEMS_INVALID_ADDRESS;
}
- /* Set table end and the count to a save value */
- p_end = pt + *count;
+ /* Set count to a save value */
*count = 0;
/* Get disk data */
@@ -463,7 +464,8 @@ rtems_status_code rtems_bdpart_write(
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_status_code esc = RTEMS_SUCCESSFUL;
- bool dos_compatibility = format->type == RTEMS_BDPART_FORMAT_MBR
+ bool dos_compatibility = format != NULL
+ && format->type == RTEMS_BDPART_FORMAT_MBR
&& format->mbr.dos_compatibility;
rtems_bdbuf_buffer *block = NULL;
rtems_blkdev_bnum disk_end = 0;
@@ -680,7 +682,8 @@ rtems_status_code rtems_bdpart_create(
)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
- bool dos_compatibility = format->type == RTEMS_BDPART_FORMAT_MBR
+ bool dos_compatibility = format != NULL
+ && format->type == RTEMS_BDPART_FORMAT_MBR
&& format->mbr.dos_compatibility;
rtems_blkdev_bnum disk_end = 0;
rtems_blkdev_bnum pos = 0;
diff --git a/cpukit/libblock/src/blkdev.c b/cpukit/libblock/src/blkdev.c
index fd5b7f09b0..341bccf4e5 100644
--- a/cpukit/libblock/src/blkdev.c
+++ b/cpukit/libblock/src/blkdev.c
@@ -1,12 +1,12 @@
/**
* @file
*
+ * @ingroup rtems_blkdev
+ *
* Block device management.
*/
/*
- * blkdev.h - block device driver generic support
- *
* Copyright (C) 2001 OKTET Ltd., St.-Petersburg, Russia
* Author: Victor V. Vengerov <vvv@oktet.ru>
*
diff --git a/cpukit/libblock/src/diskdevs.c b/cpukit/libblock/src/diskdevs.c
index f888246e36..0f94615a0d 100644
--- a/cpukit/libblock/src/diskdevs.c
+++ b/cpukit/libblock/src/diskdevs.c
@@ -1,12 +1,12 @@
/**
* @file
*
+ * @ingroup rtems_disk
+ *
* Block device disk management.
*/
/*
- * diskdevs.c - Physical and logical block devices (disks) support
- *
* Copyright (C) 2001 OKTET Ltd., St.-Petersburg, Russia
* Author: Victor V. Vengerov <vvv@oktet.ru>
*
diff --git a/cpukit/libblock/src/ramdisk.c b/cpukit/libblock/src/ramdisk.c
index 0b18ad34f8..5684f302df 100644
--- a/cpukit/libblock/src/ramdisk.c
+++ b/cpukit/libblock/src/ramdisk.c
@@ -1,6 +1,8 @@
/**
* @file
*
+ * @ingroup rtems_ramdisk
+ *
* RAM disk block device.
*/