Changeset 9ad75d5 in mainline


Ignore:
Timestamp:
2008-04-13T02:39:57Z (17 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
c9f6e49f
Parents:
32fb10ed
Message:

Improve libfs_lookup() so that has_children() is not called for each character
in the pathname component.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/libfs/libfs.c

    r32fb10ed r9ad75d5  
    149149        void *par = NULL;
    150150        void *cur = ops->root_get(dev_handle);
    151         void *tmp;
    152151
    153152        if (ops->plb_get_char(next) == '/')
     
    157156        int len = 0;
    158157        while (ops->has_children(cur) && next <= last) {
     158                void *tmp;
    159159
    160160                /* collect the component */
    161                 if (ops->plb_get_char(next) != '/') {
     161                while ((ops->plb_get_char(next) != '/') && (next <= last)) {
    162162                        if (len + 1 == NAME_MAX) {
    163163                                /* comopnent length overflow */
     
    167167                        component[len++] = ops->plb_get_char(next);
    168168                        next++; /* process next character */
    169                         if (next <= last)
    170                                 continue;
    171169                }
    172170
Note: See TracChangeset for help on using the changeset viewer.