Subversion Repositories HelenOS

Rev

Rev 4266 | Rev 4280 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4266 Rev 4268
Line 74... Line 74...
74
        ncwd_path_nc = malloc(cwd_size + 1 + size + 1);
74
        ncwd_path_nc = malloc(cwd_size + 1 + size + 1);
75
        if (!ncwd_path_nc) {
75
        if (!ncwd_path_nc) {
76
            futex_up(&cwd_futex);
76
            futex_up(&cwd_futex);
77
            return NULL;
77
            return NULL;
78
        }
78
        }
79
        str_ncpy(ncwd_path_nc, cwd_path, cwd_size + 1 + size + 1);
79
        str_cpy(ncwd_path_nc, cwd_size + 1 + size + 1, cwd_path);
80
        ncwd_path_nc[cwd_size] = '/';
80
        ncwd_path_nc[cwd_size] = '/';
81
        ncwd_path_nc[cwd_size + 1] = '\0';
81
        ncwd_path_nc[cwd_size + 1] = '\0';
82
    } else {
82
    } else {
83
        ncwd_path_nc = malloc(size + 1);
83
        ncwd_path_nc = malloc(size + 1);
84
        if (!ncwd_path_nc) {
84
        if (!ncwd_path_nc) {
Line 532... Line 532...
532
    futex_down(&cwd_futex);
532
    futex_down(&cwd_futex);
533
    if (size < cwd_size + 1) {
533
    if (size < cwd_size + 1) {
534
        futex_up(&cwd_futex);
534
        futex_up(&cwd_futex);
535
        return NULL;
535
        return NULL;
536
    }
536
    }
537
    str_ncpy(buf, cwd_path, size);
537
    str_cpy(buf, size, cwd_path);
538
    futex_up(&cwd_futex);
538
    futex_up(&cwd_futex);
539
    return buf;
539
    return buf;
540
}
540
}
541
 
541
 
542
/** @}
542
/** @}