From ce275cffd6ed98436ab689347d3b6db9ec047061 Mon Sep 17 00:00:00 2001 From: Jennifer Averett Date: Wed, 6 Aug 2003 19:14:14 +0000 Subject: 2003-08-06 Thomas Doerfler PR 369/filesystem * Makefile.am, shell/cmds.c, wrapup/Makefile.am: sample application to show the use of the DOSFS functions * fsmount/Makefile.am, fsmount/README, fsmount/fsmount.c, fsmount/fsmount.h: New files. --- cpukit/libmisc/fsmount/fsmount.h | 71 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 cpukit/libmisc/fsmount/fsmount.h (limited to 'cpukit/libmisc/fsmount/fsmount.h') diff --git a/cpukit/libmisc/fsmount/fsmount.h b/cpukit/libmisc/fsmount/fsmount.h new file mode 100644 index 0000000000..52346d6d88 --- /dev/null +++ b/cpukit/libmisc/fsmount/fsmount.h @@ -0,0 +1,71 @@ +/*===============================================================*\ +| Project: RTEMS fsmount | ++-----------------------------------------------------------------+ +| File: fsmount.h | ++-----------------------------------------------------------------+ +| Copyright (c) 2003 IMD | +| Ingenieurbuero fuer Microcomputertechnik Th. Doerfler | +| | +| all rights reserved | ++-----------------------------------------------------------------+ +| this file contains the fsmount functions. These functions | +| are used to mount a list of filesystems (and create their mount | +| points before) | +| | +| The license and distribution terms for this file may be | +| found in the file LICENSE in this distribution or at | +| http://www.OARcorp.com/rtems/license.html. | +| | ++-----------------------------------------------------------------+ +| date history ID | +| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | +| 02.07.03 creation doe | +\*===============================================================*/ +#ifndef _FSMOUNT_H +#define _FSMOUNT_H +#include +#include +#include + +/* + * bits to define, what errors will cause reporting (via printf) and + * abort of mount processing + * Use a combination of these bits + * for the fields "report_reasons" and "abort_reasons" + */ +#define FSMOUNT_MNT_OK 0x0001 /* mounted ok */ +#define FSMOUNT_MNTPNT_CRTERR 0x0002 /* cannot create mount point */ +#define FSMOUNT_MNT_FAILED 0x0004 /* mounting failed */ + +typedef struct { + char *dev; + char *mount_point; + rtems_filesystem_operations_table *fs_ops; + rtems_filesystem_options_t mount_options; + unsigned16 report_reasons; + unsigned16 abort_reasons; +} fstab_t; + + +/*=========================================================================*\ +| Function: | +\*-------------------------------------------------------------------------*/ +int rtems_fsmount +( +/*-------------------------------------------------------------------------*\ +| Purpose: | +| This function will create the mount points listed and mount the file | +| systems listed in the calling parameters | ++---------------------------------------------------------------------------+ +| Input Parameters: | +\*-------------------------------------------------------------------------*/ + const fstab_t *fstab_ptr, /* Ptr to filesystem mount table */ + int fstab_count, /* number of entries in mount table*/ + int *fail_idx /* return: index of failed entry */ + ); +/*-------------------------------------------------------------------------*\ +| Return Value: | +| 0, if success, -1 and errno if failed | +\*=========================================================================*/ + +#endif /* _FSMOUNT_H */ -- cgit v1.2.3