Changeset 30c3898 in rtems


Ignore:
Timestamp:
Mar 3, 2018, 12:24:42 PM (20 months ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
c4d35fb
Parents:
9d62874
git-author:
Sebastian Huber <sebastian.huber@…> (03/03/18 12:24:42)
git-committer:
Sebastian Huber <sebastian.huber@…> (05/18/18 08:44:18)
Message:

libblock: Init deps in rtems_blkdev_create()

Update #3358.

Files:
3 edited

Legend:

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

    r9d62874 r30c3898  
    297297 * @retval RTEMS_NO_MEMORY Not enough memory.
    298298 * @retval RTEMS_UNSATISFIED Cannot create generic device node.
     299 * @retval RTEMS_INCORRECT_STATE Cannot initialize bdbuf.
    299300 *
    300301 * @see rtems_blkdev_create_partition(), rtems_bdbuf_set_block_size(), and
  • cpukit/libblock/src/blkdev-imfs.c

    r9d62874 r30c3898  
    77
    88/*
    9  * Copyright (c) 2012 embedded brains GmbH.  All rights reserved.
     9 * Copyright (c) 2012, 2018 embedded brains GmbH.  All rights reserved.
    1010 *
    1111 *  embedded brains GmbH
    12  *  Obere Lagerstr. 30
     12 *  Dornierstr. 4
    1313 *  82178 Puchheim
    1414 *  Germany
     
    280280)
    281281{
    282   rtems_status_code sc = RTEMS_SUCCESSFUL;
    283   rtems_blkdev_imfs_context *ctx = malloc(sizeof(*ctx));
    284 
     282  rtems_status_code sc;
     283  rtems_blkdev_imfs_context *ctx;
     284
     285  sc = rtems_bdbuf_init();
     286  if (sc != RTEMS_SUCCESSFUL) {
     287    return RTEMS_INCORRECT_STATE;
     288  }
     289
     290  ctx = malloc(sizeof(*ctx));
    285291  if (ctx != NULL) {
    286292    sc = rtems_disk_init_phys(
  • testsuites/libtests/block17/init.c

    r9d62874 r30c3898  
    11/*
    2  * Copyright (c) 2013 embedded brains GmbH.  All rights reserved.
     2 * Copyright (c) 2013, 2018 embedded brains GmbH.  All rights reserved.
    33 *
    44 *  embedded brains GmbH
     
    1818
    1919#include <rtems/bdbuf.h>
     20#include <rtems/blkdev.h>
    2021
    2122#include "tmacros.h"
     
    2526static void test(void)
    2627{
    27   rtems_status_code sc = rtems_bdbuf_init();
     28  rtems_status_code sc;
     29
     30  sc = rtems_bdbuf_init();
    2831  rtems_test_assert(sc == RTEMS_INVALID_NUMBER);
     32
     33  sc = rtems_blkdev_create(NULL, 0, 0, NULL, NULL);
     34  rtems_test_assert(sc == RTEMS_INCORRECT_STATE);
    2935}
    3036
Note: See TracChangeset for help on using the changeset viewer.