summaryrefslogtreecommitdiffstats
path: root/cpukit/libfs/src/dosfs/msdos_misc.c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2005-05-06 14:57:43 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2005-05-06 14:57:43 +0000
commitb17ff4913cc7f3d87e41da83a26655b4f0b9001f (patch)
tree2cc4cb2902f58bbe6e087048eb8527000f9ae133 /cpukit/libfs/src/dosfs/msdos_misc.c
parent2005-05-06 Joel Sherrill <joel@OARcorp.com> (diff)
downloadrtems-b17ff4913cc7f3d87e41da83a26655b4f0b9001f.tar.bz2
2005-05-06 Joel Sherrill <joel@OARcorp.com>
* libblock/src/blkdev.c, libfs/src/dosfs/fat_file.c, libfs/src/dosfs/fat_file.h, libfs/src/dosfs/msdos.h, libfs/src/dosfs/msdos_create.c, libfs/src/dosfs/msdos_dir.c, libfs/src/dosfs/msdos_initsupp.c, libfs/src/dosfs/msdos_misc.c: Removed warnings.
Diffstat (limited to '')
-rw-r--r--cpukit/libfs/src/dosfs/msdos_misc.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/cpukit/libfs/src/dosfs/msdos_misc.c b/cpukit/libfs/src/dosfs/msdos_misc.c
index 2a4fc41ab2..b256c5e5e1 100644
--- a/cpukit/libfs/src/dosfs/msdos_misc.c
+++ b/cpukit/libfs/src/dosfs/msdos_misc.c
@@ -285,7 +285,7 @@ msdos_get_name_node(
ret = fat_file_write(parent_loc->mt_entry, fat_fd,
fat_fd->fat_file_size,
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE,
- name_dir_entry);
+ (uint8_t *)name_dir_entry);
if (ret == -1)
return -1;
@@ -706,11 +706,12 @@ msdos_dir_is_empty(
assert(ret == fs_info->fat.vol.bps);
+ /* have to look at the DIR_NAME as "raw" 8-bit data */
for (i = 0;
i < fs_info->fat.vol.bps;
i += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
{
- if (((*MSDOS_DIR_NAME(fs_info->cl_buf + i)) ==
+ if (((*(uint8_t *)MSDOS_DIR_NAME(fs_info->cl_buf + i)) ==
MSDOS_THIS_DIR_ENTRY_EMPTY) ||
(strncmp(MSDOS_DIR_NAME((fs_info->cl_buf + i)), MSDOS_DOT_NAME,
MSDOS_SHORT_NAME_LEN) == 0) ||
@@ -790,12 +791,13 @@ msdos_find_name_in_fat_file(
assert(ret == bts2rd);
+ /* have to look at the DIR_NAME as "raw" 8-bit data */
for (i = 0; i < bts2rd; i += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
{
/* is the entry empty ? */
- if (((*MSDOS_DIR_NAME(fs_info->cl_buf + i)) ==
+ if (((*(uint8_t *)MSDOS_DIR_NAME(fs_info->cl_buf + i)) ==
MSDOS_THIS_DIR_ENTRY_AND_REST_EMPTY) ||
- ((*MSDOS_DIR_NAME(fs_info->cl_buf + i)) ==
+ ((*(uint8_t *)MSDOS_DIR_NAME(fs_info->cl_buf + i)) ==
MSDOS_THIS_DIR_ENTRY_EMPTY))
{
/* whether we are looking for an empty entry */
@@ -813,7 +815,7 @@ msdos_find_name_in_fat_file(
/* write new node entry */
ret = fat_file_write(mt_entry, fat_fd, j * bts2rd + i,
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE,
- name_dir_entry);
+ (uint8_t *)name_dir_entry);
if (ret != MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
return -1;
@@ -914,8 +916,9 @@ msdos_find_node_by_cluster_num_in_fat_file(
MSDOS_THIS_DIR_ENTRY_AND_REST_EMPTY)
return MSDOS_NAME_NOT_FOUND_ERR;
+ /* have to look at the DIR_NAME as "raw" 8-bit data */
/* if this entry is empty - skip it */
- if ((*MSDOS_DIR_NAME(fs_info->cl_buf + i)) ==
+ if ((*(uint8_t *)MSDOS_DIR_NAME(fs_info->cl_buf + i)) ==
MSDOS_THIS_DIR_ENTRY_EMPTY)
continue;