Changes in uspace/lib/c/generic/dirent.c [a35b458:bebd154] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/dirent.c
ra35b458 rbebd154 39 39 #include <errno.h> 40 40 #include <assert.h> 41 #include <string.h> 42 43 struct __dirstream { 44 int fd; 45 struct dirent res; 46 aoff64_t pos; 47 }; 41 48 42 49 /** Open directory. … … 86 93 ssize_t len = 0; 87 94 88 rc = vfs_read_short(dirp->fd, dirp->pos, &dirp->res.d_name[0],89 NAME_MAX + 1, &len);95 rc = vfs_read_short(dirp->fd, dirp->pos, dirp->res.d_name, 96 sizeof(dirp->res.d_name), &len); 90 97 if (rc != EOK) { 91 98 errno = rc; 92 99 return NULL; 93 100 } 101 102 assert(strnlen(dirp->res.d_name, sizeof(dirp->res.d_name)) < sizeof(dirp->res.d_name)); 94 103 95 104 dirp->pos += len;
Note:
See TracChangeset
for help on using the changeset viewer.