mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-09-03 18:11:24 +08:00
Merge branch 'master' of ssh://git.rtems.org/data/git/rtems
This commit is contained in:
@@ -92,6 +92,11 @@ extern "C" {
|
||||
}
|
||||
#endif
|
||||
|
||||
static void lpc_eth_config_module_disable(void)
|
||||
{
|
||||
lpc24xx_module_disable(LPC24XX_MODULE_ETHERNET);
|
||||
}
|
||||
|
||||
static char *lpc_eth_config_alloc_table_area(size_t size)
|
||||
{
|
||||
if (size < LPC24XX_ETH_RAM_SIZE) {
|
||||
|
||||
@@ -137,6 +137,7 @@ libbsp_a_SOURCES += misc/restart.c
|
||||
libbsp_a_SOURCES += misc/system-clocks.c
|
||||
libbsp_a_SOURCES += misc/timer.c
|
||||
libbsp_a_SOURCES += misc/nand-select.c
|
||||
libbsp_a_SOURCES += misc/idle-thread.c
|
||||
|
||||
# SSP
|
||||
|
||||
|
||||
@@ -28,14 +28,14 @@
|
||||
|
||||
extern console_fns lpc32xx_hsu_fns;
|
||||
|
||||
static uint8_t lpc32xx_uart_get_register(uint32_t addr, uint8_t i)
|
||||
static uint8_t lpc32xx_uart_get_register(uintptr_t addr, uint8_t i)
|
||||
{
|
||||
volatile uint32_t *reg = (volatile uint32_t *) addr;
|
||||
|
||||
return (uint8_t) reg [i];
|
||||
}
|
||||
|
||||
static void lpc32xx_uart_set_register(uint32_t addr, uint8_t i, uint8_t val)
|
||||
static void lpc32xx_uart_set_register(uintptr_t addr, uint8_t i, uint8_t val)
|
||||
{
|
||||
volatile uint32_t *reg = (volatile uint32_t *) addr;
|
||||
|
||||
@@ -47,6 +47,7 @@ static void lpc32xx_uart_set_register(uint32_t addr, uint8_t i, uint8_t val)
|
||||
{
|
||||
LPC32XX_UARTCLK_CTRL |= 1U << 0;
|
||||
LPC32XX_U3CLK = LPC32XX_CONFIG_U3CLK;
|
||||
LPC32XX_UART_CLKMODE = BSP_FLD32SET(LPC32XX_UART_CLKMODE, 0x2, 4, 5);
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -55,8 +56,17 @@ static void lpc32xx_uart_set_register(uint32_t addr, uint8_t i, uint8_t val)
|
||||
#ifdef LPC32XX_UART_4_BAUD
|
||||
static bool lpc32xx_uart_probe_4(int minor)
|
||||
{
|
||||
volatile lpc32xx_gpio *gpio = &lpc32xx.gpio;
|
||||
|
||||
/*
|
||||
* Set GPO_21/U4_TX/LCDVD[3] to U4_TX. This works only if LCD module is
|
||||
* disabled.
|
||||
*/
|
||||
gpio->p2_mux_set = BSP_BIT32(2);
|
||||
|
||||
LPC32XX_UARTCLK_CTRL |= 1U << 1;
|
||||
LPC32XX_U4CLK = LPC32XX_CONFIG_U4CLK;
|
||||
LPC32XX_UART_CLKMODE = BSP_FLD32SET(LPC32XX_UART_CLKMODE, 0x2, 6, 7);
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -67,6 +77,7 @@ static void lpc32xx_uart_set_register(uint32_t addr, uint8_t i, uint8_t val)
|
||||
{
|
||||
LPC32XX_UARTCLK_CTRL |= 1U << 3;
|
||||
LPC32XX_U6CLK = LPC32XX_CONFIG_U6CLK;
|
||||
LPC32XX_UART_CLKMODE = BSP_FLD32SET(LPC32XX_UART_CLKMODE, 0x2, 10, 11);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -149,6 +149,10 @@ void lpc32xx_select_nand_controller(lpc32xx_nand_controller nand_controller);
|
||||
|
||||
void bsp_restart(void *addr);
|
||||
|
||||
void *bsp_idle_thread(uintptr_t arg);
|
||||
|
||||
#define BSP_IDLE_TASK_BODY bsp_idle_thread
|
||||
|
||||
#define BSP_CONSOLE_UART_BASE LPC32XX_BASE_UART_5
|
||||
|
||||
/**
|
||||
|
||||
@@ -71,6 +71,11 @@ extern "C" {
|
||||
}
|
||||
#endif
|
||||
|
||||
static void lpc_eth_config_module_disable(void)
|
||||
{
|
||||
LPC32XX_MAC_CLK_CTRL = 0;
|
||||
}
|
||||
|
||||
#define LPC_ETH_CONFIG_USE_TRANSMIT_DMA
|
||||
|
||||
static char *lpc_eth_config_alloc_table_area(size_t size)
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @ingroup lpc32xx
|
||||
*
|
||||
* @brief bsp_idle_thread() implementation.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (c) 2012 embedded brains GmbH. All rights reserved.
|
||||
*
|
||||
* embedded brains GmbH
|
||||
* Obere Lagerstr. 30
|
||||
* 82178 Puchheim
|
||||
* Germany
|
||||
* <rtems@embedded-brains.de>
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
* found in the file LICENSE in this distribution or at
|
||||
* http://www.rtems.com/license/LICENSE.
|
||||
*/
|
||||
|
||||
#include <bsp.h>
|
||||
|
||||
#include <libcpu/arm-cp15.h>
|
||||
|
||||
void *bsp_idle_thread(uintptr_t arg)
|
||||
{
|
||||
while (true) {
|
||||
arm_cp15_wait_for_interrupt();
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
@@ -269,6 +269,7 @@ static BSP_START_TEXT_SECTION void setup_uarts(void)
|
||||
#ifdef LPC32XX_UART_5_BAUD
|
||||
LPC32XX_UARTCLK_CTRL |= 1U << 2;
|
||||
LPC32XX_U5CLK = LPC32XX_CONFIG_U5CLK;
|
||||
LPC32XX_UART_CLKMODE = BSP_FLD32SET(LPC32XX_UART_CLKMODE, 0x2, 8, 9);
|
||||
BSP_CONSOLE_UART_INIT(0x01);
|
||||
#endif
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Vendored
+6
-2
@@ -4,7 +4,7 @@
|
||||
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
|
||||
# 2011, 2012 Free Software Foundation, Inc.
|
||||
|
||||
timestamp='2012-10-10'
|
||||
timestamp='2012-12-06'
|
||||
|
||||
# This file is (in principle) common to ALL GNU software.
|
||||
# The presence of a machine in this file suggests that SOME GNU software
|
||||
@@ -1026,7 +1026,11 @@ case $basic_machine in
|
||||
basic_machine=i586-unknown
|
||||
os=-pw32
|
||||
;;
|
||||
rdos)
|
||||
rdos | rdos64)
|
||||
basic_machine=x86_64-pc
|
||||
os=-rdos
|
||||
;;
|
||||
rdos32)
|
||||
basic_machine=i386-pc
|
||||
os=-rdos
|
||||
;;
|
||||
|
||||
@@ -154,7 +154,7 @@ typedef struct rtems_blkdev_request {
|
||||
* @param[in,out] req The transfer request.
|
||||
* @param[in] status The status of the operation should be
|
||||
* - @c RTEMS_SUCCESSFUL, if the operation was successful,
|
||||
* - @c RTEMS_IO_ERROR, if some sort of input or output error occured, or
|
||||
* - @c RTEMS_IO_ERROR, if some sort of input or output error occurred, or
|
||||
* - @c RTEMS_UNSATISFIED, if media is no more present.
|
||||
*/
|
||||
static inline void rtems_blkdev_request_done(
|
||||
|
||||
@@ -85,6 +85,9 @@ const char *rtems_assoc_name_by_local(
|
||||
uint32_t
|
||||
);
|
||||
|
||||
/**
|
||||
* @brief RTEMS Associate Name by Remote
|
||||
*/
|
||||
const char *rtems_assoc_name_by_remote(
|
||||
const rtems_assoc_t *,
|
||||
uint32_t
|
||||
|
||||
@@ -56,6 +56,12 @@ Heap_Control *malloc_get_heap_pointer( void );
|
||||
extern void libc_init(void);
|
||||
extern int host_errno(void);
|
||||
extern void fix_syscall_errno(void);
|
||||
|
||||
/**
|
||||
* @brief RTEMS Malloc Get Free Information
|
||||
*
|
||||
* Find amount of free heap remaining
|
||||
*/
|
||||
extern size_t malloc_free_space(void);
|
||||
extern void open_dev_console(void);
|
||||
|
||||
|
||||
@@ -4,6 +4,10 @@
|
||||
* @ingroup LibIO
|
||||
*
|
||||
* @brief Basic IO API.
|
||||
*
|
||||
* This file contains the support infrastructure used to manage the
|
||||
* table of integer style file descriptors used by the low level
|
||||
* POSIX system calls like open(), read, fstat(), etc.
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -172,7 +176,7 @@ typedef void (*rtems_filesystem_eval_path_t)(
|
||||
* @param[in] namelen Length of the name for the new link in characters.
|
||||
*
|
||||
* @retval 0 Successful operation.
|
||||
* @retval -1 An error occured. The errno is set to indicate the error.
|
||||
* @retval -1 An error occurred. The errno is set to indicate the error.
|
||||
*
|
||||
* @see rtems_filesystem_default_link().
|
||||
*/
|
||||
@@ -190,7 +194,7 @@ typedef int (*rtems_filesystem_link_t)(
|
||||
* @param[in] mode The new mode of the node
|
||||
*
|
||||
* @retval 0 Successful operation.
|
||||
* @retval -1 An error occured. The errno is set to indicate the error.
|
||||
* @retval -1 An error occurred. The errno is set to indicate the error.
|
||||
*
|
||||
* @see rtems_filesystem_default_fchmod().
|
||||
*/
|
||||
@@ -207,7 +211,7 @@ typedef int (*rtems_filesystem_fchmod_t)(
|
||||
* @param[in] group Group ID for the node.
|
||||
*
|
||||
* @retval 0 Successful operation.
|
||||
* @retval -1 An error occured. The errno is set to indicate the error.
|
||||
* @retval -1 An error occurred. The errno is set to indicate the error.
|
||||
*
|
||||
* @see rtems_filesystem_default_chown().
|
||||
*/
|
||||
@@ -228,7 +232,7 @@ typedef int (*rtems_filesystem_chown_t)(
|
||||
* @param[in, out] loc Location to clone.
|
||||
*
|
||||
* @retval 0 Successful operation.
|
||||
* @retval -1 An error occured. The errno is set to indicate the error.
|
||||
* @retval -1 An error occurred. The errno is set to indicate the error.
|
||||
*
|
||||
* @see rtems_filesystem_default_clonenode().
|
||||
*/
|
||||
@@ -259,7 +263,7 @@ typedef void (*rtems_filesystem_freenode_t)(
|
||||
* @param[in] mt_entry The mount table entry.
|
||||
*
|
||||
* @retval 0 Successful operation.
|
||||
* @retval -1 An error occured. The errno is set to indicate the error.
|
||||
* @retval -1 An error occurred. The errno is set to indicate the error.
|
||||
*
|
||||
* @see rtems_filesystem_default_mount().
|
||||
*/
|
||||
@@ -277,7 +281,7 @@ typedef int (*rtems_filesystem_mount_t) (
|
||||
* @param[in] data The data provided by the user.
|
||||
*
|
||||
* @retval 0 Successful operation.
|
||||
* @retval -1 An error occured. The errno is set to indicate the error.
|
||||
* @retval -1 An error occurred. The errno is set to indicate the error.
|
||||
*/
|
||||
typedef int (*rtems_filesystem_fsmount_me_t)(
|
||||
rtems_filesystem_mount_table_entry_t *mt_entry,
|
||||
@@ -294,7 +298,7 @@ typedef int (*rtems_filesystem_fsmount_me_t)(
|
||||
* @param[in] mt_entry The mount table entry.
|
||||
*
|
||||
* @retval 0 Successful operation.
|
||||
* @retval -1 An error occured. The errno is set to indicate the error.
|
||||
* @retval -1 An error occurred. The errno is set to indicate the error.
|
||||
*
|
||||
* @see rtems_filesystem_default_unmount().
|
||||
*/
|
||||
@@ -361,7 +365,7 @@ typedef rtems_filesystem_node_types_t (*rtems_filesystem_node_type_t)(
|
||||
* @param[in] dev Optional device identifier for the new node.
|
||||
*
|
||||
* @retval 0 Successful operation.
|
||||
* @retval -1 An error occured. The errno is set to indicate the error.
|
||||
* @retval -1 An error occurred. The errno is set to indicate the error.
|
||||
*
|
||||
* @see rtems_filesystem_default_mknod().
|
||||
*/
|
||||
@@ -380,7 +384,7 @@ typedef int (*rtems_filesystem_mknod_t)(
|
||||
* @param[in] loc The location of the node.
|
||||
*
|
||||
* @retval 0 Successful operation.
|
||||
* @retval -1 An error occured. The errno is set to indicate the error.
|
||||
* @retval -1 An error occurred. The errno is set to indicate the error.
|
||||
*
|
||||
* @see rtems_filesystem_default_rmnod().
|
||||
*/
|
||||
@@ -397,7 +401,7 @@ typedef int (*rtems_filesystem_rmnod_t)(
|
||||
* @param[in] modtime Modification for the node.
|
||||
*
|
||||
* @retval 0 Successful operation.
|
||||
* @retval -1 An error occured. The errno is set to indicate the error.
|
||||
* @retval -1 An error occurred. The errno is set to indicate the error.
|
||||
*
|
||||
* @see rtems_filesystem_default_utime().
|
||||
*/
|
||||
@@ -417,7 +421,7 @@ typedef int (*rtems_filesystem_utime_t)(
|
||||
* @param[in] target Contents for the symbolic link.
|
||||
*
|
||||
* @retval 0 Successful operation.
|
||||
* @retval -1 An error occured. The errno is set to indicate the error.
|
||||
* @retval -1 An error occurred. The errno is set to indicate the error.
|
||||
*
|
||||
* @see rtems_filesystem_default_symlink().
|
||||
*/
|
||||
@@ -436,7 +440,7 @@ typedef int (*rtems_filesystem_symlink_t)(
|
||||
* @param[in] bufsize The size of the buffer in characters.
|
||||
*
|
||||
* @retval non-negative Size of the actual contents in characters.
|
||||
* @retval -1 An error occured. The errno is set to indicate the error.
|
||||
* @retval -1 An error occurred. The errno is set to indicate the error.
|
||||
*
|
||||
* @see rtems_filesystem_default_readlink().
|
||||
*/
|
||||
@@ -456,7 +460,7 @@ typedef ssize_t (*rtems_filesystem_readlink_t)(
|
||||
* @param[in] namelen Length of the name for the new node in characters.
|
||||
*
|
||||
* @retval 0 Successful operation.
|
||||
* @retval -1 An error occured. The errno is set to indicate the error.
|
||||
* @retval -1 An error occurred. The errno is set to indicate the error.
|
||||
*
|
||||
* @see rtems_filesystem_default_rename().
|
||||
*/
|
||||
@@ -475,7 +479,7 @@ typedef int (*rtems_filesystem_rename_t)(
|
||||
* @param[out] buf Buffer for file system information.
|
||||
*
|
||||
* @retval 0 Successful operation.
|
||||
* @retval -1 An error occured. The errno is set to indicate the error.
|
||||
* @retval -1 An error occurred. The errno is set to indicate the error.
|
||||
*
|
||||
* @see rtems_filesystem_default_statvfs().
|
||||
*/
|
||||
@@ -758,7 +762,7 @@ int rtems_filesystem_default_statvfs(
|
||||
* @param[in] mode Optional mode for node creation.
|
||||
*
|
||||
* @retval 0 Successful operation.
|
||||
* @retval -1 An error occured. The errno is set to indicate the error.
|
||||
* @retval -1 An error occurred. The errno is set to indicate the error.
|
||||
*
|
||||
* @see rtems_filesystem_default_open().
|
||||
*/
|
||||
@@ -775,7 +779,7 @@ typedef int (*rtems_filesystem_open_t)(
|
||||
* @param[in, out] iop The IO pointer.
|
||||
*
|
||||
* @retval 0 Successful operation.
|
||||
* @retval -1 An error occured. The errno is set to indicate the error.
|
||||
* @retval -1 An error occurred. The errno is set to indicate the error.
|
||||
*
|
||||
* @see rtems_filesystem_default_close().
|
||||
*/
|
||||
@@ -793,7 +797,7 @@ typedef int (*rtems_filesystem_close_t)(
|
||||
* @param[in] count The size of the buffer in characters.
|
||||
*
|
||||
* @retval non-negative Count of read characters.
|
||||
* @retval -1 An error occured. The errno is set to indicate the error.
|
||||
* @retval -1 An error occurred. The errno is set to indicate the error.
|
||||
*
|
||||
* @see rtems_filesystem_default_read().
|
||||
*/
|
||||
@@ -813,7 +817,7 @@ typedef ssize_t (*rtems_filesystem_read_t)(
|
||||
* @param[in] count The size of the buffer in characters.
|
||||
*
|
||||
* @retval non-negative Count of written characters.
|
||||
* @retval -1 An error occured. The errno is set to indicate the error.
|
||||
* @retval -1 An error occurred. The errno is set to indicate the error.
|
||||
*
|
||||
* @see rtems_filesystem_default_write().
|
||||
*/
|
||||
@@ -831,7 +835,7 @@ typedef ssize_t (*rtems_filesystem_write_t)(
|
||||
* @param[in, out] buffer The buffer for IO control request data.
|
||||
*
|
||||
* @retval 0 Successful operation.
|
||||
* @retval -1 An error occured. The errno is set to indicate the error.
|
||||
* @retval -1 An error occurred. The errno is set to indicate the error.
|
||||
*
|
||||
* @see rtems_filesystem_default_ioctl().
|
||||
*/
|
||||
@@ -849,7 +853,7 @@ typedef int (*rtems_filesystem_ioctl_t)(
|
||||
* @param[in] whence The reference position for the offset.
|
||||
*
|
||||
* @retval non-negative The new offset from the beginning of the file.
|
||||
* @retval -1 An error occured. The errno is set to indicate the error.
|
||||
* @retval -1 An error occurred. The errno is set to indicate the error.
|
||||
*
|
||||
* @see rtems_filesystem_default_lseek(),
|
||||
* rtems_filesystem_default_lseek_file(), and
|
||||
@@ -868,7 +872,7 @@ typedef off_t (*rtems_filesystem_lseek_t)(
|
||||
* @param[out] stat The buffer to status information.
|
||||
*
|
||||
* @retval 0 Successful operation.
|
||||
* @retval -1 An error occured. The errno is set to indicate the error.
|
||||
* @retval -1 An error occurred. The errno is set to indicate the error.
|
||||
*
|
||||
* @see rtems_filesystem_default_fstat().
|
||||
*/
|
||||
@@ -884,7 +888,7 @@ typedef int (*rtems_filesystem_fstat_t)(
|
||||
* @param[in] length The new length in characters.
|
||||
*
|
||||
* @retval 0 Successful operation.
|
||||
* @retval -1 An error occured. The errno is set to indicate the error.
|
||||
* @retval -1 An error occurred. The errno is set to indicate the error.
|
||||
*
|
||||
* @see rtems_filesystem_default_ftruncate() and
|
||||
* rtems_filesystem_default_ftruncate_directory().
|
||||
@@ -900,7 +904,7 @@ typedef int (*rtems_filesystem_ftruncate_t)(
|
||||
* @param[in, out] iop The IO pointer.
|
||||
*
|
||||
* @retval 0 Successful operation.
|
||||
* @retval -1 An error occured. The errno is set to indicate the error.
|
||||
* @retval -1 An error occurred. The errno is set to indicate the error.
|
||||
*
|
||||
* @see rtems_filesystem_default_fsync_or_fdatasync() and
|
||||
* rtems_filesystem_default_fsync_or_fdatasync_success().
|
||||
@@ -915,7 +919,7 @@ typedef int (*rtems_filesystem_fsync_t)(
|
||||
* @param[in, out] iop The IO pointer.
|
||||
*
|
||||
* @retval 0 Successful operation.
|
||||
* @retval -1 An error occured. The errno is set to indicate the error.
|
||||
* @retval -1 An error occurred. The errno is set to indicate the error.
|
||||
*
|
||||
* @see rtems_filesystem_default_fsync_or_fdatasync() and
|
||||
* rtems_filesystem_default_fsync_or_fdatasync_success().
|
||||
@@ -931,7 +935,7 @@ typedef int (*rtems_filesystem_fdatasync_t)(
|
||||
* @param[in] cmd Control command.
|
||||
*
|
||||
* @retval 0 Successful operation.
|
||||
* @retval errno An error occured. This value is assigned to errno.
|
||||
* @retval errno An error occurred. This value is assigned to errno.
|
||||
*
|
||||
* @see rtems_filesystem_default_fcntl().
|
||||
*/
|
||||
@@ -1053,7 +1057,7 @@ off_t rtems_filesystem_default_lseek_directory(
|
||||
*
|
||||
* This function has no protection against concurrent access.
|
||||
*
|
||||
* @retval -1 An error occured. In case an integer overflow occured, then the
|
||||
* @retval -1 An error occurred. In case an integer overflow occurred, then the
|
||||
* errno will be set to EOVERFLOW. In case the new offset is negative, then
|
||||
* the errno will be set to EINVAL. In case the whence is SEEK_END and the
|
||||
* fstat() handler to obtain the current file size returned an error status,
|
||||
@@ -1176,9 +1180,9 @@ typedef struct {
|
||||
} rtems_filesystem_limits_and_options_t;
|
||||
|
||||
/**
|
||||
* @brief Default Pathconf Settings
|
||||
* @brief Default pathconf settings.
|
||||
*
|
||||
* Override in a filesystem.
|
||||
* Override in a filesystem.
|
||||
*/
|
||||
extern const rtems_filesystem_limits_and_options_t
|
||||
rtems_filesystem_default_pathconf;
|
||||
@@ -1251,6 +1255,11 @@ typedef struct {
|
||||
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* @brief RTEMS LibIO Initialization
|
||||
*
|
||||
* Called by BSP startup code to initialize the libio subsystem.
|
||||
*/
|
||||
void rtems_libio_init(void);
|
||||
|
||||
/**
|
||||
@@ -1401,7 +1410,7 @@ extern rtems_fs_init_functions_t rtems_fs_init_helper;
|
||||
* The @a mode value selects the access permissions of the directory.
|
||||
*
|
||||
* @retval 0 Successful operation.
|
||||
* @retval -1 An error occured. The @c errno indicates the error.
|
||||
* @retval -1 An error occurred. The @c errno indicates the error.
|
||||
*/
|
||||
extern int rtems_mkdir(const char *path, mode_t mode);
|
||||
|
||||
@@ -1509,7 +1518,7 @@ extern rtems_chain_control rtems_filesystem_mount_table;
|
||||
* The @a mount_h handler will be used to mount a file system of this @a type.
|
||||
*
|
||||
* @retval 0 Successful operation.
|
||||
* @retval -1 An error occured. The @c errno indicates the error.
|
||||
* @retval -1 An error occurred. The @c errno indicates the error.
|
||||
*/
|
||||
int rtems_filesystem_register(
|
||||
const char *type,
|
||||
@@ -1520,7 +1529,7 @@ int rtems_filesystem_register(
|
||||
* @brief Unregisters a file system @a type.
|
||||
*
|
||||
* @retval 0 Successful operation.
|
||||
* @retval -1 An error occured. The @c errno indicates the error.
|
||||
* @retval -1 An error occurred. The @c errno indicates the error.
|
||||
*/
|
||||
int rtems_filesystem_unregister(
|
||||
const char *type
|
||||
@@ -1542,7 +1551,7 @@ int rtems_filesystem_unregister(
|
||||
* unpredictable effects.
|
||||
*
|
||||
* @retval 0 Successful operation.
|
||||
* @retval -1 An error occured. The @c errno indicates the error.
|
||||
* @retval -1 An error occurred. The @c errno indicates the error.
|
||||
*
|
||||
* @see ClassicEventTransient.
|
||||
*/
|
||||
@@ -1551,38 +1560,38 @@ int unmount(
|
||||
);
|
||||
|
||||
/**
|
||||
* @brief Mounts a File System
|
||||
* @brief Mounts a file system at @a target.
|
||||
*
|
||||
* The @a source may be a path to the corresponding device file, or @c NULL.
|
||||
* The @a target path must lead to an existing directory, or @c NULL.
|
||||
* In case @a target is @c NULL, the root file system will be mounted.
|
||||
* The @a data parameter will be forwarded to the file system
|
||||
* initialization handler. The file system type is selected by
|
||||
* @a filesystemtype and may be one of
|
||||
* - RTEMS_FILESYSTEM_TYPE_DEVFS,
|
||||
* - RTEMS_FILESYSTEM_TYPE_DOSFS,
|
||||
* - RTEMS_FILESYSTEM_TYPE_FTPFS,
|
||||
* - RTEMS_FILESYSTEM_TYPE_IMFS,
|
||||
* - RTEMS_FILESYSTEM_TYPE_MINIIMFS,
|
||||
* - RTEMS_FILESYSTEM_TYPE_NFS,
|
||||
* - RTEMS_FILESYSTEM_TYPE_RFS, or
|
||||
* - RTEMS_FILESYSTEM_TYPE_TFTPFS.
|
||||
* The @a source may be a path to the corresponding device file, or @c NULL.
|
||||
* The @a target path must lead to an existing directory, or @c NULL.
|
||||
* In case @a target is @c NULL, the root file system will be mounted.
|
||||
* The @a data parameter will be forwarded to the file system
|
||||
* initialization handler. The file system type is selected by
|
||||
* @a filesystemtype and may be one of
|
||||
* - RTEMS_FILESYSTEM_TYPE_DEVFS,
|
||||
* - RTEMS_FILESYSTEM_TYPE_DOSFS,
|
||||
* - RTEMS_FILESYSTEM_TYPE_FTPFS,
|
||||
* - RTEMS_FILESYSTEM_TYPE_IMFS,
|
||||
* - RTEMS_FILESYSTEM_TYPE_MINIIMFS,
|
||||
* - RTEMS_FILESYSTEM_TYPE_NFS,
|
||||
* - RTEMS_FILESYSTEM_TYPE_RFS, or
|
||||
* - RTEMS_FILESYSTEM_TYPE_TFTPFS.
|
||||
*
|
||||
* Only configured or registered file system types are available.
|
||||
* You can add file system types to your application configuration with
|
||||
* - CONFIGURE_FILESYSTEM_DEVFS,
|
||||
* - CONFIGURE_FILESYSTEM_DOSFS,
|
||||
* - CONFIGURE_FILESYSTEM_FTPFS,
|
||||
* - CONFIGURE_FILESYSTEM_IMFS,
|
||||
* - CONFIGURE_FILESYSTEM_MINIIMFS,
|
||||
* - CONFIGURE_FILESYSTEM_NFS,
|
||||
* - CONFIGURE_FILESYSTEM_RFS, and
|
||||
* - CONFIGURE_FILESYSTEM_TFTPFS.
|
||||
* Only configured or registered file system types are available.
|
||||
* You can add file system types to your application configuration with
|
||||
* - CONFIGURE_FILESYSTEM_DEVFS,
|
||||
* - CONFIGURE_FILESYSTEM_DOSFS,
|
||||
* - CONFIGURE_FILESYSTEM_FTPFS,
|
||||
* - CONFIGURE_FILESYSTEM_IMFS,
|
||||
* - CONFIGURE_FILESYSTEM_MINIIMFS,
|
||||
* - CONFIGURE_FILESYSTEM_NFS,
|
||||
* - CONFIGURE_FILESYSTEM_RFS, and
|
||||
* - CONFIGURE_FILESYSTEM_TFTPFS.
|
||||
*
|
||||
* @see rtems_filesystem_register() and mount_and_make_target_path().
|
||||
* @see rtems_filesystem_register() and mount_and_make_target_path().
|
||||
*
|
||||
* @retval 0 Successful operation.
|
||||
* @retval -1 An error occured. The @c errno indicates the error.
|
||||
* @retval 0 Successful operation.
|
||||
* @retval -1 An error occurred. The @c errno indicates the error.
|
||||
*/
|
||||
int mount(
|
||||
const char *source,
|
||||
@@ -1601,7 +1610,7 @@ int mount(
|
||||
* @see mount().
|
||||
*
|
||||
* @retval 0 Successful operation.
|
||||
* @retval -1 An error occured. The @c errno indicates the error.
|
||||
* @retval -1 An error occurred. The @c errno indicates the error.
|
||||
*/
|
||||
int mount_and_make_target_path(
|
||||
const char *source,
|
||||
|
||||
@@ -179,14 +179,14 @@ extern rtems_filesystem_global_location_t rtems_filesystem_global_location_null;
|
||||
rtems_libio_check_permissions_with_error(_iop, _flag, EINVAL )
|
||||
|
||||
/**
|
||||
* @brief Clones a Node
|
||||
* @brief Clones a node.
|
||||
*
|
||||
* The caller must hold the file system instance lock.
|
||||
* The caller must hold the file system instance lock.
|
||||
*
|
||||
* @param[out] clone The cloned location.
|
||||
* @param[in] master The master location.
|
||||
* @param[out] clone The cloned location.
|
||||
* @param[in] master The master location.
|
||||
*
|
||||
* @see rtems_filesystem_instance_lock().
|
||||
* @see rtems_filesystem_instance_lock().
|
||||
*/
|
||||
void rtems_filesystem_location_clone(
|
||||
rtems_filesystem_location_info_t *clone,
|
||||
@@ -276,12 +276,26 @@ static inline void rtems_filesystem_instance_unlock(
|
||||
* File Descriptor Routine Prototypes
|
||||
*/
|
||||
|
||||
/**
|
||||
* This routine searches the IOP Table for an unused entry. If it
|
||||
* finds one, it returns it. Otherwise, it returns NULL.
|
||||
*/
|
||||
rtems_libio_t *rtems_libio_allocate(void);
|
||||
|
||||
/**
|
||||
* Convert UNIX fnctl(2) flags to ones that RTEMS drivers understand
|
||||
*/
|
||||
uint32_t rtems_libio_fcntl_flags( int fcntl_flags );
|
||||
|
||||
/**
|
||||
* Convert RTEMS internal flags to UNIX fnctl(2) flags
|
||||
*/
|
||||
int rtems_libio_to_fcntl_flags( uint32_t flags );
|
||||
|
||||
/**
|
||||
* This routine frees the resources associated with an IOP (file descriptor)
|
||||
* and clears the slot in the IOP Table.
|
||||
*/
|
||||
void rtems_libio_free(
|
||||
rtems_libio_t *iop
|
||||
);
|
||||
@@ -776,7 +790,7 @@ void rtems_filesystem_eval_path_error(
|
||||
* @brief Checks that the locations exist in the same file system instance.
|
||||
*
|
||||
* @retval 0 The locations exist and are in the same file system instance.
|
||||
* @retval -1 An error occured. The @c errno indicates the error.
|
||||
* @retval -1 An error occurred. The @c errno indicates the error.
|
||||
*/
|
||||
int rtems_filesystem_location_exists_in_same_instance_as(
|
||||
const rtems_filesystem_location_info_t *a,
|
||||
|
||||
@@ -110,7 +110,7 @@ typedef void (*rtems_malloc_dirtier_t)(void *, size_t);
|
||||
extern rtems_malloc_dirtier_t rtems_malloc_dirty_helper;
|
||||
|
||||
/**
|
||||
* @brief Dirty memory function
|
||||
* @brief Dirty Memory Function
|
||||
*
|
||||
* This method fills the specified area with a non-zero pattern
|
||||
* to aid in debugging programs which do not initialize their
|
||||
|
||||
@@ -3,7 +3,9 @@
|
||||
*
|
||||
* @brief POSIX termios implementation for RTEMS console device driver.
|
||||
*
|
||||
* http://pubs.opengroup.org/onlinepubs/009604599/basedefs/termios.h.html
|
||||
* The Open Group Base Specifications Issue 6
|
||||
* IEEE Std 1003.1, 2004 Edition
|
||||
* Chapter 11, General Terminal Interface
|
||||
*/
|
||||
|
||||
/*
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
/*
|
||||
* gettimeofday() - SVR4 and BSD4.3 extension required by Newlib
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @brief Get the Date and Time
|
||||
* @ingroup libcsupport
|
||||
*/
|
||||
|
||||
/*
|
||||
* COPYRIGHT (c) 1989-2007.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
@@ -22,8 +27,11 @@
|
||||
#include <rtems/seterr.h>
|
||||
|
||||
#if defined(RTEMS_NEWLIB) && !defined(HAVE_GETTIMEOFDAY)
|
||||
/*
|
||||
* NOTE: The solaris gettimeofday does not have a second parameter.
|
||||
|
||||
/**
|
||||
* SVR4 and BSD4.3 extension required by Newlib
|
||||
*
|
||||
* @note The solaris gettimeofday does not have a second parameter.
|
||||
*/
|
||||
int gettimeofday(
|
||||
struct timeval *tp,
|
||||
@@ -54,7 +62,7 @@ int gettimeofday(
|
||||
|
||||
#include <sys/reent.h>
|
||||
|
||||
/*
|
||||
/**
|
||||
* "Reentrant" version
|
||||
*/
|
||||
int _gettimeofday_r(
|
||||
@@ -68,10 +76,10 @@ int _gettimeofday_r(
|
||||
#endif
|
||||
|
||||
#if defined(RTEMS_NEWLIB) && !defined(HAVE__GETTIMEOFDAY)
|
||||
/*
|
||||
|
||||
/**
|
||||
* "System call" version
|
||||
*/
|
||||
|
||||
int _gettimeofday(
|
||||
struct timeval *tp,
|
||||
struct timezone *tzp
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
/*
|
||||
* times() - POSIX 1003.1b 4.5.2 - Get Process Times
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @brief Get Process Times
|
||||
* @ingroup libcsupport
|
||||
*/
|
||||
|
||||
/*
|
||||
* COPYRIGHT (c) 1989-2010.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
@@ -24,6 +29,9 @@
|
||||
#include <rtems/score/timestamp.h>
|
||||
#endif
|
||||
|
||||
/**
|
||||
* POSIX 1003.1b 4.5.2 - Get Process Times
|
||||
*/
|
||||
clock_t _times(
|
||||
struct tms *ptms
|
||||
)
|
||||
@@ -79,12 +87,9 @@ clock_t _times(
|
||||
return ticks;
|
||||
}
|
||||
|
||||
/*
|
||||
* times()
|
||||
*
|
||||
/**
|
||||
* times() system call wrapper for _times() above.
|
||||
*/
|
||||
|
||||
clock_t times(
|
||||
struct tms *ptms
|
||||
)
|
||||
@@ -92,16 +97,13 @@ clock_t times(
|
||||
return _times( ptms );
|
||||
}
|
||||
|
||||
/*
|
||||
* _times_r
|
||||
*
|
||||
* This is the Newlib dependent reentrant version of times().
|
||||
*/
|
||||
|
||||
#if defined(RTEMS_NEWLIB)
|
||||
|
||||
#include <reent.h>
|
||||
|
||||
/**
|
||||
* This is the Newlib dependent reentrant version of times().
|
||||
*/
|
||||
clock_t _times_r(
|
||||
struct _reent *ptr __attribute__((unused)),
|
||||
struct tms *ptms
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
/*
|
||||
* assoc.c
|
||||
* rtems assoc routines
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @brief RTEMS Associate Name by Remote
|
||||
* @ingroup Associativity
|
||||
*/
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
/*
|
||||
* cfgetispeed() - POSIX 1003.1b 7.1.3 - Baud Rate Functions
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @brief Baud Rate Functions
|
||||
* @ingroup Termios
|
||||
*/
|
||||
|
||||
/*
|
||||
* COPYRIGHT (c) 1989-1999.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
/*
|
||||
* freenode()
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @brief Releases all Resources of a Location
|
||||
* @ingroup LibIOInternal
|
||||
*/
|
||||
/*
|
||||
* COPYRIGHT (c) 1989-2010.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @brief Get Character from Stdin
|
||||
* @ingroup libcsupport
|
||||
*/
|
||||
|
||||
/*
|
||||
* COPYRIGHT (c) 1989-2008.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @brief Get User Name
|
||||
* @ingroup libcsupport
|
||||
*/
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
@@ -15,10 +22,10 @@
|
||||
#include <unistd.h>
|
||||
#include <pwd.h>
|
||||
|
||||
/*
|
||||
/**
|
||||
* 4.2.4 Get User Name, P1003.1b-1993, p. 87
|
||||
*
|
||||
* NOTE: P1003.1c/D10, p. 49 adds getlogin_r().
|
||||
* @note P1003.1c/D10, p. 49 adds getlogin_r().
|
||||
*/
|
||||
char *getlogin( void )
|
||||
{
|
||||
@@ -26,10 +33,10 @@ char *getlogin( void )
|
||||
return _POSIX_types_Getlogin_buffer;
|
||||
}
|
||||
|
||||
/*
|
||||
/**
|
||||
* 4.2.4 Get User Name, P1003.1b-1993, p. 87
|
||||
*
|
||||
* NOTE: P1003.1c/D10, p. 49 adds getlogin_r().
|
||||
* @note P1003.1c/D10, p. 49 adds getlogin_r().
|
||||
*/
|
||||
int getlogin_r(
|
||||
char *name,
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
/*
|
||||
* This file contains the support infrastructure used to manage the
|
||||
* table of integer style file descriptors used by the low level
|
||||
* POSIX system calls like open(), read, fstat(), etc.
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @brief File Descriptor Routines
|
||||
* @ingroup LibIOInternal
|
||||
*/
|
||||
|
||||
/*
|
||||
* COPYRIGHT (c) 1989-1999.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
@@ -39,12 +42,6 @@
|
||||
*/
|
||||
#undef ACCEPT_O_NDELAY_ALIAS
|
||||
|
||||
/*
|
||||
* rtems_libio_fcntl_flags
|
||||
*
|
||||
* Convert UNIX fnctl(2) flags to ones that RTEMS drivers understand
|
||||
*/
|
||||
|
||||
static const rtems_assoc_t access_modes_assoc[] = {
|
||||
{ "READ", LIBIO_FLAGS_READ, O_RDONLY },
|
||||
{ "WRITE", LIBIO_FLAGS_WRITE, O_WRONLY },
|
||||
@@ -87,12 +84,6 @@ uint32_t rtems_libio_fcntl_flags( int fcntl_flags )
|
||||
return flags;
|
||||
}
|
||||
|
||||
/*
|
||||
* rtems_libio_to_fcntl_flags
|
||||
*
|
||||
* Convert RTEMS internal flags to UNIX fnctl(2) flags
|
||||
*/
|
||||
|
||||
int rtems_libio_to_fcntl_flags( uint32_t flags )
|
||||
{
|
||||
int fcntl_flags = 0;
|
||||
@@ -120,13 +111,6 @@ int rtems_libio_to_fcntl_flags( uint32_t flags )
|
||||
return fcntl_flags;
|
||||
}
|
||||
|
||||
/*
|
||||
* rtems_libio_allocate
|
||||
*
|
||||
* This routine searches the IOP Table for an unused entry. If it
|
||||
* finds one, it returns it. Otherwise, it returns NULL.
|
||||
*/
|
||||
|
||||
rtems_libio_t *rtems_libio_allocate( void )
|
||||
{
|
||||
rtems_libio_t *iop = NULL;
|
||||
@@ -145,13 +129,6 @@ rtems_libio_t *rtems_libio_allocate( void )
|
||||
return iop;
|
||||
}
|
||||
|
||||
/*
|
||||
* rtems_libio_free
|
||||
*
|
||||
* This routine frees the resources associated with an IOP (file descriptor)
|
||||
* and clears the slot in the IOP Table.
|
||||
*/
|
||||
|
||||
void rtems_libio_free(
|
||||
rtems_libio_t *iop
|
||||
)
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
/*
|
||||
* This file contains the support infrastructure used to manage the
|
||||
* table of integer style file descriptors used by the low level
|
||||
* POSIX system calls like open(), read, fstat(), etc.
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @brief RTEMS LibIO Initialization
|
||||
* @ingroup LibIO
|
||||
*/
|
||||
|
||||
/*
|
||||
* COPYRIGHT (c) 1989-2010.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
@@ -38,12 +41,6 @@ rtems_id rtems_libio_semaphore;
|
||||
rtems_libio_t *rtems_libio_iops;
|
||||
rtems_libio_t *rtems_libio_iop_freelist;
|
||||
|
||||
/*
|
||||
* rtems_libio_init
|
||||
*
|
||||
* Called by BSP startup code to initialize the libio subsystem.
|
||||
*/
|
||||
|
||||
void rtems_libio_init( void )
|
||||
{
|
||||
rtems_status_code rc;
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
/*
|
||||
* RTEMS Malloc Family -- Dirty Memory from Malloc
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @brief Dirty Memory Function
|
||||
* @ingroup MallocSupport
|
||||
*/
|
||||
|
||||
/*
|
||||
* COPYRIGHT (c) 1989-2007.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
/*
|
||||
* malloc_get_statistics Implementation
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @brief Print Malloc Statistic Usage Report
|
||||
* @ingroup MallocSupport
|
||||
*/
|
||||
|
||||
/*
|
||||
* COPYRIGHT (c) 1989-2007.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @brief RTEMS Malloc Get Free Information
|
||||
* @ingroup libcsupport
|
||||
*/
|
||||
|
||||
/*
|
||||
* RTEMS Malloc Get Free Information
|
||||
*
|
||||
*
|
||||
* COPYRIGHT (c) 1989-2010.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @brief Read a Vector
|
||||
* @ingroup libcsupport
|
||||
*/
|
||||
|
||||
/*
|
||||
* readv() - POSIX 1003.1 - Read a Vector
|
||||
*
|
||||
* OpenGroup URL:
|
||||
*
|
||||
* http://www.opengroup.org/onlinepubs/009695399/functions/readv.html
|
||||
*
|
||||
* COPYRIGHT (c) 1989-2011.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
@@ -23,6 +24,13 @@
|
||||
#include <rtems/libio_.h>
|
||||
#include <rtems/seterr.h>
|
||||
|
||||
/**
|
||||
* readv() - POSIX 1003.1 - Read a Vector
|
||||
*
|
||||
* OpenGroup URL:
|
||||
*
|
||||
* http://www.opengroup.org/onlinepubs/009695399/functions/readv.html
|
||||
*/
|
||||
ssize_t readv(
|
||||
int fd,
|
||||
const struct iovec *iov,
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @brief Create Session and Set Process Group ID
|
||||
* @ingroup libcsupport
|
||||
*/
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
@@ -6,10 +13,9 @@
|
||||
|
||||
#include <rtems/seterr.h>
|
||||
|
||||
/*
|
||||
/**
|
||||
* 4.3.2 Create Session and Set Process Group ID, P1003.1b-1993, p. 88
|
||||
*/
|
||||
|
||||
pid_t setsid( void )
|
||||
{
|
||||
rtems_set_errno_and_return_minus_one( EPERM );
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @brief Get File Status
|
||||
* @ingroup libcsupport
|
||||
*/
|
||||
|
||||
/*
|
||||
* stat() - POSIX 1003.1b 5.6.2 - Get File Status
|
||||
*
|
||||
* Reused from lstat().
|
||||
*
|
||||
* COPYRIGHT (c) 1989-1999.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
@@ -31,6 +34,11 @@
|
||||
|
||||
#include <rtems/libio_.h>
|
||||
|
||||
/**
|
||||
* POSIX 1003.1b 5.6.2 - Get File Status
|
||||
*
|
||||
* Reused from lstat().
|
||||
*/
|
||||
int _STAT_NAME( const char *path, struct stat *buf )
|
||||
{
|
||||
int rv = 0;
|
||||
@@ -48,16 +56,13 @@ int _STAT_NAME( const char *path, struct stat *buf )
|
||||
return rv;
|
||||
}
|
||||
|
||||
/*
|
||||
* _stat_r, _lstat_r
|
||||
*
|
||||
* This is the Newlib dependent reentrant version of stat() and lstat().
|
||||
*/
|
||||
|
||||
#if defined(RTEMS_NEWLIB)
|
||||
|
||||
#include <reent.h>
|
||||
|
||||
/**
|
||||
* This is the Newlib dependent reentrant version of stat() and lstat().
|
||||
*/
|
||||
int _STAT_R_NAME(
|
||||
struct _reent *ptr __attribute__((unused)),
|
||||
const char *path,
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @brief RTEMS File System Permissions Check Support
|
||||
* @ingroup LibIOInternal
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (c) 2012 embedded brains GmbH. All rights reserved.
|
||||
*
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @brief RTEMS File System Location Support
|
||||
* @ingroup LibIOInternal
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (c) 2012 embedded brains GmbH. All rights reserved.
|
||||
*
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @brief Sets the Initial Baud in the Termios Context
|
||||
* @ingroup TermiostypesSupport
|
||||
*/
|
||||
|
||||
/*
|
||||
* COPYRIGHT (c) 1989-2008.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @brief Demetermine Terminal Device Name
|
||||
* @ingroup libcsupport
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988, 1993
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
@@ -54,7 +61,7 @@
|
||||
|
||||
static char ttyname_buf[sizeof (_PATH_DEV) + MAXNAMLEN];
|
||||
|
||||
/*
|
||||
/**
|
||||
* ttyname_r() - POSIX 1003.1b 4.7.2 - Demetermine Terminal Device Name
|
||||
*/
|
||||
int ttyname_r(
|
||||
@@ -99,10 +106,9 @@ int ttyname_r(
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
/**
|
||||
* ttyname() - POSIX 1003.1b 4.7.2 - Determine Terminal Device Name
|
||||
*/
|
||||
|
||||
char *ttyname(
|
||||
int fd
|
||||
)
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
/*
|
||||
* utime() - POSIX 1003.1b 5.5.6 - Set File Access and Modification Times
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @brief Set File Access and Modification Times
|
||||
* @ingroup libcsupport
|
||||
*/
|
||||
|
||||
/*
|
||||
* COPYRIGHT (c) 1989-1999.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
@@ -20,6 +25,9 @@
|
||||
|
||||
#include <rtems/libio_.h>
|
||||
|
||||
/**
|
||||
* POSIX 1003.1b 5.5.6 - Set File Access and Modification Times
|
||||
*/
|
||||
int utime( const char *path, const struct utimbuf *times )
|
||||
{
|
||||
int rv = 0;
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @brief Maps Close Operation to rtems_io_close
|
||||
* @ingroup DevFsDeviceTable Define Device Table Type
|
||||
*/
|
||||
|
||||
/*
|
||||
* The license and distribution terms for this file may be
|
||||
* found in the file LICENSE in this distribution or at
|
||||
|
||||
@@ -88,6 +88,8 @@ extern int devFS_open(
|
||||
|
||||
|
||||
/**
|
||||
* @brief Maps Close Operation to rtems_io_close
|
||||
*
|
||||
* This handler maps close operation to rtems_io_close.
|
||||
* @param iop This is the RTEMS's internal representation of file
|
||||
* @retval the same as close
|
||||
@@ -153,6 +155,8 @@ extern int devFS_ioctl(
|
||||
|
||||
|
||||
/**
|
||||
* @brief Gets the Device File Information
|
||||
*
|
||||
* This handler gets the device file information. This routine only set the following member of struct stat:
|
||||
* st_dev : device number
|
||||
* st_mode: device file creation mode, only two mode are accepted:
|
||||
@@ -227,6 +231,8 @@ extern int devFS_initialize(
|
||||
|
||||
|
||||
/**
|
||||
* @brief Retrieves and Prints all the Device Registered in System
|
||||
*
|
||||
* This routine retrieves all the device registered in system, and
|
||||
* prints out their detail information. For example, on one system,
|
||||
* devFS_show will print out following message:
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @brief Retrieves and Prints all the Device Registered in System
|
||||
* @ingroup DevFsDeviceTable Define Device Table Type
|
||||
*/
|
||||
|
||||
/*
|
||||
* The license and distribution terms for this file may be
|
||||
* found in the file LICENSE in this distribution or at
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @brief Gets the Device File Information
|
||||
* @ingroup DevFsDeviceTable Define Device Table Type
|
||||
*/
|
||||
|
||||
/*
|
||||
* The license and distribution terms for this file may be
|
||||
* found in the file LICENSE in this distribution or at
|
||||
|
||||
@@ -773,17 +773,12 @@ fat_init_volume_info(fat_fs_info_t *fs_info, const char *device)
|
||||
if (is_cluster_aligned(vol, vol->data_fsec)
|
||||
&& (FAT_FAT32 == vol->type || is_cluster_aligned(vol, vol->rdir_loc)))
|
||||
{
|
||||
vol->bytes_per_block = vol->bpc;
|
||||
vol->bytes_per_block_log2 = vol->bpc_log2;
|
||||
vol->sectors_per_block = vol->spc;
|
||||
sc = rtems_bdbuf_set_block_size (vol->dd, vol->bytes_per_block, true);
|
||||
if (RTEMS_SUCCESSFUL != sc)
|
||||
sc = rtems_bdbuf_set_block_size (vol->dd, vol->bpc, true);
|
||||
if (sc == RTEMS_SUCCESSFUL)
|
||||
{
|
||||
close(vol->fd);
|
||||
free(fs_info->vhash);
|
||||
free(fs_info->rhash);
|
||||
free(fs_info->uino);
|
||||
rtems_set_errno_and_return_minus_one( EIO );
|
||||
vol->bytes_per_block = vol->bpc;
|
||||
vol->bytes_per_block_log2 = vol->bpc_log2;
|
||||
vol->sectors_per_block = vol->spc;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @brief General operations on File Allocation Table
|
||||
* @ingroup libfs_ffo Fat Fat Operations
|
||||
*/
|
||||
|
||||
/*
|
||||
* fat_fat_operations.c
|
||||
*
|
||||
* General operations on File Allocation Table
|
||||
*
|
||||
* Copyright (C) 2001 OKTET Ltd., St.-Petersburg, Russia
|
||||
* Author: Eugeny S. Mints <Eugeny.Mints@oktet.ru>
|
||||
*/
|
||||
|
||||
@@ -19,6 +19,12 @@
|
||||
|
||||
#include <rtems/bdbuf.h>
|
||||
|
||||
/**
|
||||
* @defgroup libfs_ffo Fat Fat Operations
|
||||
*
|
||||
* @ingroup libfs
|
||||
*/
|
||||
/**@{*/
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
@@ -54,5 +60,5 @@ fat_free_fat_clusters_chain(
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
/**@}*/
|
||||
#endif /* __DOSFS_FAT_FAT_OPERATIONS_H__ */
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @brief General operations on "fat-file"
|
||||
* @ingroup libfs_ff Fat File
|
||||
*/
|
||||
|
||||
/*
|
||||
* fat_file.c
|
||||
*
|
||||
* General operations on "fat-file"
|
||||
*
|
||||
* Copyright (C) 2001 OKTET Ltd., St.-Petersburg, Russia
|
||||
* Author: Eugeny S. Mints <Eugeny.Mints@oktet.ru>
|
||||
*
|
||||
|
||||
@@ -20,6 +20,12 @@
|
||||
|
||||
#include "fat.h"
|
||||
|
||||
/**
|
||||
* @defgroup libfs_ff Fat File
|
||||
*
|
||||
* @ingroup libfs
|
||||
*/
|
||||
/**@{*/
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
@@ -182,5 +188,5 @@ fat_file_mark_removed(fat_fs_info_t *fs_info,
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
/**@}*/
|
||||
#endif /* __DOSFS_FAT_FILE_H__ */
|
||||
|
||||
@@ -19,6 +19,12 @@
|
||||
#include "fat.h"
|
||||
#include "fat_file.h"
|
||||
|
||||
/**
|
||||
* @defgroup libfs_msdos MSDOS FileSystem
|
||||
*
|
||||
* @ingroup libfs
|
||||
*/
|
||||
/**@{*/
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
@@ -73,6 +79,12 @@ extern const rtems_filesystem_file_handlers_r msdos_file_handlers;
|
||||
#define MSDOS_REGULAR_FILE RTEMS_FILESYSTEM_MEMORY_FILE
|
||||
#define MSDOS_HARD_LINK RTEMS_FILESYSTEM_HARD_LINK /* pseudo type */
|
||||
|
||||
/**
|
||||
* @brief Type of Node that Loc Refers To
|
||||
*
|
||||
* The following returns the type of node that the loc refers to.
|
||||
*
|
||||
*/
|
||||
typedef rtems_filesystem_node_types_t msdos_node_type_t;
|
||||
|
||||
/*
|
||||
@@ -220,11 +232,20 @@ typedef enum msdos_token_types_e
|
||||
*/
|
||||
#define MSDOS_DPS512_NUM 16
|
||||
|
||||
/* Prototypes */
|
||||
/**
|
||||
* @brief Shut Down MSDOS FileSystem
|
||||
*
|
||||
* MSDOS shut down handler implementation
|
||||
*/
|
||||
void msdos_shut_down(rtems_filesystem_mount_table_entry_t *temp_mt_entry);
|
||||
|
||||
void msdos_eval_path(rtems_filesystem_eval_path_context_t *ctx);
|
||||
|
||||
/**
|
||||
* @brief Call Fat-File Close Routine
|
||||
*
|
||||
* Free node handler implementation for the filesystem operations table.
|
||||
*/
|
||||
void msdos_free_node_info(const rtems_filesystem_location_info_t *pathloc);
|
||||
|
||||
rtems_filesystem_node_types_t msdos_node_type(
|
||||
@@ -239,11 +260,21 @@ int msdos_mknod(
|
||||
dev_t dev
|
||||
);
|
||||
|
||||
/**
|
||||
* @brief Remove Node from MSDOS Directory
|
||||
*
|
||||
* MSDOS Directory Handlers Implementation
|
||||
*/
|
||||
int msdos_rmnod(
|
||||
const rtems_filesystem_location_info_t *parentloc,
|
||||
const rtems_filesystem_location_info_t *loc
|
||||
);
|
||||
|
||||
/**
|
||||
* @brief Rename a MSDOS FileSystem Node
|
||||
*
|
||||
* Routine to rename a MSDOS filesystem node
|
||||
*/
|
||||
int msdos_rename(
|
||||
const rtems_filesystem_location_info_t *old_parent_loc,
|
||||
const rtems_filesystem_location_info_t *old_loc,
|
||||
@@ -256,6 +287,11 @@ void msdos_lock(const rtems_filesystem_mount_table_entry_t *mt_entry);
|
||||
|
||||
void msdos_unlock(const rtems_filesystem_mount_table_entry_t *mt_entry);
|
||||
|
||||
/**
|
||||
* @brief MSDOS Filesystem Initialization
|
||||
*
|
||||
* MSDOS Initialization support routine implementation
|
||||
*/
|
||||
int msdos_initialize_support(
|
||||
rtems_filesystem_mount_table_entry_t *temp_mt_entry,
|
||||
const rtems_filesystem_operations_table *op_table,
|
||||
@@ -305,6 +341,12 @@ int msdos_dir_stat(
|
||||
struct stat *buf
|
||||
);
|
||||
|
||||
/**
|
||||
* @brief Implements wake up version of the "signal" operation
|
||||
*
|
||||
* Routine to create a new MSDOS filesystem node
|
||||
*
|
||||
*/
|
||||
int msdos_creat_node(const rtems_filesystem_location_info_t *parent_loc,
|
||||
msdos_node_type_t type,
|
||||
const char *name,
|
||||
@@ -402,5 +444,5 @@ int msdos_sync(rtems_libio_t *iop);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
/**@}*/
|
||||
#endif /* __DOSFS_MSDOS_H__ */
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
/*
|
||||
* Adaptation of NetBSD code for RTEMS by Victor V. Vengerov <vvv@oktet.ru>
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @brief MDOS Date Conversion
|
||||
* @ingroup libfs_msdos MSDOS FileSystem
|
||||
*/
|
||||
/* $NetBSD: msdosfs_conv.c,v 1.10 1994/12/27 18:36:24 mycroft Exp $ */
|
||||
|
||||
/*
|
||||
* Written by Paul Popelka (paulp@uts.amdahl.com)
|
||||
*
|
||||
@@ -15,6 +18,9 @@
|
||||
* functioning of this software in any circumstances and is not liable for
|
||||
* any damages caused by this software.
|
||||
*
|
||||
* Adaptation of NetBSD code for RTEMS by Victor V. Vengerov <vvv@oktet.ru>
|
||||
* $NetBSD: msdosfs_conv.c,v 1.10 1994/12/27 18:36:24 mycroft Exp $
|
||||
*
|
||||
* October 1992
|
||||
*/
|
||||
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
/*
|
||||
* Routine to create a new MSDOS filesystem node
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @brief Create a new MSDOS FileSystem node
|
||||
* @ingroup libfs_msdos MSDOS FileSystem
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2001 OKTET Ltd., St.-Petersburg, Russia
|
||||
* Author: Eugeny S. Mints <Eugeny.Mints@oktet.ru>
|
||||
*
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
/*
|
||||
* MSDOS directory handlers implementation
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @brief MSDOS Directory Handlers Implementation
|
||||
* @ingroup libfs_msdos MSDOS FileSystem
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2001 OKTET Ltd., St.-Petersburg, Russia
|
||||
* Author: Eugeny S. Mints <Eugeny.Mints@oktet.ru>
|
||||
*
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
/*
|
||||
* MSDOS file handlers implementation
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @brief MSDOS File Handlers Implementation
|
||||
* @ingroup libfs
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2001 OKTET Ltd., St.-Petersburg, Russia
|
||||
* Author: Eugeny S. Mints <Eugeny.Mints@oktet.ru>
|
||||
*
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user