BarryServer : Git

All the code for all my projects
// BarryServer : Git / Orion / commit / 1628fcfdfdf2978ed9ccac96ee7d13bb3dc43a01 / vfs / procfs

// Related

Orion

Barry Keyboard/Mouse drivers + POSIX names for structs 1628fcf (2 years, 4 months ago)
diff --git a/vfs/procfs/file.c b/vfs/procfs/file.c
index b292cf4..979c2c9 100644
--- a/vfs/procfs/file.c
+++ b/vfs/procfs/file.c
@@ -88,33 +88,33 @@ procfs_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;
 }