summaryrefslogtreecommitdiffstats
path: root/cpukit/libfs
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2015-03-05 10:34:28 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2015-03-05 11:23:10 +0100
commitc735cd5a1f24bcf5023fcd5fc4097a1fced45652 (patch)
treee28ae0bcd818200f8548c7df685c26169725fbbc /cpukit/libfs
parenttests: Fix warning (diff)
downloadrtems-c735cd5a1f24bcf5023fcd5fc4097a1fced45652.tar.bz2
dosfs: Fix warnings
Diffstat (limited to 'cpukit/libfs')
-rw-r--r--cpukit/libfs/src/dosfs/fat_file.h1
-rw-r--r--cpukit/libfs/src/dosfs/msdos.h9
-rw-r--r--cpukit/libfs/src/dosfs/msdos_create.c8
-rw-r--r--cpukit/libfs/src/dosfs/msdos_eval.c2
-rw-r--r--cpukit/libfs/src/dosfs/msdos_mknod.c6
-rw-r--r--cpukit/libfs/src/dosfs/msdos_rename.c2
-rw-r--r--cpukit/libfs/src/dosfs/msdos_rmnod.c2
7 files changed, 12 insertions, 18 deletions
diff --git a/cpukit/libfs/src/dosfs/fat_file.h b/cpukit/libfs/src/dosfs/fat_file.h
index 9905757e6f..0f491a9002 100644
--- a/cpukit/libfs/src/dosfs/fat_file.h
+++ b/cpukit/libfs/src/dosfs/fat_file.h
@@ -39,6 +39,7 @@ extern "C" {
typedef enum {
FAT_DIRECTORY = 0,
+ FAT_HARD_LINK = 2, /* pseudo type */
FAT_FILE = 4
} fat_file_type_t;
diff --git a/cpukit/libfs/src/dosfs/msdos.h b/cpukit/libfs/src/dosfs/msdos.h
index e6cffbba91..d1ce5ad039 100644
--- a/cpukit/libfs/src/dosfs/msdos.h
+++ b/cpukit/libfs/src/dosfs/msdos.h
@@ -85,13 +85,6 @@ extern const rtems_filesystem_file_handlers_r msdos_file_handlers;
* of ticks to help debugging or if you need such a */
#define MSDOS_VOLUME_SEMAPHORE_TIMEOUT RTEMS_NO_TIMEOUT
-/* Node types */
-typedef enum {
- MSDOS_DIRECTORY = 0,
- MSDOS_REGULAR_FILE = 4,
- MSDOS_HARD_LINK = 2 /* pseudo type */
-} msdos_node_type_t;
-
/*
* Macros for fetching fields from 32 bytes long FAT Directory Entry
* Structure
@@ -370,7 +363,7 @@ int msdos_dir_stat(
*
*/
int msdos_creat_node(const rtems_filesystem_location_info_t *parent_loc,
- msdos_node_type_t type,
+ fat_file_type_t type,
const char *name,
int name_len,
mode_t mode,
diff --git a/cpukit/libfs/src/dosfs/msdos_create.c b/cpukit/libfs/src/dosfs/msdos_create.c
index 9eab2fb2cb..33bef0876f 100644
--- a/cpukit/libfs/src/dosfs/msdos_create.c
+++ b/cpukit/libfs/src/dosfs/msdos_create.c
@@ -59,7 +59,7 @@
*/
int
msdos_creat_node(const rtems_filesystem_location_info_t *parent_loc,
- msdos_node_type_t type,
+ fat_file_type_t type,
const char *name,
int name_len,
mode_t mode,
@@ -115,10 +115,10 @@ msdos_creat_node(const rtems_filesystem_location_info_t *parent_loc,
/* initialize directory/file size */
*MSDOS_DIR_FILE_SIZE(short_node) = MSDOS_INIT_DIR_SIZE;
- if (type == MSDOS_DIRECTORY) {
+ if (type == FAT_DIRECTORY) {
*MSDOS_DIR_ATTR(short_node) |= MSDOS_ATTR_DIRECTORY;
}
- else if (type == MSDOS_HARD_LINK) {
+ else if (type == FAT_HARD_LINK) {
/*
* when we establish a (temporary) hard link,
* we must copy some information from the original
@@ -177,7 +177,7 @@ msdos_creat_node(const rtems_filesystem_location_info_t *parent_loc,
* if we create a new file we are done, if directory there are more steps
* to do
*/
- if (type == MSDOS_DIRECTORY)
+ if (type == FAT_DIRECTORY)
{
/* open new directory as fat-file */
rc = fat_file_open(&fs_info->fat, &dir_pos, &fat_fd);
diff --git a/cpukit/libfs/src/dosfs/msdos_eval.c b/cpukit/libfs/src/dosfs/msdos_eval.c
index 46e6f0ef70..3c1294698c 100644
--- a/cpukit/libfs/src/dosfs/msdos_eval.c
+++ b/cpukit/libfs/src/dosfs/msdos_eval.c
@@ -64,7 +64,7 @@ static bool msdos_is_directory(
rtems_filesystem_eval_path_get_currentloc( ctx );
fat_file_fd_t *fat_fd = currentloc->node_access;
- return fat_fd->fat_file_type == MSDOS_DIRECTORY;
+ return fat_fd->fat_file_type == FAT_DIRECTORY;
}
static rtems_filesystem_eval_path_generic_status msdos_eval_token(
diff --git a/cpukit/libfs/src/dosfs/msdos_mknod.c b/cpukit/libfs/src/dosfs/msdos_mknod.c
index 0b5bfd20b8..28b34636d4 100644
--- a/cpukit/libfs/src/dosfs/msdos_mknod.c
+++ b/cpukit/libfs/src/dosfs/msdos_mknod.c
@@ -43,18 +43,18 @@ int msdos_mknod(
)
{
int rc = RC_OK;
- msdos_node_type_t type = 0;
+ fat_file_type_t type = 0;
/*
* Figure out what type of msdos node this is.
*/
if (S_ISDIR(mode))
{
- type = MSDOS_DIRECTORY;
+ type = FAT_DIRECTORY;
}
else if (S_ISREG(mode))
{
- type = MSDOS_REGULAR_FILE;
+ type = FAT_FILE;
}
else
rtems_set_errno_and_return_minus_one(EINVAL);
diff --git a/cpukit/libfs/src/dosfs/msdos_rename.c b/cpukit/libfs/src/dosfs/msdos_rename.c
index c50bd93cd3..47d70ecc2d 100644
--- a/cpukit/libfs/src/dosfs/msdos_rename.c
+++ b/cpukit/libfs/src/dosfs/msdos_rename.c
@@ -51,7 +51,7 @@ msdos_rename(
* existing file
*/
rc = msdos_creat_node(new_parent_loc,
- MSDOS_HARD_LINK,new_name,new_namelen,S_IFREG,
+ FAT_HARD_LINK,new_name,new_namelen,S_IFREG,
old_fat_fd);
if (rc != RC_OK)
{
diff --git a/cpukit/libfs/src/dosfs/msdos_rmnod.c b/cpukit/libfs/src/dosfs/msdos_rmnod.c
index 44d582d148..b91728cb45 100644
--- a/cpukit/libfs/src/dosfs/msdos_rmnod.c
+++ b/cpukit/libfs/src/dosfs/msdos_rmnod.c
@@ -28,7 +28,7 @@ msdos_rmnod(const rtems_filesystem_location_info_t *parent_pathloc,
msdos_fs_info_t *fs_info = pathloc->mt_entry->fs_info;
fat_file_fd_t *fat_fd = pathloc->node_access;
- if (fat_fd->fat_file_type == MSDOS_DIRECTORY)
+ if (fat_fd->fat_file_type == FAT_FILE)
{
bool is_empty = false;