summaryrefslogtreecommitdiffstats
path: root/cpukit/libblock
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
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')
-rw-r--r--cpukit/libblock/include/rtems/bdbuf.h2
-rw-r--r--cpukit/libblock/include/rtems/bdpart.h12
-rw-r--r--cpukit/libblock/include/rtems/blkdev.h2
-rw-r--r--cpukit/libblock/include/rtems/diskdevs.h2
-rw-r--r--cpukit/libblock/include/rtems/ramdisk.h2
-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
10 files changed, 31 insertions, 14 deletions
diff --git a/cpukit/libblock/include/rtems/bdbuf.h b/cpukit/libblock/include/rtems/bdbuf.h
index 52ee557054..1f79f89d0d 100644
--- a/cpukit/libblock/include/rtems/bdbuf.h
+++ b/cpukit/libblock/include/rtems/bdbuf.h
@@ -1,6 +1,8 @@
/**
* @file
*
+ * @ingroup rtems_bdbuf
+ *
* Block device buffer management.
*/
diff --git a/cpukit/libblock/include/rtems/bdpart.h b/cpukit/libblock/include/rtems/bdpart.h
index dc52b1c89c..56e6363e5a 100644
--- a/cpukit/libblock/include/rtems/bdpart.h
+++ b/cpukit/libblock/include/rtems/bdpart.h
@@ -1,6 +1,8 @@
/**
* @file
*
+ * @ingroup rtems_bdpart
+ *
* Block device partition management.
*/
@@ -245,11 +247,11 @@ rtems_status_code rtems_bdpart_write(
* Creates a partition table in @a partitions with @a count partitions for the
* physical disk device with name @a disk_name.
*
- * The array of positive integer weights in @a distribution must be of size @a
- * size. The weights in the distribution array are summed up. Each weight is
- * then divided by the sum to obtain the disk fraction which forms the
- * corresponding partition. The partition boundaries are generated with
- * respect to the output format in @a format.
+ * The array of positive integer weights in @a distribution must have exactly
+ * @a count elements. The weights in the distribution array are summed up.
+ * Each weight is then divided by the sum to obtain the disk fraction which
+ * forms the corresponding partition. The partition boundaries are generated
+ * with respect to the output format in @a format.
*/
rtems_status_code rtems_bdpart_create(
const char *disk_name,
diff --git a/cpukit/libblock/include/rtems/blkdev.h b/cpukit/libblock/include/rtems/blkdev.h
index f7a7a9eb70..40a7541731 100644
--- a/cpukit/libblock/include/rtems/blkdev.h
+++ b/cpukit/libblock/include/rtems/blkdev.h
@@ -1,6 +1,8 @@
/**
* @file
*
+ * @ingroup rtems_blkdev
+ *
* Block device management.
*/
diff --git a/cpukit/libblock/include/rtems/diskdevs.h b/cpukit/libblock/include/rtems/diskdevs.h
index b5254eec5f..e48b61e53c 100644
--- a/cpukit/libblock/include/rtems/diskdevs.h
+++ b/cpukit/libblock/include/rtems/diskdevs.h
@@ -1,6 +1,8 @@
/**
* @file
*
+ * @ingroup rtems_disk
+ *
* Block device disk management.
*/
diff --git a/cpukit/libblock/include/rtems/ramdisk.h b/cpukit/libblock/include/rtems/ramdisk.h
index 62b1293a8a..a1f5927f14 100644
--- a/cpukit/libblock/include/rtems/ramdisk.h
+++ b/cpukit/libblock/include/rtems/ramdisk.h
@@ -1,6 +1,8 @@
/**
* @file
*
+ * @ingroup rtems_ramdisk
+ *
* RAM disk block device.
*/
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.
*/