Changeset cc76be3 in mainline
- Timestamp:
- 2007-12-14T18:12:17Z (17 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 74303b6
- Parents:
- 5832e9b
- Location:
- uspace/srv/vfs
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/vfs/vfs.h
r5832e9b rcc76be3 84 84 typedef struct { 85 85 /** Unique identifier of the fs. */ 86 char name[FS_NAME_MAXLEN ];86 char name[FS_NAME_MAXLEN + 1]; 87 87 88 88 /** Operations. */ -
uspace/srv/vfs/vfs_register.c
r5832e9b rcc76be3 88 88 } 89 89 } 90 } 91 /* 92 * This check is not redundant. It ensures that the name is 93 * NULL-terminated, even if FS_NAME_MAXLEN characters are used. 94 */ 95 if (info->name[i] != '\0') { 96 dprintf("The name is not properly NULL-terminated.\n"); 97 return false; 90 98 } 91 99 … … 401 409 for (cur = fs_head.next; cur != &fs_head; cur = cur->next) { 402 410 fs_info_t *fs = list_get_instance(cur, fs_info_t, fs_link); 403 if (strcmp(fs->vfs_info.name, name) == 0) { /* XXX: strncmp() */ 411 if (strncmp(fs->vfs_info.name, name, 412 sizeof(fs->vfs_info.name)) == 0) { 404 413 handle = fs->fs_handle; 405 414 break;
Note:
See TracChangeset
for help on using the changeset viewer.