summaryrefslogtreecommitdiff
path: root/core/fs/getcwd.c
blob: 70b931527ccf9a75e18754cb2e61b68aed2ac575 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#include <string.h>
#include "fs.h"

__export char *core_getcwd(char *buf, size_t size)
{
    char *ret = NULL;

    if((buf != NULL) && (strlen(this_fs->cwd_name) < size)) {
        strcpy(buf, this_fs->cwd_name);
        ret = buf;
    }
    return ret;
}