Orion
Barry Keyboard/Mouse drivers + POSIX names for structs 1628fcf (2 years, 4 months ago)diff --git a/vfs/tmpfs/file.c b/vfs/tmpfs/file.c index bc320ed..275e77c 100644 --- a/vfs/tmpfs/file.c +++ b/vfs/tmpfs/file.c @@ -90,33 +90,33 @@ tmpfs_readdir(File *file, DirEnt *dent, off_t index) DirEntry *de; if (!index--) { - dent->ino = file->inode->ino; - dent->type = DT_DIR; - dent->namelen = 2; - strncpy(dent->name, ".", dent->namelen); + dent->d_ino = file->inode->ino; + dent->d_type = DT_DIR; + dent->d_namelen = 2; + strncpy(dent->d_name, ".", dent->d_namelen); return 0; } for (de = file->inode->dirEntries; de && index; de = de->next, index--); if (!de) return -ENOENT; - dent->ino = de->inode->ino; + dent->d_ino = de->inode->ino; if (S_ISBLK(de->inode->mode)) - dent->type = DT_BLK; + dent->d_type = DT_BLK; if (S_ISCHR(de->inode->mode)) - dent->type = DT_CHR; + dent->d_type = DT_CHR; if (S_ISDIR(de->inode->mode)) - dent->type = DT_DIR; + dent->d_type = DT_DIR; if (S_ISFIFO(de->inode->mode)) - dent->type = DT_FIFO; + dent->d_type = DT_FIFO; if (S_ISLNK(de->inode->mode)) - dent->type = DT_LNK; + dent->d_type = DT_LNK; if (S_ISREG(de->inode->mode)) - dent->type = DT_REG; + dent->d_type = DT_REG; if (S_ISSOCK(de->inode->mode)) - dent->type = DT_SOCK; - dent->namelen = strnlen(de->name, NAME_MAX) + 1; - strncpy(dent->name, de->name, NAME_MAX); + dent->d_type = DT_SOCK; + dent->d_namelen = strnlen(de->name, NAME_MAX) + 1; + strncpy(dent->d_name, de->name, NAME_MAX); return 0; }