summaryrefslogtreecommitdiffstats
path: root/cpukit/libfs/src/dosfs/msdos_eval.c
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2009-04-29 08:31:27 +0000
committerChris Johns <chrisj@rtems.org>2009-04-29 08:31:27 +0000
commit07d6fd513f1c4d3c6905c880948671de1181fac2 (patch)
tree4dabf3fdd0b056bba7b0e9beb40f01277e5c2776 /cpukit/libfs/src/dosfs/msdos_eval.c
parent2009-04-28 Chris Johns <chrisj@rtems.org> (diff)
downloadrtems-07d6fd513f1c4d3c6905c880948671de1181fac2.tar.bz2
2009-04-29 Chris Johns <chrisj@rtems.org>
* libcsupport/include/rtems/libio.h: Add rtems_off64_t for internal use. Update the internal off_t to the 64bit offset. * libnetworking/lib/ftpfs.c, libnetworking/lib/tftpDriver.c, libfs/src/nfsclient/src/nfs.c, libfs/src/imfs/imfs_fifo.c, libfs/src/imfs/memfile.c, libfs/src/imfs/imfs_directory.c, libfs/src/imfs/imfs.h, libfs/src/imfs/deviceio.c: Change off_t to rtems_off64_t. * libmisc/shell/main_msdosfmt.c: Add an info level so the format code can tell the user what is happening. Add more options to control the format configuration. * libfs/src/dosfs/msdos_format.c: Add a print function to display the format progress and print statements. Select a better default cluster size depending on the size of the disk. This lowers the size of the FAT on large disks. Read and maintain the MRB partition information. * libfs/src/dosfs/dosfs.h, libfs/src/dosfs/fat.h, libfs/src/dosfs/fat_file.c, libfs/src/dosfs/fat_file.h, libfs/src/dosfs/msdos.h, libfs/src/dosfs/msdos_conv.c, libfs/src/dosfs/msdos_create.c, libfs/src/dosfs/msdos_file.c, libfs/src/dosfs/msdos_handlers_dir.c, libfs/src/dosfs/msdos_handlers_file.c, libfs/src/dosfs/msdos_init.c, libfs/src/dosfs/msdos_initsupp.c, libfs/src/dosfs/msdos_misc.c, libfs/src/dosfs/msdos_mknod.c: Add long file name support. Change off_t to rtems_off64_t.
Diffstat (limited to 'cpukit/libfs/src/dosfs/msdos_eval.c')
-rw-r--r--cpukit/libfs/src/dosfs/msdos_eval.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/cpukit/libfs/src/dosfs/msdos_eval.c b/cpukit/libfs/src/dosfs/msdos_eval.c
index 81cae010ad..5eabedb2a4 100644
--- a/cpukit/libfs/src/dosfs/msdos_eval.c
+++ b/cpukit/libfs/src/dosfs/msdos_eval.c
@@ -82,9 +82,9 @@ msdos_eval_path(
fat_file_fd_t *fat_fd = NULL;
rtems_filesystem_location_info_t newloc;
int i = 0;
- int len = 0;
+ int token_len = 0;
msdos_token_types_t type = MSDOS_CURRENT_DIR;
- char token[MSDOS_NAME_MAX + 1];
+ const char *token;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
@@ -106,8 +106,8 @@ msdos_eval_path(
while ((type != MSDOS_NO_MORE_PATH) && (type != MSDOS_INVALID_TOKEN))
{
- type = msdos_get_token(&pathname[i], token, &len);
- i += len;
+ type = msdos_get_token(&pathname[i], &token, &token_len);
+ i += token_len;
fat_fd = pathloc->node_access;
@@ -149,13 +149,13 @@ msdos_eval_path(
goto err;
rtems_semaphore_release(fs_info->vol_sema);
- return (*pathloc->ops->evalpath_h)(&(pathname[i-len]),
+ return (*pathloc->ops->evalpath_h)(&(pathname[i-token_len]),
flags, pathloc);
}
}
else
{
- rc = msdos_find_name(pathloc, token);
+ rc = msdos_find_name(pathloc, token, token_len);
if (rc != RC_OK)
{
if (rc == MSDOS_NAME_NOT_FOUND_ERR)
@@ -183,7 +183,7 @@ msdos_eval_path(
* Otherwise find the token name in the present location and
* set the node access to the point we have found.
*/
- rc = msdos_find_name(pathloc, token);
+ rc = msdos_find_name(pathloc, token, token_len);
if (rc != RC_OK)
{
if (rc == MSDOS_NAME_NOT_FOUND_ERR)
@@ -264,8 +264,8 @@ msdos_eval4make(
rtems_filesystem_location_info_t newloc;
msdos_token_types_t type;
int i = 0;
- int len;
- char token[ MSDOS_NAME_MAX + 1 ];
+ int token_len;
+ const char *token;
bool done = false;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
@@ -288,8 +288,8 @@ msdos_eval4make(
while (!done)
{
- type = msdos_get_token(&path[i], token, &len);
- i += len;
+ type = msdos_get_token(&path[i], &token, &token_len);
+ i += token_len;
fat_fd = pathloc->node_access;
switch (type)
@@ -330,13 +330,13 @@ msdos_eval4make(
goto err;
rtems_semaphore_release(fs_info->vol_sema);
- return (*pathloc->ops->evalformake_h)(&path[i-len],
+ return (*pathloc->ops->evalformake_h)(&path[i-token_len],
pathloc, name);
}
}
else
{
- rc = msdos_find_name(pathloc, token);
+ rc = msdos_find_name(pathloc, token, token_len);
if (rc != RC_OK)
{
if (rc == MSDOS_NAME_NOT_FOUND_ERR)
@@ -361,10 +361,10 @@ msdos_eval4make(
}
/*
- * Otherwise find the token name in the present location and
+ * Otherwise find the token name in the present location and
* set the node access to the point we have found.
*/
- rc = msdos_find_name(pathloc, token);
+ rc = msdos_find_name(pathloc, token, token_len);
if (rc)
{
if (rc != MSDOS_NAME_NOT_FOUND_ERR)
@@ -396,7 +396,7 @@ msdos_eval4make(
}
}
- *name = &path[i - len];
+ *name = &path[i - token_len];
/*
* We have evaluated the path as far as we can.