[PATCH] New fstest to check rename POSIX conformance

Sebastian Huber sebastian.huber at embedded-brains.de
Fri Feb 21 13:43:14 UTC 2014


On 2014-02-21 14:38, Andre Marques wrote:
>>> I tried to create a ramdisk as in
>>>
>>> http://www.rtems.org/onlinedocs/doxygen/cpukit/html/group__rtems__ramdisk.html#gac6c99eed9f3b92bb4cf5184b25972e65
>>>
>>>
>>>
>>> but the program exits during the rtems_blkdev_create() call, if I use
>>> "/dev/rda" as the device path.
>>
>> How does the code look like?
>
> With
>
>    rtems_status_code sc;
>    ramdisk *rd;
>
>    const char device [] = "/dev/rda";
>    uint32_t media_block_size = 512;
>    rtems_blkdev_bnum media_block_count = 4000;

So this are 2048000 bytes.  Has your target this amount of RAM?

>
>     rd = ramdisk_allocate(NULL, media_block_size, media_block_count, false);
>     if (rd != NULL) {
>       sc = rtems_blkdev_create(
>         device,
>         media_block_size,
>         media_block_count,
>         ramdisk_ioctl,
>         rd);
>
>       perror("rtems_blkdev_create -> ");
>     }
>
>   the program just exits without giving any reason before the perror() call. I
> assumed it was because the /dev directory wasn't there, so I created the /dev
> directory before the rtems_blkdev_create() call and then it gives
>
> rtems_blkdev_create -> : Not supported

You get a status code as the return value.  Use something like this

assert(sc == RTEMS_SUCCESSFUL)

-- 
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax     : +49 89 189 47 41-09
E-Mail  : sebastian.huber at embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.



More information about the devel mailing list