rem: return ENOENT;
add: return FS_ENOENT;
context: new_path(const char *path, char **copy){    const char  *q, *r;    char        *p;    int         l, s;    if (!path) {        *copy = NULL;        return 0;    }    l = strlen(path);    if (l == 0)        return ENOENT;    s = l;    if (path[l-1] == '/')        s++;    if (l >= MAXPATHLEN)        return ENAMETOOLONG;    q = path;    while (*q != '\0') {        while (*q == '/')            q++;        r = q;        while ((*q != '/') && (*q != '\0'))            q++;        if (q - r >= FILE_NAME_LENGTH)            return ENAMETOOLONG;            }    p = (char *) malloc(s+1);    if (!p)        return ENOMEM;    /* ### do real checking: MAXPATHLEN, max file name len, buffer address... */    strcpy(p, path);        if (p[l-1] == '/') {        p[l] = '.';        p[l+1] = '\0';    }    *copy = p;    return 0;}