2010-02-20 Chris Johns <chrisj@rtems.org>

* libfs/src/dosfs/fat.c, libfs/src/rfs/rtems-rfs-buffer.c: Block
        devices are now block device nodes and not character device
        nodes.
This commit is contained in:
Chris Johns
2010-02-20 02:27:58 +00:00
parent cca94a248b
commit 5268642f86
3 changed files with 10 additions and 4 deletions

View File

@@ -1,3 +1,9 @@
2010-02-20 Chris Johns <chrisj@rtems.org>
* libfs/src/dosfs/fat.c, libfs/src/rfs/rtems-rfs-buffer.c: Block
devices are now block device nodes and not character device
nodes.
2010-02-19 Chris Johns <chrisj@rtems.org>
* libblock/src/diskdevs.c: Create the devices as block devices.

View File

@@ -367,14 +367,14 @@ fat_init_volume_info(rtems_filesystem_mount_table_entry_t *mt_entry)
if (rc == -1)
return rc;
/* rtmes feature: no block devices, all are character devices */
if (!S_ISCHR(stat_buf.st_mode))
/* Must be a block device. */
if (!S_ISBLK(stat_buf.st_mode))
rtems_set_errno_and_return_minus_one(ENOTTY);
/* check that device is registred as block device and lock it */
vol->dd = rtems_disk_obtain(stat_buf.st_rdev);
if (vol->dd == NULL)
rtems_set_errno_and_return_minus_one(ENOTTY);
rtems_set_errno_and_return_minus_one(EIO);
vol->dev = stat_buf.st_rdev;

View File

@@ -295,7 +295,7 @@ rtems_rfs_buffer_open (const char* name, rtems_rfs_file_system* fs)
/*
* Is the device a block device ?
*/
if (!S_ISCHR (st.st_mode))
if (!S_ISBLK (st.st_mode))
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_OPEN))
printf ("rtems-rfs: buffer-open: '%s' is not a block device\n", name);