#1449 closed defect (fixed)

Incorrect implementation of rtems_disk_next() function of libblock library.

Reported by: Oleg Owned by: Chris Johns
Priority: lowest Milestone: 4.10
Component: lib/block Version: 4.10
Severity: trivial Keywords:
Cc: chrisj@…, nbkolchin@…, sebastian.huber@…, Oleg.Kravtsov@… Blocked By:
Blocking:

Description

As far as I can see rtems_disk_next() function defined in cpukit/libblock/src/diskdevs.c file assumes that dev_t is a signed integer, which is not good because dev_t should be treated as an abstract type.

rtems_disk_next() function assumes that we know how major and minor numerbs are packed (major is in MSB, and minor in LSB). This not good from portability point of view.

I would recommend to use macro rtems_filesystem_incr_dev_t(dev, amont) for such operations.

Also it woule be nice to use NODEV constant instead of -1 in cases when we start search.

Any opinion?

Attachments (1)

rtems_disk_next.c (2.3 KB) - added by Oleg on Oct 26, 2009 at 1:22:41 PM.
Proposed implementation of rtems_disk_next() function

Download all attachments as: .zip

Change History (12)

comment:1 Changed on Oct 8, 2009 at 5:02:07 PM by Oleg

Cc: Oleg added

comment:2 Changed on Oct 16, 2009 at 8:20:10 AM by Sebastian Huber

Cc: Sebastian Huber added

Changed on Oct 26, 2009 at 1:22:41 PM by Oleg

Attachment: rtems_disk_next.c added

Proposed implementation of rtems_disk_next() function

comment:3 Changed on Oct 26, 2009 at 1:24:35 PM by Oleg

Summary: The function rtems_filesystem_incr_dev_t(dev_t dev, uint32_t amout) is missingIncorrect implementation of rtems_disk_next() function of libblock library.

comment:4 Changed on Nov 2, 2009 at 8:52:37 AM by Oleg

Cc: Nickolay Semyonov-Kolchin added

comment:5 Changed on Nov 20, 2009 at 8:55:12 AM by Sebastian Huber

Cc: Chris Johns added

comment:6 Changed on Dec 4, 2009 at 6:03:39 PM by Joel Sherrill

Owner: changed from Joel Sherrill to Chris Johns

comment:7 Changed on May 14, 2010 at 3:31:07 AM by Chris Johns

attachments.ispatch: 01

comment:8 Changed on May 14, 2010 at 3:31:55 AM by Chris Johns

attachments.ispatch: 10

comment:9 Changed on May 15, 2010 at 7:04:47 AM by Chris Johns

Status: newassigned

comment:10 Changed on May 17, 2010 at 7:08:43 AM by Sebastian Huber

Resolution: fixed
Status: assignedclosed

Fixed in CVS.

comment:11 Changed on Oct 10, 2017 at 6:49:52 AM by Sebastian Huber

Component: scorelib/block
Note: See TracTickets for help on using tickets.