Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 2640 → Rev 2641

/trunk/uspace/srv/vfs/vfs_register.c
88,6 → 88,14
}
}
}
/*
* This check is not redundant. It ensures that the name is
* NULL-terminated, even if FS_NAME_MAXLEN characters are used.
*/
if (info->name[i] != '\0') {
dprintf("The name is not properly NULL-terminated.\n");
return false;
}
 
/*
400,7 → 408,8
link_t *cur;
for (cur = fs_head.next; cur != &fs_head; cur = cur->next) {
fs_info_t *fs = list_get_instance(cur, fs_info_t, fs_link);
if (strcmp(fs->vfs_info.name, name) == 0) { /* XXX: strncmp() */
if (strncmp(fs->vfs_info.name, name,
sizeof(fs->vfs_info.name)) == 0) {
handle = fs->fs_handle;
break;
}
/trunk/uspace/srv/vfs/vfs.h
83,7 → 83,7
*/
typedef struct {
/** Unique identifier of the fs. */
char name[FS_NAME_MAXLEN];
char name[FS_NAME_MAXLEN + 1];
/** Operations. */
vfs_op_t ops[VFS_LAST - VFS_FIRST];