Changeset 698093d in rtems


Ignore:
Timestamp:
Aug 3, 2018, 8:39:42 PM (12 months ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
f7cecc33
Parents:
bf80279
git-author:
Sebastian Huber <sebastian.huber@…> (08/03/18 20:39:42)
git-committer:
Sebastian Huber <sebastian.huber@…> (08/07/18 05:17:18)
Message:

libblock: Use rtems_blkdev_create_partition()

Update #3358.

Location:
cpukit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • cpukit/include/rtems/ide_part_table.h

    rbf80279 r698093d  
    127127
    128128typedef struct rtems_disk_desc_s {
    129     dev_t        dev; /* device number */
    130 
    131129    /* device name in /dev filesystem */
    132130    char         dev_name[RTEMS_IDE_PARTITION_DEV_NAME_LENGTH_MAX];
  • cpukit/libblock/src/ide_part_table.c

    rbf80279 r698093d  
    488488
    489489    strncpy (disk_desc->dev_name, dev_name, 15);
    490     disk_desc->dev = dev_stat.st_rdev;
    491490    disk_desc->sector_size = (dev_stat.st_blksize) ? dev_stat.st_blksize :
    492491                                              RTEMS_IDE_SECTOR_SIZE;
     
    551550{
    552551    int                         part_num;
    553     dev_t                       dev;
    554552    rtems_disk_desc_t          *disk_desc;
    555     rtems_device_major_number   major;
    556     rtems_device_minor_number   minor;
    557553    rtems_status_code           rc;
    558554    rtems_part_desc_t          *part_desc;
     
    575571    }
    576572
    577     /* To avoid device numbers conflicts we have to use for logic disk the same
    578      * device major number as ATA device has, and minor number that equals to
    579      * sum of logic disk partition number and the minor number of physical disk
    580      */
    581 
    582     rtems_filesystem_split_dev_t (disk_desc->dev, major, minor);
    583 
    584573    /* create logical disks on the physical one */
    585574    for (part_num = 0; part_num < disk_desc->last_log_id; part_num++)
    586575    {
    587576        sprintf(name, "%s%d", dev_name, part_num + 1);
    588         dev = rtems_filesystem_make_dev_t(major, ++minor);
    589577
    590578        part_desc = disk_desc->partitions[part_num];
     
    594582        }
    595583
    596         rc = rtems_disk_create_log(dev, disk_desc->dev, part_desc->start,
    597                                    part_desc->size, name);
     584        rc = rtems_blkdev_create_partition(name, dev_name, part_desc->start,
     585                                           part_desc->size);
    598586        if (rc != RTEMS_SUCCESSFUL)
    599587        {
Note: See TracChangeset for help on using the changeset viewer.