Changeset 7e3b5c0 in rtems


Ignore:
Timestamp:
Feb 29, 2020, 6:41:18 PM (4 months ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
5, master
Children:
fa3005f
Parents:
fa44c39
git-author:
Sebastian Huber <sebastian.huber@…> (02/29/20 18:41:18)
git-committer:
Sebastian Huber <sebastian.huber@…> (03/04/20 08:37:59)
Message:

console: Use IMFS_add_node() for simple console

Change license to BSD-2-Clause according to file history.

Update #3053.
Update #3894.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/libcsupport/src/consolesimple.c

    rfa44c39 r7e3b5c0  
     1/* SPDX-License-Identifier: BSD-2-Clause */
     2
    13/*
    2  * Copyright (c) 2017 embedded brains GmbH.  All rights reserved.
     4 * Copyright (C) 2017, 2020 embedded brains GmbH (http://www.embedded-brains.de)
    35 *
    4  *  embedded brains GmbH
    5  *  Dornierstr. 4
    6  *  82178 Puchheim
    7  *  Germany
    8  *  <rtems@embedded-brains.de>
     6 * Redistribution and use in source and binary forms, with or without
     7 * modification, are permitted provided that the following conditions
     8 * are met:
     9 * 1. Redistributions of source code must retain the above copyright
     10 *    notice, this list of conditions and the following disclaimer.
     11 * 2. Redistributions in binary form must reproduce the above copyright
     12 *    notice, this list of conditions and the following disclaimer in the
     13 *    documentation and/or other materials provided with the distribution.
    914 *
    10  * The license and distribution terms for this file may be
    11  * found in the file LICENSE in this distribution or at
    12  * http://www.rtems.org/license/LICENSE.
     15 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
     16 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     17 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     18 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
     19 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     20 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     21 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     22 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     23 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     24 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
     25 * POSSIBILITY OF SUCH DAMAGE.
    1326 */
     27
     28#if HAVE_CONFIG_H
     29#include "config.h"
     30#endif
    1431
    1532#include <rtems/console.h>
     
    5774
    5875static const IMFS_node_control
    59 _Console_simple_Node_control = IMFS_GENERIC_INITIALIZER(
     76_Console_simple_Node_control = IMFS_NODE_CONTROL_INITIALIZER(
    6077  &_Console_simple_Handlers,
    6178  IMFS_node_initialize_default,
    62   IMFS_node_destroy_default
     79  IMFS_do_nothing_destroy
     80);
     81
     82static const char _Console_simple_Name[] = "console";
     83
     84static IMFS_jnode_t _Console_simple_Node = IMFS_NODE_INITIALIZER(
     85  &_Console_simple_Node_control,
     86  _Console_simple_Name,
     87  sizeof( _Console_simple_Name ) - 1,
     88  S_IFCHR | S_IRWXU | S_IRWXG | S_IRWXO
    6389);
    6490
    6591void _Console_simple_Initialize( void )
    6692{
    67   IMFS_make_generic_node(
    68     CONSOLE_DEVICE_NAME,
    69     S_IFCHR | S_IRWXU | S_IRWXG | S_IRWXO,
    70     &_Console_simple_Node_control,
    71     NULL
    72   );
     93  IMFS_add_node( "/dev", &_Console_simple_Node, NULL );
    7394}
Note: See TracChangeset for help on using the changeset viewer.