From a5305f6b33159d425e6fc5beb6807a675f70ecc9 Mon Sep 17 00:00:00 2001 From: Ralf Corsepius Date: Sat, 17 Apr 2004 08:34:41 +0000 Subject: Remove stray white spaces. --- cpukit/libfs/src/dosfs/msdos_eval.c | 152 ++++++++++++++++++------------------ 1 file changed, 76 insertions(+), 76 deletions(-) (limited to 'cpukit/libfs/src/dosfs/msdos_eval.c') diff --git a/cpukit/libfs/src/dosfs/msdos_eval.c b/cpukit/libfs/src/dosfs/msdos_eval.c index 3cd07f7b84..0bba0c0a5e 100644 --- a/cpukit/libfs/src/dosfs/msdos_eval.c +++ b/cpukit/libfs/src/dosfs/msdos_eval.c @@ -32,7 +32,7 @@ #include "msdos.h" /* msdos_set_handlers -- - * Set handlers for the node with specified type(i.e. handlers for file + * Set handlers for the node with specified type(i.e. handlers for file * or directory). * * PARAMETERS: @@ -41,10 +41,10 @@ * RETURNS: * None */ -static void +static void msdos_set_handlers(rtems_filesystem_location_info_t *loc) { - msdos_fs_info_t *fs_info = loc->mt_entry->fs_info; + msdos_fs_info_t *fs_info = loc->mt_entry->fs_info; fat_file_fd_t *fat_fd = loc->node_access; if (fat_fd->fat_file_type == FAT_DIRECTORY) @@ -67,13 +67,13 @@ msdos_set_handlers(rtems_filesystem_location_info_t *loc) * RETURNS: * RC_OK and filled pathloc on success, or -1 if error occured * (errno set appropriately) - * + * */ -int +int msdos_eval_path( const char *pathname, int flags, - rtems_filesystem_location_info_t *pathloc + rtems_filesystem_location_info_t *pathloc ) { int rc = RC_OK; @@ -90,28 +90,28 @@ msdos_eval_path( MSDOS_VOLUME_SEMAPHORE_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) set_errno_and_return_minus_one(EIO); - + if (!pathloc->node_access) { errno = ENOENT; rc = -1; goto err; - } + } - fat_fd = pathloc->node_access; + fat_fd = pathloc->node_access; rc = fat_file_reopen(fat_fd); if (rc != RC_OK) goto err; - - while ((type != MSDOS_NO_MORE_PATH) && (type != MSDOS_INVALID_TOKEN)) + + while ((type != MSDOS_NO_MORE_PATH) && (type != MSDOS_INVALID_TOKEN)) { type = msdos_get_token(&pathname[i], token, &len); i += len; - - fat_fd = pathloc->node_access; - - switch (type) + + fat_fd = pathloc->node_access; + + switch (type) { case MSDOS_UP_DIR: /* @@ -122,24 +122,24 @@ msdos_eval_path( errno = ENOTDIR; rc = -1; goto error; - } + } /* * Am I at the root of this mounted filesystem? */ - if (pathloc->node_access == - pathloc->mt_entry->mt_fs_root.node_access) + if (pathloc->node_access == + pathloc->mt_entry->mt_fs_root.node_access) { /* * Am I at the root of all filesystems? * XXX: MSDOS is not supposed to be base fs. */ - if (pathloc->node_access == - rtems_filesystem_root.node_access) - { + if (pathloc->node_access == + rtems_filesystem_root.node_access) + { break; /* Throw out the .. in this case */ - } - else + } + else { newloc = pathloc->mt_entry->mt_point_node; *pathloc = newloc; @@ -147,13 +147,13 @@ msdos_eval_path( rc = fat_file_close(pathloc->mt_entry, fat_fd); if (rc != RC_OK) goto err; - + rtems_semaphore_release(fs_info->vol_sema); return (*pathloc->ops->evalpath_h)(&(pathname[i-len]), flags, pathloc); } - } - else + } + else { rc = msdos_find_name(pathloc, token); if (rc != RC_OK) @@ -162,9 +162,9 @@ msdos_eval_path( { errno = ENOENT; rc = -1; - } - goto error; - } + } + goto error; + } } break; @@ -177,10 +177,10 @@ msdos_eval_path( errno = ENOTDIR; rc = -1; goto error; - } + } /* - * 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); @@ -190,13 +190,13 @@ msdos_eval_path( { errno = ENOENT; rc = -1; - } - goto error; - } + } + goto error; + } break; case MSDOS_NO_MORE_PATH: - case MSDOS_CURRENT_DIR: + case MSDOS_CURRENT_DIR: break; case MSDOS_INVALID_TOKEN: @@ -204,7 +204,7 @@ msdos_eval_path( rc = -1; goto error; break; - + } } @@ -214,15 +214,15 @@ msdos_eval_path( * If we are at a node that is a mount point. Set loc to the * new fs root node and let let the mounted filesystem set the handlers. * - * NOTE: The behavior of stat() on a mount point appears to be + * NOTE: The behavior of stat() on a mount point appears to be * questionable. * NOTE: MSDOS filesystem currently doesn't support mount functionality -> * action not implemented */ fat_fd = pathloc->node_access; - + msdos_set_handlers(pathloc); - + rtems_semaphore_release(fs_info->vol_sema); return RC_OK; @@ -231,7 +231,7 @@ error: err: rtems_semaphore_release(fs_info->vol_sema); - return rc; + return rc; } /* msdos_eval4make -- @@ -242,20 +242,20 @@ err: * * PARAMETERS: * path - path for evaluation - * pathloc - IN/OUT (start point for evaluation/parent directory for + * pathloc - IN/OUT (start point for evaluation/parent directory for * creation) * name - new node name * * RETURNS: - * RC_OK, filled pathloc for parent directory and name of new node on + * RC_OK, filled pathloc for parent directory and name of new node on * success, or -1 if error occured (errno set appropriately) */ -int +int msdos_eval4make( - const char *path, - rtems_filesystem_location_info_t *pathloc, + const char *path, + rtems_filesystem_location_info_t *pathloc, const char **name - ) + ) { int rc = RC_OK; rtems_status_code sc = RTEMS_SUCCESSFUL; @@ -272,27 +272,27 @@ msdos_eval4make( MSDOS_VOLUME_SEMAPHORE_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) set_errno_and_return_minus_one(EIO); - + if (!pathloc->node_access) { errno = ENOENT; rc = -1; goto err; - } + } - fat_fd = pathloc->node_access; + fat_fd = pathloc->node_access; rc = fat_file_reopen(fat_fd); if (rc != RC_OK) goto err; - while (!done) + while (!done) { type = msdos_get_token(&path[i], token, &len); i += len; - fat_fd = pathloc->node_access; + fat_fd = pathloc->node_access; - switch (type) + switch (type) { case MSDOS_UP_DIR: /* @@ -303,24 +303,24 @@ msdos_eval4make( errno = ENOTDIR; rc = -1; goto error; - } + } /* * Am I at the root of this mounted filesystem? */ - if (pathloc->node_access == - pathloc->mt_entry->mt_fs_root.node_access) + if (pathloc->node_access == + pathloc->mt_entry->mt_fs_root.node_access) { /* * Am I at the root of all filesystems? * XXX: MSDOS is not supposed to be base fs. */ - if (pathloc->node_access == - rtems_filesystem_root.node_access) - { + if (pathloc->node_access == + rtems_filesystem_root.node_access) + { break; /* Throw out the .. in this case */ - } - else + } + else { newloc = pathloc->mt_entry->mt_point_node; *pathloc = newloc; @@ -330,11 +330,11 @@ 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-len], pathloc, name); } - } - else + } + else { rc = msdos_find_name(pathloc, token); if (rc != RC_OK) @@ -343,9 +343,9 @@ msdos_eval4make( { errno = ENOENT; rc = -1; - } - goto error; - } + } + goto error; + } } break; @@ -358,10 +358,10 @@ msdos_eval4make( errno = ENOTDIR; rc = -1; goto error; - } + } /* - * 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); @@ -375,7 +375,7 @@ msdos_eval4make( } else done = TRUE; - } + } break; case MSDOS_NO_MORE_PATH: @@ -383,7 +383,7 @@ msdos_eval4make( rc = -1; goto error; break; - + case MSDOS_CURRENT_DIR: break; @@ -402,14 +402,14 @@ msdos_eval4make( * We have evaluated the path as far as we can. * Verify there is not any invalid stuff at the end of the name. */ - for( ; path[i] != '\0'; i++) + for( ; path[i] != '\0'; i++) { if (!msdos_is_separator(path[i])) { errno = ENOENT; rc = -1; goto error; - } + } } fat_fd = pathloc->node_access; @@ -419,10 +419,10 @@ msdos_eval4make( errno = ENOTDIR; rc = -1; goto error; - } - + } + msdos_set_handlers(pathloc); - + rtems_semaphore_release(fs_info->vol_sema); return RC_OK; @@ -431,5 +431,5 @@ error: err: rtems_semaphore_release(fs_info->vol_sema); - return rc; + return rc; } -- cgit v1.2.3