Changeset 677745a in mainline for uspace/srv/vfs/vfs_node.c


Ignore:
Timestamp:
2013-07-29T12:54:39Z (11 years ago)
Author:
Jiri Zarevucky <zarevucky.jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
5bcd5b7
Parents:
b7c62a9
Message:

Have lookup return the last found directory, and the portion of path traversed. In exchange, only size < 2GB is returned from lookup.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/vfs/vfs_node.c

    rb7c62a9 r677745a  
    4545#include <async.h>
    4646#include <errno.h>
     47#include <macros.h>
    4748
    4849/** Mutex protecting the VFS node hash table. */
     
    300301}
    301302
     303int64_t vfs_node_get_size(vfs_node_t *node)
     304{
     305        if (node->size == -1) {
     306                sysarg_t sz1 = 0;
     307                sysarg_t sz2 = 0;
     308               
     309                async_exch_t *exch = vfs_exchange_grab(node->fs_handle);
     310                (void) async_req_2_2(exch, VFS_OUT_GET_SIZE,
     311                        node->service_id, node->index, &sz1, &sz2);
     312                vfs_exchange_release(exch);
     313               
     314                node->size = MERGE_LOUP32(sz1, sz2);
     315        }
     316        return node->size;
     317}
     318
    302319/**
    303320 * @}
Note: See TracChangeset for help on using the changeset viewer.