summaryrefslogtreecommitdiffstats
path: root/contrib/syslinux-4.02/core/fs/getcwd.c
blob: a7b6c7a9c82504ece7e86ce1d511dd4f6e688485 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
#include <string.h>
#include "fs.h"

char *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;
}