diff options
Diffstat (limited to 'cpukit/libfs/src')
68 files changed, 777 insertions, 398 deletions
diff --git a/cpukit/libfs/src/devfs/devclose.c b/cpukit/libfs/src/devfs/devclose.c index 83646c7619..505554f216 100644 --- a/cpukit/libfs/src/devfs/devclose.c +++ b/cpukit/libfs/src/devfs/devclose.c @@ -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 diff --git a/cpukit/libfs/src/devfs/devfs.h b/cpukit/libfs/src/devfs/devfs.h index 3fd1fab036..2317b10852 100644 --- a/cpukit/libfs/src/devfs/devfs.h +++ b/cpukit/libfs/src/devfs/devfs.h @@ -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: diff --git a/cpukit/libfs/src/devfs/devfs_show.c b/cpukit/libfs/src/devfs/devfs_show.c index 56badb1207..43cb02dfea 100644 --- a/cpukit/libfs/src/devfs/devfs_show.c +++ b/cpukit/libfs/src/devfs/devfs_show.c @@ -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 diff --git a/cpukit/libfs/src/devfs/devstat.c b/cpukit/libfs/src/devfs/devstat.c index f988448f70..f2b3de1840 100644 --- a/cpukit/libfs/src/devfs/devstat.c +++ b/cpukit/libfs/src/devfs/devstat.c @@ -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 diff --git a/cpukit/libfs/src/dosfs/fat.c b/cpukit/libfs/src/dosfs/fat.c index c82bf5ac8b..a672f42c7a 100644 --- a/cpukit/libfs/src/dosfs/fat.c +++ b/cpukit/libfs/src/dosfs/fat.c @@ -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; } } diff --git a/cpukit/libfs/src/dosfs/fat_fat_operations.c b/cpukit/libfs/src/dosfs/fat_fat_operations.c index 7496c09272..e558cec427 100644 --- a/cpukit/libfs/src/dosfs/fat_fat_operations.c +++ b/cpukit/libfs/src/dosfs/fat_fat_operations.c @@ -1,8 +1,11 @@ -/* - * fat_fat_operations.c - * - * General operations on File Allocation Table +/** + * @file * + * @brief General operations on File Allocation Table + * @ingroup libfs_ffo Fat Fat Operations + */ + +/* * Copyright (C) 2001 OKTET Ltd., St.-Petersburg, Russia * Author: Eugeny S. Mints <Eugeny.Mints@oktet.ru> */ diff --git a/cpukit/libfs/src/dosfs/fat_fat_operations.h b/cpukit/libfs/src/dosfs/fat_fat_operations.h index f9c124d055..278947ffca 100644 --- a/cpukit/libfs/src/dosfs/fat_fat_operations.h +++ b/cpukit/libfs/src/dosfs/fat_fat_operations.h @@ -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__ */ diff --git a/cpukit/libfs/src/dosfs/fat_file.c b/cpukit/libfs/src/dosfs/fat_file.c index 43826c9205..3e2d60967c 100644 --- a/cpukit/libfs/src/dosfs/fat_file.c +++ b/cpukit/libfs/src/dosfs/fat_file.c @@ -1,8 +1,11 @@ -/* - * fat_file.c - * - * General operations on "fat-file" +/** + * @file * + * @brief General operations on "fat-file" + * @ingroup libfs_ff Fat File + */ + +/* * Copyright (C) 2001 OKTET Ltd., St.-Petersburg, Russia * Author: Eugeny S. Mints <Eugeny.Mints@oktet.ru> * diff --git a/cpukit/libfs/src/dosfs/fat_file.h b/cpukit/libfs/src/dosfs/fat_file.h index 2018e995d7..0e22c90e60 100644 --- a/cpukit/libfs/src/dosfs/fat_file.h +++ b/cpukit/libfs/src/dosfs/fat_file.h @@ -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__ */ diff --git a/cpukit/libfs/src/dosfs/msdos.h b/cpukit/libfs/src/dosfs/msdos.h index 26bf906173..ad0841297c 100644 --- a/cpukit/libfs/src/dosfs/msdos.h +++ b/cpukit/libfs/src/dosfs/msdos.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__ */ diff --git a/cpukit/libfs/src/dosfs/msdos_conv.c b/cpukit/libfs/src/dosfs/msdos_conv.c index 95b25814db..7549c42e56 100644 --- a/cpukit/libfs/src/dosfs/msdos_conv.c +++ b/cpukit/libfs/src/dosfs/msdos_conv.c @@ -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 */ diff --git a/cpukit/libfs/src/dosfs/msdos_create.c b/cpukit/libfs/src/dosfs/msdos_create.c index f8e1a9e19d..886dd404cc 100644 --- a/cpukit/libfs/src/dosfs/msdos_create.c +++ b/cpukit/libfs/src/dosfs/msdos_create.c @@ -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> * diff --git a/cpukit/libfs/src/dosfs/msdos_dir.c b/cpukit/libfs/src/dosfs/msdos_dir.c index 961568e47d..fd9ca40461 100644 --- a/cpukit/libfs/src/dosfs/msdos_dir.c +++ b/cpukit/libfs/src/dosfs/msdos_dir.c @@ -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> * diff --git a/cpukit/libfs/src/dosfs/msdos_file.c b/cpukit/libfs/src/dosfs/msdos_file.c index a5b9c7abb2..b19b848786 100644 --- a/cpukit/libfs/src/dosfs/msdos_file.c +++ b/cpukit/libfs/src/dosfs/msdos_file.c @@ -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> * diff --git a/cpukit/libfs/src/dosfs/msdos_format.c b/cpukit/libfs/src/dosfs/msdos_format.c index 0b30caf030..49015e8fbd 100644 --- a/cpukit/libfs/src/dosfs/msdos_format.c +++ b/cpukit/libfs/src/dosfs/msdos_format.c @@ -1,25 +1,23 @@ -/*===============================================================*\ -| Project: RTEMS msdos format functionality | -+-----------------------------------------------------------------+ -| File: msdos_format.c | -+-----------------------------------------------------------------+ -| Copyright (c) 2004 IMD | -| Ingenieurbuero fuer Microcomputertechnik Th. Doerfler | -| <Thomas.Doerfler@imd-systems.de> | -| all rights reserved | -+-----------------------------------------------------------------+ -| this file contains msdos_format function. This function | -| formats a disk partition conforming to MS-DOS conventions | -| | -| 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. | -| | -+-----------------------------------------------------------------+ -| date history ID | -| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | -| 29.10.04 creation doe | -\*===============================================================*/ +/** + * @file + * + * @brief RTEMS MSDOS Format Functionality + * @ingroup libfs + * + * This function formats a disk partition conforming to MS-DOS conventions + */ + +/* + * Copyright (C) 2004 IMD + * Ingenieurbuero fuer Microcomputertechnik Th. Doerfler + * <Thomas.Doerfler@imd-systems.de> + * + * All rights reserved. + * + * 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. + */ #if HAVE_CONFIG_H #include "config.h" diff --git a/cpukit/libfs/src/dosfs/msdos_free.c b/cpukit/libfs/src/dosfs/msdos_free.c index 4dc26b7e9e..44db35d3ee 100644 --- a/cpukit/libfs/src/dosfs/msdos_free.c +++ b/cpukit/libfs/src/dosfs/msdos_free.c @@ -1,7 +1,11 @@ -/* - * Free node handler implementation for the filesystem - * operations table. +/** + * @file * + * @brief Call Fat-File Close Routine + * @ingroup libfs_msdos MSDOS FileSystem + */ + +/* * Copyright (C) 2001 OKTET Ltd., St.-Petersburg, Russia * Author: Eugeny S. Mints <Eugeny.Mints@oktet.ru> * diff --git a/cpukit/libfs/src/dosfs/msdos_fsunmount.c b/cpukit/libfs/src/dosfs/msdos_fsunmount.c index e23daaab4e..90a8073bf8 100644 --- a/cpukit/libfs/src/dosfs/msdos_fsunmount.c +++ b/cpukit/libfs/src/dosfs/msdos_fsunmount.c @@ -1,6 +1,11 @@ -/* - * MSDOS shut down handler implementation +/** + * @file * + * @brief Shut Down MSDOS FileSystem + * @ingroup libfs_msdos MSDOS FileSystem + */ + +/* * Copyright (C) 2001 OKTET Ltd., St.-Petersburg, Russia * Author: Eugeny S. Mints <Eugeny.Mints@oktet.ru> * diff --git a/cpukit/libfs/src/dosfs/msdos_handlers_dir.c b/cpukit/libfs/src/dosfs/msdos_handlers_dir.c index a56353b5fd..41efdb439d 100644 --- a/cpukit/libfs/src/dosfs/msdos_handlers_dir.c +++ b/cpukit/libfs/src/dosfs/msdos_handlers_dir.c @@ -1,6 +1,11 @@ -/* - * Directory Handlers Table for MSDOS filesystem +/** + * @file * + * @brief Directory Handlers Table for MSDOS FileSystem + * @ingroup libfs + */ + +/* * Copyright (C) 2001 OKTET Ltd., St.-Petersburg, Russia * Author: Eugeny S. Mints <Eugeny.Mints@oktet.ru> * diff --git a/cpukit/libfs/src/dosfs/msdos_handlers_file.c b/cpukit/libfs/src/dosfs/msdos_handlers_file.c index e6edae0636..2a3938d02a 100644 --- a/cpukit/libfs/src/dosfs/msdos_handlers_file.c +++ b/cpukit/libfs/src/dosfs/msdos_handlers_file.c @@ -1,6 +1,11 @@ -/* - * File Operations Table for MSDOS filesystem +/** + * @file * + * @brief File Operations Table for MSDOS FileSystem + * @ingroup libfs + */ + +/* * Copyright (C) 2001 OKTET Ltd., St.-Petersburg, Russia * Author: Eugeny S. Mints <Eugeny.Mints@oktet.ru> * diff --git a/cpukit/libfs/src/dosfs/msdos_init.c b/cpukit/libfs/src/dosfs/msdos_init.c index 544fef49be..eb46141503 100644 --- a/cpukit/libfs/src/dosfs/msdos_init.c +++ b/cpukit/libfs/src/dosfs/msdos_init.c @@ -1,6 +1,11 @@ -/* - * Init routine for MSDOS +/** + * @file * + * @brief Init Routine for MSDOS + * @ingroup libfs + */ + +/* * Copyright (C) 2001 OKTET Ltd., St.-Petersburg, Russia * Author: Eugeny S. Mints <Eugeny.Mints@oktet.ru> * diff --git a/cpukit/libfs/src/dosfs/msdos_initsupp.c b/cpukit/libfs/src/dosfs/msdos_initsupp.c index cf24d4bb64..08441869b4 100644 --- a/cpukit/libfs/src/dosfs/msdos_initsupp.c +++ b/cpukit/libfs/src/dosfs/msdos_initsupp.c @@ -1,6 +1,11 @@ -/* - * MSDOS Initialization support routine implementation +/** + * @file * + * @brief MSDOS Filesystem Initialization + * @ingroup libfs_msdos MSDOS FileSystem + */ + +/* * Copyright (C) 2001 OKTET Ltd., St.-Petersburg, Russia * Author: Eugeny S. Mints <Eugeny.Mints@oktet.ru> * diff --git a/cpukit/libfs/src/dosfs/msdos_misc.c b/cpukit/libfs/src/dosfs/msdos_misc.c index 5ebf257b5a..a1979b1e2c 100644 --- a/cpukit/libfs/src/dosfs/msdos_misc.c +++ b/cpukit/libfs/src/dosfs/msdos_misc.c @@ -1,6 +1,11 @@ -/* - * Miscellaneous routines implementation for MSDOS filesystem +/** + * @file * + * @brief Miscellaneous Routines Implementation for MSDOS FileSystem + * @ingroup libfs + */ + +/* * Copyright (C) 2001 OKTET Ltd., St.-Petersburg, Russia * Author: Eugeny S. Mints <Eugeny.Mints@oktet.ru> * diff --git a/cpukit/libfs/src/dosfs/msdos_node_type.c b/cpukit/libfs/src/dosfs/msdos_node_type.c index 27b5189af4..c1b83d0709 100644 --- a/cpukit/libfs/src/dosfs/msdos_node_type.c +++ b/cpukit/libfs/src/dosfs/msdos_node_type.c @@ -1,6 +1,11 @@ -/* - * The following returns the type of node that the loc refers to. +/** + * @file * + * @brief Type of Node that Loc Refers To + * @ingroup libfs_msdos MSDOS FileSystem + */ + +/* * Copyright (C) 2001 OKTET Ltd., St.-Petersburg, Russia * Author: Eugeny S. Mints <Eugeny.Mints@oktet.ru> * diff --git a/cpukit/libfs/src/dosfs/msdos_rename.c b/cpukit/libfs/src/dosfs/msdos_rename.c index 5423cdbf77..c6d1f560f3 100644 --- a/cpukit/libfs/src/dosfs/msdos_rename.c +++ b/cpukit/libfs/src/dosfs/msdos_rename.c @@ -1,6 +1,11 @@ -/* - * Routine to rename a MSDOS filesystem node +/** + * @file * + * @brief Rename a MSDOS FileSystem Node + * @ingroup libfs_msdos MSDOS FileSystem + */ + +/* * Copyright (C) 2010 Chris Johns <chrisj@rtems.org> * * The license and distribution terms for this file may be diff --git a/cpukit/libfs/src/dosfs/msdos_rmnod.c b/cpukit/libfs/src/dosfs/msdos_rmnod.c index 099b9287e5..36408e15a1 100644 --- a/cpukit/libfs/src/dosfs/msdos_rmnod.c +++ b/cpukit/libfs/src/dosfs/msdos_rmnod.c @@ -1,6 +1,11 @@ -/* - * MSDOS directory handlers implementation +/** + * @file * + * @brief Remove Node from MSDOS Directory + * @ingroup libfs_msdos MSDOS FileSystem + */ + +/* * Copyright (C) 2001 OKTET Ltd., St.-Petersburg, Russia * Author: Eugeny S. Mints <Eugeny.Mints@oktet.ru> * diff --git a/cpukit/libfs/src/imfs/deviceio.c b/cpukit/libfs/src/imfs/deviceio.c index 679f94559c..094e92d2ef 100644 --- a/cpukit/libfs/src/imfs/deviceio.c +++ b/cpukit/libfs/src/imfs/deviceio.c @@ -1,9 +1,11 @@ -/* - * IMFS Device Node Handlers - * - * This file contains the set of handlers used to map operations on - * IMFS device nodes onto calls to the RTEMS Classic API IO Manager. +/** + * @file * + * @brief IMFS Device Node Handlers + * @ingroup IMFS + */ + +/* * COPYRIGHT (c) 1989-2012. * On-Line Applications Research Corporation (OAR). * diff --git a/cpukit/libfs/src/imfs/imfs.h b/cpukit/libfs/src/imfs/imfs.h index aed00778e7..646e988ca2 100644 --- a/cpukit/libfs/src/imfs/imfs.h +++ b/cpukit/libfs/src/imfs/imfs.h @@ -1,7 +1,7 @@ /** * @file rtems/imfs.h * - * Header file for the In-Memory File System + * @brief Header file for the In-Memory File System */ /* @@ -21,6 +21,12 @@ #include <rtems/libio_.h> #include <rtems/pipe.h> +/** + * @defgroup IMFS POSIX In-Memory File System Support + * + * @brief In-Memory File System Support + */ + #ifdef __cplusplus extern "C" { #endif @@ -158,6 +164,9 @@ typedef IMFS_jnode_t *(*IMFS_node_control_initialize)( const IMFS_types_union *info ); +/** + * @brief Initialize Default IMFS Node + */ IMFS_jnode_t *IMFS_node_initialize_default( IMFS_jnode_t *node, const IMFS_types_union *info @@ -172,12 +181,18 @@ typedef IMFS_jnode_t *(*IMFS_node_control_remove)( IMFS_jnode_t *node ); +/** + * @brief Remove Default IMFS Node + */ IMFS_jnode_t *IMFS_node_remove_default( IMFS_jnode_t *node ); typedef IMFS_jnode_t *(*IMFS_node_control_destroy)( IMFS_jnode_t *node ); +/** + * @brief Destroy Default IMFS Node + */ IMFS_jnode_t *IMFS_node_destroy_default( IMFS_jnode_t *node ); typedef struct { @@ -298,49 +313,141 @@ extern int miniIMFS_initialize( const void *data ); +/** + * @brief IMFS Initialization Support + */ extern int IMFS_initialize_support( rtems_filesystem_mount_table_entry_t *mt_entry, const rtems_filesystem_operations_table *op_table, const IMFS_node_control *const node_controls [IMFS_TYPE_COUNT] ); - +/** + * @brief Unmount this Instance of IMFS + */ extern void IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *mt_entry ); +/** + * @brief RTEMS Load Tarfs + * + * This file implements the "mount" procedure for tar-based IMFS + * extensions. The TAR is not actually mounted under the IMFS. + * Directories from the TAR file are created as usual in the IMFS. + * File entries are created as IMFS_LINEAR_FILE nodes with their nods + * pointing to addresses in the TAR image. + * + * Here we create the mountpoint directory and load the tarfs at + * that node. Once the IMFS has been mounted, we work through the + * tar image and perform as follows: + * - For directories, simply call mkdir(). The IMFS creates nodes as + * needed. + * - For files, we make our own calls to IMFS eval_for_make and + * create_node. + * + * TAR file format: + * + * Offset Length Contents + * 0 100 bytes File name ('\0' terminated, 99 maxmum length) + * 100 8 bytes File mode (in octal ascii) + * 108 8 bytes User ID (in octal ascii) + * 116 8 bytes Group ID (in octal ascii) + * 124 12 bytes File size (s) (in octal ascii) + * 136 12 bytes Modify time (in octal ascii) + * 148 8 bytes Header checksum (in octal ascii) + * 156 1 bytes Link flag + * 157 100 bytes Linkname ('\0' terminated, 99 maxmum length) + * 257 8 bytes Magic PAX ("ustar\0" + 2 bytes padding) + * 257 8 bytes Magic GNU tar ("ustar \0") + * 265 32 bytes User name ('\0' terminated, 31 maxmum length) + * 297 32 bytes Group name ('\0' terminated, 31 maxmum length) + * 329 8 bytes Major device ID (in octal ascii) + * 337 8 bytes Minor device ID (in octal ascii) + * 345 167 bytes Padding + * 512 (s+p)bytes File contents (s+p) := (((s) + 511) & ~511), + * round up to 512 bytes + * + * Checksum: + * int i, sum; + * char* header = tar_header_pointer; + * sum = 0; + * for(i = 0; i < 512; i++) + * sum += 0xFF & header[i]; + */ extern int rtems_tarfs_load( const char *mountpoint, uint8_t *tar_image, size_t tar_size ); +/** + * @brief IMFS Dump + * + * This routine dumps the entire IMFS that is mounted at the root + * directory. + * + * NOTE: Assuming the "/" directory is bad. + * Not checking that the starting directory is in an IMFS is bad. + */ extern void IMFS_dump( void ); -/* +/** + * @brief IMFS Memory File Maximum Size + * * Return the size of the largest file which can be created * using the IMFS memory file type. */ extern int IMFS_memfile_maximum_size( void ); +/** + * @brief Destroy IMFS Node + */ extern void IMFS_node_destroy( IMFS_jnode_t *node ); +/** + * @brief Clone IMFS Node + */ extern int IMFS_node_clone( rtems_filesystem_location_info_t *loc ); +/** + * @brief Free IMFS Node + */ extern void IMFS_node_free( const rtems_filesystem_location_info_t *loc ); +/** + * @brief IMFS Node Type + * + * The following verifies that returns the type of node that the + * loc refers to. + */ extern rtems_filesystem_node_types_t IMFS_node_type( const rtems_filesystem_location_info_t *loc ); +/** + * @brief IMFS Stat + * + * This routine provides a stat for the IMFS file system. + */ extern int IMFS_stat( const rtems_filesystem_location_info_t *loc, struct stat *buf ); +/** + * @brief Evaluation IMFS Node Support + */ extern void IMFS_eval_path( rtems_filesystem_eval_path_context_t *ctx ); +/** + * @brief IMFS Create a New Link Node + * + * The following rouine creates a new link node under parent with the + * name given in name. The link node is set to point to the node at + * to_loc. + */ extern int IMFS_link( const rtems_filesystem_location_info_t *parentloc, const rtems_filesystem_location_info_t *targetloc, @@ -348,12 +455,23 @@ extern int IMFS_link( size_t namelen ); +/** + * @brief IMFS Change Owner + * + * This routine is the implementation of the chown() system + * call for the IMFS. + */ extern int IMFS_chown( const rtems_filesystem_location_info_t *loc, uid_t owner, gid_t group ); +/** + * @brief Create a IMFS Node + * + * Routine to create a node in the IMFS file system. + */ extern int IMFS_mknod( const rtems_filesystem_location_info_t *parentloc, const char *name, @@ -362,6 +480,11 @@ extern int IMFS_mknod( dev_t dev ); +/** + * @brief Create a New IMFS Node + * + * Routine to create a new in memory file system node. + */ extern IMFS_jnode_t *IMFS_allocate_node( IMFS_fs_info_t *fs_info, const IMFS_node_control *node_control, @@ -371,6 +494,12 @@ extern IMFS_jnode_t *IMFS_allocate_node( const IMFS_types_union *info ); +/** + * @brief Create an IMFS Node + * + * Create an IMFS filesystem node of an arbitrary type that is NOT + * the root directory node. + */ extern IMFS_jnode_t *IMFS_create_node_with_control( const rtems_filesystem_location_info_t *parentloc, const IMFS_node_control *node_control, @@ -384,6 +513,9 @@ extern bool IMFS_is_imfs_instance( const rtems_filesystem_location_info_t *loc ); +/** + * @brief IMFS Make a Generic Node + */ extern int IMFS_make_generic_node( const char *path, mode_t mode, @@ -391,10 +523,16 @@ extern int IMFS_make_generic_node( void *context ); +/** + * @brief Mount an IMFS + */ extern int IMFS_mount( rtems_filesystem_mount_table_entry_t *mt_entry /* IN */ ); +/** + * @brief Unmount an IMFS + */ extern int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry /* IN */ ); @@ -403,17 +541,54 @@ extern IMFS_jnode_t *IMFS_memfile_remove( IMFS_jnode_t *the_jnode /* IN/OUT */ ); +/** + * @brief Truncate a Memory File + * + * This routine processes the ftruncate() system call. + */ extern int memfile_ftruncate( rtems_libio_t *iop, /* IN */ off_t length /* IN */ ); +/** + * @brief IMFS Read Next Directory + * + * This routine will read the next directory entry based on the directory + * offset. The offset should be equal to -n- time the size of an individual + * dirent structure. If n is not an integer multiple of the sizeof a + * dirent structure, an integer division will be performed to determine + * directory entry that will be returned in the buffer. Count should reflect + * -m- times the sizeof dirent bytes to be placed in the buffer. + * If there are not -m- dirent elements from the current directory position + * to the end of the exisiting file, the remaining entries will be placed in + * the buffer and the returned value will be equal to -m actual- times the + * size of a directory entry. + */ extern ssize_t imfs_dir_read( rtems_libio_t *iop, /* IN */ void *buffer, /* IN */ size_t count /* IN */ ); +/** + * @name IMFS Memory File Handlers + * + * This section contains the set of handlers used to process operations on + * IMFS memory file nodes. The memory files are created in memory using + * malloc'ed memory. Thus any data stored in one of these files is lost + * at system shutdown unless special arrangements to copy the data to + * some type of non-volailte storage are made by the application. + * + * @{ + */ + +/** + * @brief Open a Memory File + * + * This routine processes the open() system call. Note that there is + * nothing special to be done at open() time. + */ extern int memfile_open( rtems_libio_t *iop, /* IN */ const char *pathname, /* IN */ @@ -421,18 +596,41 @@ extern int memfile_open( mode_t mode /* IN */ ); +/** + * @brief Read a Memory File + * + * This routine processes the read() system call. + */ extern ssize_t memfile_read( rtems_libio_t *iop, /* IN */ void *buffer, /* IN */ size_t count /* IN */ ); +/** + * @brief Write a Memory File + * + * This routine processes the write() system call. + */ extern ssize_t memfile_write( rtems_libio_t *iop, /* IN */ const void *buffer, /* IN */ size_t count /* IN */ ); +/** @} */ + + +/** + * @name IMFS Device Node Handlers + * + * This section contains the set of handlers used to map operations on + * IMFS device nodes onto calls to the RTEMS Classic API IO Manager. + * + * @{ + */ + + extern int device_open( rtems_libio_t *iop, /* IN */ const char *pathname, /* IN */ @@ -467,17 +665,36 @@ extern int device_ftruncate( off_t length /* IN */ ); +/** @} */ + +/** + * @brief Set IMFS File Access and Modification Times + * + * + * This routine is the implementation of the utime() system + * call for the IMFS. + */ extern int IMFS_utime( const rtems_filesystem_location_info_t *loc, time_t actime, time_t modtime ); +/** + * @brief Change IMFS File Mode + */ extern int IMFS_fchmod( const rtems_filesystem_location_info_t *loc, mode_t mode ); +/** + * @brief IMFS Create a New Symbolic Link Node + * + * The following rouine creates a new symbolic link node under parent + * with the name given in name. The node is set to point to the node at + * to_loc. + */ extern int IMFS_symlink( const rtems_filesystem_location_info_t *parentloc, const char *name, @@ -485,12 +702,25 @@ extern int IMFS_symlink( const char *target ); +/** + * @brief IMFS Put Symbolic Link into Buffer + * + * The following rouine puts the symblic links destination name into + * buff. + * + */ extern ssize_t IMFS_readlink( const rtems_filesystem_location_info_t *loc, char *buf, size_t bufsize ); +/** + * @brief IMFS Rename + * + * The following rouine creates a new link node under parent with the + * name given in name and removes the old. + */ extern int IMFS_rename( const rtems_filesystem_location_info_t *oldparentloc, const rtems_filesystem_location_info_t *oldloc, @@ -498,7 +728,12 @@ extern int IMFS_rename( const char *name, size_t namelen ); - +/** + * @brief IMFS Node Removal Handler + * + * This file contains the handler used to remove a node when a file type + * does not require special actions. + */ extern int IMFS_rmnod( const rtems_filesystem_location_info_t *parentloc, const rtems_filesystem_location_info_t *loc diff --git a/cpukit/libfs/src/imfs/imfs_chown.c b/cpukit/libfs/src/imfs/imfs_chown.c index 63f860c318..ccfc5a5ce0 100644 --- a/cpukit/libfs/src/imfs/imfs_chown.c +++ b/cpukit/libfs/src/imfs/imfs_chown.c @@ -1,9 +1,11 @@ -/* - * IMFS_chown - * - * This routine is the implementation of the chown() system - * call for the IMFS. +/** + * @file * + * @brief IMFS Change Owner + * @ingroup IMFS + */ + +/* * COPYRIGHT (c) 1989-1999. * On-Line Applications Research Corporation (OAR). * diff --git a/cpukit/libfs/src/imfs/imfs_config.c b/cpukit/libfs/src/imfs/imfs_config.c index 92e7846265..ddb02b77dc 100644 --- a/cpukit/libfs/src/imfs/imfs_config.c +++ b/cpukit/libfs/src/imfs/imfs_config.c @@ -1,3 +1,10 @@ +/** + * @file + * + * @brief IMFS Limits and Options + * @ingroup IMFS + */ + /* * COPYRIGHT (c) 1989-1999. * On-Line Applications Research Corporation (OAR). diff --git a/cpukit/libfs/src/imfs/imfs_creat.c b/cpukit/libfs/src/imfs/imfs_creat.c index 3950dba70b..830480b83e 100644 --- a/cpukit/libfs/src/imfs/imfs_creat.c +++ b/cpukit/libfs/src/imfs/imfs_creat.c @@ -1,8 +1,10 @@ -/* - * IMFS_create_node() - * - * Routine to create a new in memory file system node. +/** + * @file * + * @brief Create an IMFS Node + * @ingroup IMFS + */ +/* * COPYRIGHT (c) 1989-2010. * On-Line Applications Research Corporation (OAR). * @@ -83,10 +85,6 @@ IMFS_jnode_t *IMFS_allocate_node( return (*node->control->node_initialize)( node, info ); } -/* - * Create an IMFS filesystem node of an arbitrary type that is NOT - * the root directory node. - */ IMFS_jnode_t *IMFS_create_node_with_control( const rtems_filesystem_location_info_t *parentloc, const IMFS_node_control *node_control, diff --git a/cpukit/libfs/src/imfs/imfs_debug.c b/cpukit/libfs/src/imfs/imfs_debug.c index 1bc280cdb2..1198ec9b82 100644 --- a/cpukit/libfs/src/imfs/imfs_debug.c +++ b/cpukit/libfs/src/imfs/imfs_debug.c @@ -1,6 +1,11 @@ -/* - * IMFS debug support routines +/** + * @file * + * @brief IMFS Debug Support + * @ingroup IMFS + */ + +/* * COPYRIGHT (c) 1989-1999. * On-Line Applications Research Corporation (OAR). * @@ -119,16 +124,6 @@ static void IMFS_dump_directory( } } -/* - * IMFS_dump - * - * This routine dumps the entire IMFS that is mounted at the root - * directory. - * - * NOTE: Assuming the "/" directory is bad. - * Not checking that the starting directory is in an IMFS is bad. - */ - void IMFS_dump( void ) { fprintf(stdout, "*************** Dump of Entire IMFS ***************\n" ); @@ -137,13 +132,6 @@ void IMFS_dump( void ) fprintf(stdout, "*************** End of Dump ***************\n" ); } -/* - * IMFS_memfile_maximum_size() - * - * This routine returns the size of the largest file which can be created - * using the IMFS memory file type. - * - */ int IMFS_memfile_maximum_size( void ) { return IMFS_MEMFILE_MAXIMUM_SIZE; diff --git a/cpukit/libfs/src/imfs/imfs_directory.c b/cpukit/libfs/src/imfs/imfs_directory.c index 99d990d24f..c344af4cd7 100644 --- a/cpukit/libfs/src/imfs/imfs_directory.c +++ b/cpukit/libfs/src/imfs/imfs_directory.c @@ -1,6 +1,11 @@ -/* - * IMFS Directory Access Routines +/** + * @file * + * @brief IMFS Read Next Directory + * @ingroup IMFS + */ + +/* * COPYRIGHT (c) 1989-1999. * On-Line Applications Research Corporation (OAR). * @@ -18,21 +23,6 @@ #include <string.h> #include <dirent.h> -/* - * imfs_dir_read - * - * This routine will read the next directory entry based on the directory - * offset. The offset should be equal to -n- time the size of an individual - * dirent structure. If n is not an integer multiple of the sizeof a - * dirent structure, an integer division will be performed to determine - * directory entry that will be returned in the buffer. Count should reflect - * -m- times the sizeof dirent bytes to be placed in the buffer. - * If there are not -m- dirent elements from the current directory position - * to the end of the exisiting file, the remaining entries will be placed in - * the buffer and the returned value will be equal to -m actual- times the - * size of a directory entry. - */ - ssize_t imfs_dir_read( rtems_libio_t *iop, void *buffer, diff --git a/cpukit/libfs/src/imfs/imfs_eval.c b/cpukit/libfs/src/imfs/imfs_eval.c index 4fcfd67ee9..5abb2473b3 100644 --- a/cpukit/libfs/src/imfs/imfs_eval.c +++ b/cpukit/libfs/src/imfs/imfs_eval.c @@ -1,6 +1,11 @@ -/* - * Evaluation IMFS Node Support Routines +/** + * @file * + * @brief Evaluation IMFS Node Support + * @ingroup IMFS + */ + +/* * COPYRIGHT (c) 1989-1999. * On-Line Applications Research Corporation (OAR). * diff --git a/cpukit/libfs/src/imfs/imfs_fchmod.c b/cpukit/libfs/src/imfs/imfs_fchmod.c index dfd6eaf3bc..ccb344629e 100644 --- a/cpukit/libfs/src/imfs/imfs_fchmod.c +++ b/cpukit/libfs/src/imfs/imfs_fchmod.c @@ -1,6 +1,11 @@ -/* - * IMFS file change mode routine. +/** + * @file * + * @brief Change IMFS File Mode + * @ingroup IMFS + */ + +/* * COPYRIGHT (c) 1989-1999. * On-Line Applications Research Corporation (OAR). * diff --git a/cpukit/libfs/src/imfs/imfs_fifo.c b/cpukit/libfs/src/imfs/imfs_fifo.c index 8601ef7b62..03e69368eb 100644 --- a/cpukit/libfs/src/imfs/imfs_fifo.c +++ b/cpukit/libfs/src/imfs/imfs_fifo.c @@ -1,6 +1,11 @@ -/* - * imfs_fifo.c: FIFO support for IMFS +/** + * @file * + * @brief FIFO Support + * @ingroup IMFS + */ + +/* * Author: Wei Shen <cquark@gmail.com> * * The license and distribution terms for this file may be diff --git a/cpukit/libfs/src/imfs/imfs_fsunmount.c b/cpukit/libfs/src/imfs/imfs_fsunmount.c index eb3d22d13e..ae6f39a385 100644 --- a/cpukit/libfs/src/imfs/imfs_fsunmount.c +++ b/cpukit/libfs/src/imfs/imfs_fsunmount.c @@ -1,6 +1,11 @@ -/* - * IMFS Initialization +/** + * @file * + * @brief Unmount this Instance of IMFS + * @ingroup IMFS + */ + +/* * COPYRIGHT (c) 1989-1999. * On-Line Applications Research Corporation (OAR). * @@ -15,10 +20,6 @@ #include "imfs.h" -/* - * IMFS_fsunmount - */ - #define jnode_get_control( jnode ) \ (&jnode->info.directory.Entries) diff --git a/cpukit/libfs/src/imfs/imfs_handlers_device.c b/cpukit/libfs/src/imfs/imfs_handlers_device.c index a7f32f7906..899b3dcf63 100644 --- a/cpukit/libfs/src/imfs/imfs_handlers_device.c +++ b/cpukit/libfs/src/imfs/imfs_handlers_device.c @@ -1,6 +1,11 @@ -/* - * Device Operations Table for the IMFS +/** + * @file * + * @brief Device Operations Table + * @ingroup IMFS + */ + +/* * COPYRIGHT (c) 1989-1999. * On-Line Applications Research Corporation (OAR). * diff --git a/cpukit/libfs/src/imfs/imfs_handlers_directory.c b/cpukit/libfs/src/imfs/imfs_handlers_directory.c index 9dcdcf2a90..61ca5527e1 100644 --- a/cpukit/libfs/src/imfs/imfs_handlers_directory.c +++ b/cpukit/libfs/src/imfs/imfs_handlers_directory.c @@ -1,6 +1,11 @@ -/* - * Operations Table for Directories for the IMFS +/** + * @file * + * @brief Operations Table for Directories + * @ingroup IMFS + */ + +/* * COPYRIGHT (c) 1989-1999. * On-Line Applications Research Corporation (OAR). * diff --git a/cpukit/libfs/src/imfs/imfs_handlers_link.c b/cpukit/libfs/src/imfs/imfs_handlers_link.c index 2c4ad3f66f..5118eb5c83 100644 --- a/cpukit/libfs/src/imfs/imfs_handlers_link.c +++ b/cpukit/libfs/src/imfs/imfs_handlers_link.c @@ -1,6 +1,11 @@ -/* - * Link Operations Table for the IMFS +/** + * @file * + * @brief Link Operations Table for the IMFS + * @ingroup IMFS + */ + +/* * COPYRIGHT (c) 1989-1999. * On-Line Applications Research Corporation (OAR). * diff --git a/cpukit/libfs/src/imfs/imfs_handlers_memfile.c b/cpukit/libfs/src/imfs/imfs_handlers_memfile.c index 6953319861..d0c5912eb3 100644 --- a/cpukit/libfs/src/imfs/imfs_handlers_memfile.c +++ b/cpukit/libfs/src/imfs/imfs_handlers_memfile.c @@ -1,6 +1,11 @@ -/* - * Memfile Operations Tables for the IMFS +/** + * @file * + * @brief Memfile Operations Tables + * @ingroup IMFS + */ + +/* * COPYRIGHT (c) 1989-1999. * On-Line Applications Research Corporation (OAR). * diff --git a/cpukit/libfs/src/imfs/imfs_initsupp.c b/cpukit/libfs/src/imfs/imfs_initsupp.c index 3bb8a979fc..a68fff178f 100644 --- a/cpukit/libfs/src/imfs/imfs_initsupp.c +++ b/cpukit/libfs/src/imfs/imfs_initsupp.c @@ -1,6 +1,11 @@ -/* - * IMFS Initialization +/** + * @file * + * @brief IMFS Node Support + * @ingroup IMFS + */ + +/* * COPYRIGHT (c) 1989-2010. * On-Line Applications Research Corporation (OAR). * diff --git a/cpukit/libfs/src/imfs/imfs_link.c b/cpukit/libfs/src/imfs/imfs_link.c index 35c38636e7..fdfbd334e4 100644 --- a/cpukit/libfs/src/imfs/imfs_link.c +++ b/cpukit/libfs/src/imfs/imfs_link.c @@ -1,10 +1,11 @@ -/* - * IMFS_link - * - * The following rouine creates a new link node under parent with the - * name given in name. The link node is set to point to the node at - * to_loc. +/** + * @file * + * @brief IMFS Create a New Link Node + * @ingroup IMFS + */ + +/* * COPYRIGHT (c) 1989-2010. * On-Line Applications Research Corporation (OAR). * diff --git a/cpukit/libfs/src/imfs/imfs_load_tar.c b/cpukit/libfs/src/imfs/imfs_load_tar.c index e51194fa8c..723699bdcc 100644 --- a/cpukit/libfs/src/imfs/imfs_load_tar.c +++ b/cpukit/libfs/src/imfs/imfs_load_tar.c @@ -1,3 +1,10 @@ +/** + * @file + * + * @brief RTEMS Load Tarfs + * @ingroup IMFS + */ + /* * COPYRIGHT (c) 1989-2010. * On-Line Applications Research Corporation (OAR). @@ -11,14 +18,6 @@ #include "config.h" #endif -/* - * This file implements the "mount" procedure for tar-based IMFS - * extensions. The TAR is not actually mounted under the IMFS. - * Directories from the TAR file are created as usual in the IMFS. - * File entries are created as IMFS_LINEAR_FILE nodes with their nods - * pointing to addresses in the TAR image. - */ - #include "imfs.h" #include <sys/stat.h> @@ -27,52 +26,10 @@ #include <rtems/untar.h> -/* - * TAR file format: - * - * Offset Length Contents - * 0 100 bytes File name ('\0' terminated, 99 maxmum length) - * 100 8 bytes File mode (in octal ascii) - * 108 8 bytes User ID (in octal ascii) - * 116 8 bytes Group ID (in octal ascii) - * 124 12 bytes File size (s) (in octal ascii) - * 136 12 bytes Modify time (in octal ascii) - * 148 8 bytes Header checksum (in octal ascii) - * 156 1 bytes Link flag - * 157 100 bytes Linkname ('\0' terminated, 99 maxmum length) - * 257 8 bytes Magic PAX ("ustar\0" + 2 bytes padding) - * 257 8 bytes Magic GNU tar ("ustar \0") - * 265 32 bytes User name ('\0' terminated, 31 maxmum length) - * 297 32 bytes Group name ('\0' terminated, 31 maxmum length) - * 329 8 bytes Major device ID (in octal ascii) - * 337 8 bytes Minor device ID (in octal ascii) - * 345 167 bytes Padding - * 512 (s+p)bytes File contents (s+p) := (((s) + 511) & ~511), - * round up to 512 bytes - * - * Checksum: - * int i, sum; - * char* header = tar_header_pointer; - * sum = 0; - * for(i = 0; i < 512; i++) - * sum += 0xFF & header[i]; - */ - #define MAX_NAME_FIELD_SIZE 99 #define MIN(a,b) ((a)>(b)?(b):(a)) -/* - * rtems_tarfs_load - * - * Here we create the mountpoint directory and load the tarfs at - * that node. Once the IMFS has been mounted, we work through the - * tar image and perform as follows: - * - For directories, simply call mkdir(). The IMFS creates nodes as - * needed. - * - For files, we make our own calls to IMFS eval_for_make and - * create_node. - */ int rtems_tarfs_load( const char *mountpoint, uint8_t *tar_image, diff --git a/cpukit/libfs/src/imfs/imfs_make_generic_node.c b/cpukit/libfs/src/imfs/imfs_make_generic_node.c index 5b7a7d9cec..f9e03b6487 100644 --- a/cpukit/libfs/src/imfs/imfs_make_generic_node.c +++ b/cpukit/libfs/src/imfs/imfs_make_generic_node.c @@ -1,3 +1,10 @@ +/** + * @file + * + * @brief IMFS Make a Generic Node + * @ingroup IMFS + */ + /* * Copyright (c) 2012 embedded brains GmbH. All rights reserved. * diff --git a/cpukit/libfs/src/imfs/imfs_mknod.c b/cpukit/libfs/src/imfs/imfs_mknod.c index 2447f74a28..0344ad5684 100644 --- a/cpukit/libfs/src/imfs/imfs_mknod.c +++ b/cpukit/libfs/src/imfs/imfs_mknod.c @@ -1,8 +1,11 @@ -/* - * IMFS_mknod - * - * Routine to create a node in the IMFS file system. +/** + * @file * + * @brief Create a IMFS Node + * @ingroup IMFS + */ + +/* * COPYRIGHT (c) 1989-2010. * On-Line Applications Research Corporation (OAR). * diff --git a/cpukit/libfs/src/imfs/imfs_mount.c b/cpukit/libfs/src/imfs/imfs_mount.c index f8e9d72f5a..49c3cae45c 100644 --- a/cpukit/libfs/src/imfs/imfs_mount.c +++ b/cpukit/libfs/src/imfs/imfs_mount.c @@ -1,6 +1,11 @@ -/* - * IMFS_mount +/** + * @file * + * @brief Mount an IMFS + * @ingroup IMFS + */ + +/* * COPYRIGHT (c) 1989-1999. * On-Line Applications Research Corporation (OAR). * diff --git a/cpukit/libfs/src/imfs/imfs_ntype.c b/cpukit/libfs/src/imfs/imfs_ntype.c index e955606fe2..fd9056279d 100644 --- a/cpukit/libfs/src/imfs/imfs_ntype.c +++ b/cpukit/libfs/src/imfs/imfs_ntype.c @@ -1,9 +1,11 @@ -/* - * IMFS_node_type - * - * The following verifies that returns the type of node that the - * loc refers to. +/** + * @file * + * @brief IMFS Node Type + * @ingroup IMFS + */ + +/* * COPYRIGHT (c) 1989-1999. * On-Line Applications Research Corporation (OAR). * diff --git a/cpukit/libfs/src/imfs/imfs_readlink.c b/cpukit/libfs/src/imfs/imfs_readlink.c index e20003a703..7cbbe5e17d 100644 --- a/cpukit/libfs/src/imfs/imfs_readlink.c +++ b/cpukit/libfs/src/imfs/imfs_readlink.c @@ -1,9 +1,11 @@ -/* - * IMFS_readlink - * - * The following rouine puts the symblic links destination name into - * buff. +/** + * @file * + * @brief IMFS Put Symbolic Link into Buffer + * @ingroup IMFS + */ + +/* * COPYRIGHT (c) 1989-1999. * On-Line Applications Research Corporation (OAR). * diff --git a/cpukit/libfs/src/imfs/imfs_rename.c b/cpukit/libfs/src/imfs/imfs_rename.c index e283b9dff1..8c642638b3 100644 --- a/cpukit/libfs/src/imfs/imfs_rename.c +++ b/cpukit/libfs/src/imfs/imfs_rename.c @@ -1,9 +1,11 @@ -/* - * IMFS_rename - * - * The following rouine creates a new link node under parent with the - * name given in name and removes the old. +/** + * @file * + * @brief IMFS Rename + * @ingroup IMFS + */ + +/* * COPYRIGHT (c) 1989-2010. * On-Line Applications Research Corporation (OAR). * diff --git a/cpukit/libfs/src/imfs/imfs_rmnod.c b/cpukit/libfs/src/imfs/imfs_rmnod.c index 90e61d9ee9..90a551b743 100644 --- a/cpukit/libfs/src/imfs/imfs_rmnod.c +++ b/cpukit/libfs/src/imfs/imfs_rmnod.c @@ -1,9 +1,11 @@ -/* - * IMFS Node Removal Handler - * - * This file contains the handler used to remove a node when a file type - * does not require special actions. +/** + * @file * + * @brief IMFS Node Removal Handler + * @ingroup IMFS + */ + +/* * COPYRIGHT (c) 1989-1999. * On-Line Applications Research Corporation (OAR). * diff --git a/cpukit/libfs/src/imfs/imfs_stat.c b/cpukit/libfs/src/imfs/imfs_stat.c index 8f373c6287..87f03551ad 100644 --- a/cpukit/libfs/src/imfs/imfs_stat.c +++ b/cpukit/libfs/src/imfs/imfs_stat.c @@ -1,8 +1,11 @@ -/* - * IMFS_stat - * - * This routine provides a stat for the IMFS file system. +/** + * @file * + * @brief IMFS Stat + * @ingroup IMFS + */ + +/* * COPYRIGHT (c) 1989-1999. * On-Line Applications Research Corporation (OAR). * diff --git a/cpukit/libfs/src/imfs/imfs_symlink.c b/cpukit/libfs/src/imfs/imfs_symlink.c index 00a7f970a5..546ad2694a 100644 --- a/cpukit/libfs/src/imfs/imfs_symlink.c +++ b/cpukit/libfs/src/imfs/imfs_symlink.c @@ -1,10 +1,11 @@ -/* - * IMFS_symlink - * - * The following rouine creates a new symbolic link node under parent - * with the name given in name. The node is set to point to the node at - * to_loc. +/** + * @file * + * @brief IMFS Create a New Symbolic Link Node + * @ingroup IMFS + */ + +/* * COPYRIGHT (c) 1989-2009. * On-Line Applications Research Corporation (OAR). * diff --git a/cpukit/libfs/src/imfs/imfs_unmount.c b/cpukit/libfs/src/imfs/imfs_unmount.c index e7b42676b2..590439d0a6 100644 --- a/cpukit/libfs/src/imfs/imfs_unmount.c +++ b/cpukit/libfs/src/imfs/imfs_unmount.c @@ -1,6 +1,11 @@ -/* - * IMFS_unmount +/** + * @file * + * @brief Unmount an IMFS + * @ingroup IMFS + */ + +/* * COPYRIGHT (c) 1989-1999. * On-Line Applications Research Corporation (OAR). * diff --git a/cpukit/libfs/src/imfs/imfs_utime.c b/cpukit/libfs/src/imfs/imfs_utime.c index 5eee799d7e..aa7d455c3a 100644 --- a/cpukit/libfs/src/imfs/imfs_utime.c +++ b/cpukit/libfs/src/imfs/imfs_utime.c @@ -1,9 +1,11 @@ -/* - * IMFS_utime - * - * This routine is the implementation of the utime() system - * call for the IMFS. +/** + * @file * + * @brief Set IMFS File Access and Modification Times + * @ingroup IMFS + */ + +/* * COPYRIGHT (c) 1989-1999. * On-Line Applications Research Corporation (OAR). * diff --git a/cpukit/libfs/src/imfs/ioman.c b/cpukit/libfs/src/imfs/ioman.c index 8b434e7e8c..27ec89ad21 100644 --- a/cpukit/libfs/src/imfs/ioman.c +++ b/cpukit/libfs/src/imfs/ioman.c @@ -1,7 +1,11 @@ -/* - * This file emulates the old Classic RTEMS IO manager directives - * which register and lookup names using the in-memory filesystem. +/** + * @file * + * @brief RTMES Register IO Name + * @ingroup ClassicIO + */ + +/* * COPYRIGHT (c) 1989-1999. * On-Line Applications Research Corporation (OAR). * @@ -22,12 +26,6 @@ #include <rtems/libio_.h> -/* - * rtems_io_register_name - * - * This assumes that all registered devices are character devices. - */ - rtems_status_code rtems_io_register_name( const char *device_name, rtems_device_major_number major, diff --git a/cpukit/libfs/src/imfs/memfile.c b/cpukit/libfs/src/imfs/memfile.c index 2eb7949275..901ebc6e2a 100644 --- a/cpukit/libfs/src/imfs/memfile.c +++ b/cpukit/libfs/src/imfs/memfile.c @@ -1,12 +1,11 @@ -/* - * IMFS Device Node Handlers - * - * This file contains the set of handlers used to process operations on - * IMFS memory file nodes. The memory files are created in memory using - * malloc'ed memory. Thus any data stored in one of these files is lost - * at system shutdown unless special arrangements to copy the data to - * some type of non-volailte storage are made by the application. +/** + * @file * + * @brief IMFS Memory File Handlers + * @ingroup IMFS + */ + +/* * COPYRIGHT (c) 1989-2010. * On-Line Applications Research Corporation (OAR). * @@ -71,12 +70,6 @@ void memfile_free_block( void *memory ); -/* - * memfile_open - * - * This routine processes the open() system call. Note that there is - * nothing special to be done at open() time. - */ int memfile_open( rtems_libio_t *iop, const char *pathname, @@ -109,11 +102,6 @@ int memfile_open( return 0; } -/* - * memfile_read - * - * This routine processes the read() system call. - */ ssize_t memfile_read( rtems_libio_t *iop, void *buffer, @@ -133,11 +121,6 @@ ssize_t memfile_read( return status; } -/* - * memfile_write - * - * This routine processes the write() system call. - */ ssize_t memfile_write( rtems_libio_t *iop, const void *buffer, @@ -166,11 +149,6 @@ ssize_t memfile_write( * This IMFS_stat() can be used. */ -/* - * memfile_ftruncate - * - * This routine processes the ftruncate() system call. - */ int memfile_ftruncate( rtems_libio_t *iop, off_t length diff --git a/cpukit/libfs/src/pipe/fifo.c b/cpukit/libfs/src/pipe/fifo.c index 06eacd712f..ba5e7b7e40 100644 --- a/cpukit/libfs/src/pipe/fifo.c +++ b/cpukit/libfs/src/pipe/fifo.c @@ -1,6 +1,11 @@ -/* - * fifo.c: POSIX FIFO/pipe for RTEMS +/** + * @file * + * @brief FIFO/Pipe Support + * @ingroup FIFO_PIPE + */ + +/* * Author: Wei Shen <cquark@gmail.com> * * The license and distribution terms for this file may be @@ -236,12 +241,6 @@ out: return err; } -/* - * Interface to file system close. - * - * *pipep points to pipe control structure. When the last user releases pipe, - * it will be set to NULL. - */ void pipe_release( pipe_control_t **pipep, rtems_libio_t *iop @@ -299,13 +298,6 @@ void pipe_release( } -/* - * Interface to file system open. - * - * *pipep points to pipe control structure. If called with *pipep = NULL, - * fifo_open will try allocating and initializing a control structure. If the - * call succeeds, *pipep will be set to address of new control structure. - */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop @@ -387,9 +379,6 @@ out_error: return err; } -/* - * Interface to file system read. - */ ssize_t pipe_read( pipe_control_t *pipe, void *buffer, @@ -459,9 +448,6 @@ out_nolock: return ret; } -/* - * Interface to file system write. - */ ssize_t pipe_write( pipe_control_t *pipe, const void *buffer, @@ -545,9 +531,6 @@ out_nolock: return ret; } -/* - * Interface to file system ioctl. - */ int pipe_ioctl( pipe_control_t *pipe, ioctl_command_t cmd, diff --git a/cpukit/libfs/src/pipe/pipe.c b/cpukit/libfs/src/pipe/pipe.c index 2fc9952cac..ed64dbb1aa 100644 --- a/cpukit/libfs/src/pipe/pipe.c +++ b/cpukit/libfs/src/pipe/pipe.c @@ -1,6 +1,11 @@ -/* - * pipe.c: anonymous pipe +/** + * @file * + * @brief Create an Anonymous Pipe + * @ingroup FIFO_PIPE + */ + +/* * Author: Wei Shen <cquark@gmail.com> * * The license and distribution terms for this file may be @@ -22,9 +27,6 @@ /* FIXME: This approach is questionable */ static uint16_t rtems_pipe_no = 0; -/* - * Called by pipe() to create an anonymous pipe. - */ int pipe_create( int filsdes[2] ) diff --git a/cpukit/libfs/src/pipe/pipe.h b/cpukit/libfs/src/pipe/pipe.h index 29e7542b43..6ba3c5ef42 100644 --- a/cpukit/libfs/src/pipe/pipe.h +++ b/cpukit/libfs/src/pipe/pipe.h @@ -22,6 +22,12 @@ extern "C" { #endif +/** + * @defgroup FIFO_PIPE FIFO/pipe File System Support + * + * @brief Interface to the POSIX FIFO/pipe File System + */ + /* Control block to manage each pipe */ typedef struct pipe_control { char *Buffer; @@ -42,14 +48,18 @@ typedef struct pipe_control { #endif } pipe_control_t; -/* +/** + * @brief Create an Anonymous Pipe + * * Called by pipe() to create an anonymous pipe. */ extern int pipe_create( int filsdes[2] ); -/* +/** + * @brief Release a Pipe + * * Interface to file system close. * * *pipep points to pipe control structure. When the last user releases pipe, @@ -60,7 +70,8 @@ extern void pipe_release( rtems_libio_t *iop ); -/* +/** + * @brief FIFO Open * Interface to file system open. * * *pipep points to pipe control structure. If called with *pipep = NULL, @@ -72,7 +83,9 @@ extern int fifo_open( rtems_libio_t *iop ); -/* +/** + * @brief Pipe Read + * * Interface to file system read. */ extern ssize_t pipe_read( @@ -82,7 +95,9 @@ extern ssize_t pipe_read( rtems_libio_t *iop ); -/* +/** + * @brief Pipe Write + * * Interface to file system write. */ extern ssize_t pipe_write( @@ -92,7 +107,9 @@ extern ssize_t pipe_write( rtems_libio_t *iop ); -/* +/** + * @brief Pipe IO Control + * * Interface to file system ioctl. */ extern int pipe_ioctl( diff --git a/cpukit/libfs/src/rfs/rtems-rfs-bitmaps.c b/cpukit/libfs/src/rfs/rtems-rfs-bitmaps.c index 85837b0009..c14c69d1fe 100644 --- a/cpukit/libfs/src/rfs/rtems-rfs-bitmaps.c +++ b/cpukit/libfs/src/rfs/rtems-rfs-bitmaps.c @@ -1,23 +1,23 @@ -/* - * COPYRIGHT (c) 2010 Chris Johns <chrisj@rtems.org> - * - * 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. - */ /** * @file * + * @brief RTEMS File Systems Bitmap Routines * @ingroup rtems-rfs - * - * RTEMS File Systems Bitmap Routines. - * + * * These functions manage bit maps. A bit map consists of the map of bit * allocated in a block and a search map where a bit represents 32 actual * bits. The search map allows for a faster search for an available bit as 32 * search bits can checked in a test. */ +/* + * COPYRIGHT (c) 2010 Chris Johns <chrisj@rtems.org> + * + * 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. + */ + #if HAVE_CONFIG_H #include "config.h" #endif diff --git a/cpukit/libfs/src/rfs/rtems-rfs-block.c b/cpukit/libfs/src/rfs/rtems-rfs-block.c index 7ebc4d76a6..4ad73b2ee3 100644 --- a/cpukit/libfs/src/rfs/rtems-rfs-block.c +++ b/cpukit/libfs/src/rfs/rtems-rfs-block.c @@ -1,21 +1,13 @@ -/* - * COPYRIGHT (c) 2010 Chris Johns <chrisj@rtems.org> - * - * 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. - */ /** * @file * + * @brief RTEMS File Systems Block Routines * @ingroup rtems-rfs - * - * RTEMS File Systems Block Routines. - * + * * These functions manage blocks in the RFS file system. A block is an area of * the media and its size is set for a each specific media. The block size is - * set when the file system is set up and needs to be matched for it to be read - * correctly. + * set when the file system is set up and needs to be matched for it to be + * read correctly. * * Blocks are managed as groups. A block group or "group" is part of the total * number of blocks being managed by the file system and exist to allow @@ -26,12 +18,20 @@ * A group consist of a block bitmap, inodes and data blocks. The first block * of the file system will hold the superblock. The block bitmap is a * collection of blocks that hold a map of bits, one bit per block for each - * block in the group. When a file system is mounted the block bitmaps are read - * and a summary bit map is made. The summary bitmap has a single bit for 32 - * bits in the bitmap and is set when all 32 bits it maps to are set. This + * block in the group. When a file system is mounted the block bitmaps are + * read and a summary bit map is made. The summary bitmap has a single bit for + * 32 bits in the bitmap and is set when all 32 bits it maps to are set. This * speeds up the search for a free block by a factor of 32. */ +/* + * COPYRIGHT (c) 2010 Chris Johns <chrisj@rtems.org> + * + * 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. + */ + #if HAVE_CONFIG_H #include "config.h" #endif diff --git a/cpukit/libfs/src/rfs/rtems-rfs-dir-hash.c b/cpukit/libfs/src/rfs/rtems-rfs-dir-hash.c index 951bce1a0a..db8f21a8b0 100644 --- a/cpukit/libfs/src/rfs/rtems-rfs-dir-hash.c +++ b/cpukit/libfs/src/rfs/rtems-rfs-dir-hash.c @@ -1,9 +1,8 @@ /** * @file * + * @brief RTEMS File Systems Directory Hash function * @ingroup rtems-rfs - * - * RTEMS File Systems Directory Hash function. */ #if HAVE_CONFIG_H diff --git a/cpukit/libfs/src/rfs/rtems-rfs-inode.c b/cpukit/libfs/src/rfs/rtems-rfs-inode.c index 6c49b2ac7a..51129e9378 100644 --- a/cpukit/libfs/src/rfs/rtems-rfs-inode.c +++ b/cpukit/libfs/src/rfs/rtems-rfs-inode.c @@ -1,20 +1,19 @@ -/* - * COPYRIGHT (c) 2010 Chris Johns <chrisj@rtems.org> - * - * 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. - */ /** * @file * + * @brief RTEMS File Systems Inode Routines * @ingroup rtems-rfs - * - * RTEMS File Systems Inode Routines. - * + * * These functions manage inodes in the RFS file system. An inode is part of a * block that reside after the bitmaps in the group. */ +/* + * COPYRIGHT (c) 2010 Chris Johns <chrisj@rtems.org> + * + * 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. + */ #if HAVE_CONFIG_H #include "config.h" diff --git a/cpukit/libfs/src/rfs/rtems-rfs-link.c b/cpukit/libfs/src/rfs/rtems-rfs-link.c index 7211e3ad59..225a37fac9 100644 --- a/cpukit/libfs/src/rfs/rtems-rfs-link.c +++ b/cpukit/libfs/src/rfs/rtems-rfs-link.c @@ -1,3 +1,13 @@ +/** + * @file + * + * @brief RTEMS File Systems Link Routines + * @ingroup rtems-rfs + * + * These functions manage links. A link is the addition of a directory entry + * in a parent directory and incrementing the links count in the inode. + */ + /* * COPYRIGHT (c) 2010 Chris Johns <chrisj@rtems.org> * @@ -5,16 +15,6 @@ * found in the file LICENSE in this distribution or at * http://www.rtems.com/license/LICENSE. */ -/** - * @file - * - * @ingroup rtems-rfs - * - * RTEMS File Systems Link Routines. - * - * These functions manage links. A link is the addition of a directory entry in - * a parent directory and incrementing the links count in the inode. - */ #if HAVE_CONFIG_H #include "config.h" diff --git a/cpukit/libfs/src/rfs/rtems-rfs-mutex.c b/cpukit/libfs/src/rfs/rtems-rfs-mutex.c index 4fd6f384fe..7bf92f7cd5 100644 --- a/cpukit/libfs/src/rfs/rtems-rfs-mutex.c +++ b/cpukit/libfs/src/rfs/rtems-rfs-mutex.c @@ -1,3 +1,9 @@ +/** + * @file + * + * @brief RTEMS File System Mutex + * @ingroup rtems-rfs + */ /* * COPYRIGHT (c) 2010 Chris Johns <chrisj@rtems.org> * @@ -5,13 +11,6 @@ * found in the file LICENSE in this distribution or at * http://www.rtems.com/license/LICENSE. */ -/** - * @file - * - * @ingroup rtems-rfs - * - * RTEMS File System Mutex. - */ #if HAVE_CONFIG_H #include "config.h" diff --git a/cpukit/libfs/src/rfs/rtems-rfs-rtems-dev.c b/cpukit/libfs/src/rfs/rtems-rfs-rtems-dev.c index ced234a796..97d0104cdd 100644 --- a/cpukit/libfs/src/rfs/rtems-rfs-rtems-dev.c +++ b/cpukit/libfs/src/rfs/rtems-rfs-rtems-dev.c @@ -1,20 +1,19 @@ -/* - * COPYRIGHT (c) 2010 Chris Johns <chrisj@rtems.org> - * - * 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. - */ /** * @file * + * @brief RTEMS RFS Device Interface * @ingroup rtems-rfs - * - * RTEMS RFS Device Interface. - * + * * This file contains the set of handlers used to map operations on RFS device * nodes onto calls to the RTEMS Classic API IO Manager. + */ + +/* + * COPYRIGHT (c) 2010 Chris Johns <chrisj@rtems.org> * + * 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. */ #if HAVE_CONFIG_H diff --git a/cpukit/libfs/src/rfs/rtems-rfs-rtems.c b/cpukit/libfs/src/rfs/rtems-rfs-rtems.c index 6ff9793911..d2aac56429 100644 --- a/cpukit/libfs/src/rfs/rtems-rfs-rtems.c +++ b/cpukit/libfs/src/rfs/rtems-rfs-rtems.c @@ -1,3 +1,10 @@ +/** + * @file + * + * @brief RTEMS File System Interface for RTEMS + * @ingroup rtems-rfs + */ + /* * COPYRIGHT (c) 2010 Chris Johns <chrisj@rtems.org> * @@ -8,13 +15,6 @@ * found in the file LICENSE in this distribution or at * http://www.rtems.com/license/LICENSE. */ -/** - * @file - * - * @ingroup rtems-rfs - * - * RTEMS File System Interface for RTEMS. - */ #if HAVE_CONFIG_H #include "config.h" diff --git a/cpukit/libfs/src/rfs/rtems-rfs-rtems.h b/cpukit/libfs/src/rfs/rtems-rfs-rtems.h index c475c4025b..00fcb27143 100644 --- a/cpukit/libfs/src/rfs/rtems-rfs-rtems.h +++ b/cpukit/libfs/src/rfs/rtems-rfs-rtems.h @@ -46,7 +46,7 @@ * * @param what The message to print is the error is not zero. * @param error The error code. - * @retval -1 An error has occured. + * @retval -1 An error has occurred. * @retval 0 No error. */ int rtems_rfs_rtems_error (const char* mesg, int error); |