From f36a7bfcde756cae3b3e933f0e688137fb684be8 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Thu, 28 Feb 2002 20:43:50 +0000 Subject: 2002-02-28 Victor V. Vengerov * DOS filesystem including FAT12, FAT16, and FAT32 support submitted. * src/dosfs, src/dosfs/Makefile.am, src/dosfs/stamp-h2.in, src/dosfs/config.h.in, src/dosfs/dosfs.h, src/dosfs/fat.c, src/dosfs/fat.h, src/dosfs/fat_fat_operations.c, src/dosfs/fat_fat_operations.h, src/dosfs/fat_file.c, src/dosfs/fat_file.h, src/dosfs/msdos.h, src/dosfs/msdos_create.c, src/dosfs/msdos_dir.c, src/dosfs/msdos_eval.c, src/dosfs/msdos_file.c, src/dosfs/msdos_free.c, src/dosfs/msdos_fsunmount.c, src/dosfs/msdos_handlers_dir.c, src/dosfs/msdos_handlers_file.c, src/dosfs/msdos_init.c, src/dosfs/msdos_initsupp.c, src/dosfs/msdos_misc.c, src/dosfs/msdos_mknod.c, src/dosfs/msdos_node_type.c, src/dosfs/.cvsignore: New files. * configure.ac, src/Makefile.am, wrapup/Makefile.am: Modified to reflect addition. --- c/src/libfs/src/dosfs/msdos_node_type.c | 58 +++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 c/src/libfs/src/dosfs/msdos_node_type.c (limited to 'c/src/libfs/src/dosfs/msdos_node_type.c') diff --git a/c/src/libfs/src/dosfs/msdos_node_type.c b/c/src/libfs/src/dosfs/msdos_node_type.c new file mode 100644 index 0000000000..517dabda3f --- /dev/null +++ b/c/src/libfs/src/dosfs/msdos_node_type.c @@ -0,0 +1,58 @@ +/* + * The following returns the type of node that the loc refers to. + * + * Copyright (C) 2001 OKTET Ltd., St.-Petersburg, Russia + * Author: Eugeny S. Mints + * + * 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. + * + * @(#) $Id$ + */ + +#if HAVE_CONFIG_H +#include "config.h" +#endif + +#include +#include +#include +#include +#include +#include +#include + +#include + +#include "fat.h" +#include "fat_fat_operations.h" +#include "fat_file.h" + +#include "msdos.h" + +/* msdos_node_type -- + * Determine type of the node that the pathloc refers to. + * + * PARAMETERS: + * pathloc - node description + * + * RETURNS: + * node type + * + */ +rtems_filesystem_node_types_t +msdos_node_type(rtems_filesystem_location_info_t *pathloc) +{ + fat_file_fd_t *fat_fd; + + /* + * we don't need to obtain the volume semaphore here because node_type_h + * call always follows evalpath_h call(hence link increment occured) and + * hence node_access memory can't be freed during processing node_type_h + * call + */ + fat_fd = pathloc->node_access; + + return fat_fd->fat_file_type; +} -- cgit v1.2.3