Changeset dd0c8a0 in mainline for uspace/lib/c/generic/vfs/vfs.c


Ignore:
Timestamp:
2013-09-29T06:56:33Z (12 years ago)
Author:
Beniamino Galvani <b.galvani@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
a9bd960d
Parents:
3deb0155 (diff), 13be2583 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge mainline changes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/vfs/vfs.c

    r3deb0155 rdd0c8a0  
    4343#include <stdio.h>
    4444#include <sys/stat.h>
     45#include <sys/statfs.h>
    4546#include <sys/types.h>
    4647#include <ipc/services.h>
     
    892893}
    893894
     895int statfs(const char *path, struct statfs *st)
     896{
     897        sysarg_t rc, rc_orig;
     898        aid_t req;
     899        size_t pa_size;
     900
     901        char *pa = absolutize(path, &pa_size);
     902        if (!pa)
     903                return ENOMEM;
     904
     905        async_exch_t *exch = vfs_exchange_begin();
     906
     907        req = async_send_0(exch, VFS_IN_STATFS, NULL);
     908        rc = async_data_write_start(exch, pa, pa_size);
     909        if (rc != EOK)
     910                goto exit;
     911
     912        rc = async_data_read_start(exch, (void *) st, sizeof(*st));
     913
     914exit:
     915        vfs_exchange_end(exch);
     916        free(pa);
     917        async_wait_for(req, &rc_orig);
     918        return (int) (rc_orig != EOK ? rc_orig : rc);
     919}
     920
    894921/** @}
    895922 */
Note: See TracChangeset for help on using the changeset viewer.