[ext2] Erggg

This commit is contained in:
Kevin Lange 2011-02-08 19:10:18 -06:00
parent 826a92a853
commit a38149ee9f

View File

@ -188,22 +188,22 @@ initrd_node_from_file(
fnode->mask = inode->mode & 0xFFF; fnode->mask = inode->mode & 0xFFF;
/* File Flags */ /* File Flags */
fnode->flags = 0; fnode->flags = 0;
if (inode->mode & EXT2_S_IFREG) { if ((inode->mode & EXT2_S_IFREG) == EXT2_S_IFREG) {
fnode->flags |= FS_FILE; fnode->flags |= FS_FILE;
} }
if (inode->mode & EXT2_S_IFDIR) { if ((inode->mode & EXT2_S_IFDIR) == EXT2_S_IFDIR) {
fnode->flags |= FS_DIRECTORY; fnode->flags |= FS_DIRECTORY;
} }
if (inode->mode & EXT2_S_IFBLK) { if ((inode->mode & EXT2_S_IFBLK) == EXT2_S_IFBLK) {
fnode->flags |= FS_BLOCKDEVICE; fnode->flags |= FS_BLOCKDEVICE;
} }
if (inode->mode & EXT2_S_IFCHR) { if ((inode->mode & EXT2_S_IFCHR) == EXT2_S_IFCHR) {
fnode->flags |= FS_CHARDEVICE; fnode->flags |= FS_CHARDEVICE;
} }
if (inode->mode & EXT2_S_IFIFO) { if ((inode->mode & EXT2_S_IFIFO) == EXT2_S_IFIFO) {
fnode->flags |= FS_PIPE; fnode->flags |= FS_PIPE;
} }
if (inode->mode & EXT2_S_IFLNK) { if ((inode->mode & EXT2_S_IFLNK) == EXT2_S_IFLNK) {
fnode->flags |= FS_SYMLINK; fnode->flags |= FS_SYMLINK;
} }
fnode->read = read_initrd; fnode->read = read_initrd;
@ -234,22 +234,22 @@ initrd_node_root(
fnode->mask = inode->mode & 0xFFF; fnode->mask = inode->mode & 0xFFF;
/* File Flags */ /* File Flags */
fnode->flags = 0; fnode->flags = 0;
if (inode->mode & EXT2_S_IFREG) { if ((inode->mode & EXT2_S_IFREG) == EXT2_S_IFREG) {
fnode->flags |= FS_FILE; fnode->flags |= FS_FILE;
} }
if (inode->mode & EXT2_S_IFDIR) { if ((inode->mode & EXT2_S_IFDIR) == EXT2_S_IFDIR) {
fnode->flags |= FS_DIRECTORY; fnode->flags |= FS_DIRECTORY;
} }
if (inode->mode & EXT2_S_IFBLK) { if ((inode->mode & EXT2_S_IFBLK) == EXT2_S_IFBLK) {
fnode->flags |= FS_BLOCKDEVICE; fnode->flags |= FS_BLOCKDEVICE;
} }
if (inode->mode & EXT2_S_IFCHR) { if ((inode->mode & EXT2_S_IFCHR) == EXT2_S_IFCHR) {
fnode->flags |= FS_CHARDEVICE; fnode->flags |= FS_CHARDEVICE;
} }
if (inode->mode & EXT2_S_IFIFO) { if ((inode->mode & EXT2_S_IFIFO) == EXT2_S_IFIFO) {
fnode->flags |= FS_PIPE; fnode->flags |= FS_PIPE;
} }
if (inode->mode & EXT2_S_IFLNK) { if ((inode->mode & EXT2_S_IFLNK) == EXT2_S_IFLNK) {
fnode->flags |= FS_SYMLINK; fnode->flags |= FS_SYMLINK;
} }
fnode->read = read_initrd; fnode->read = read_initrd;
@ -282,22 +282,22 @@ initrd_node_from_dirent(
fnode->mask = inode->mode & 0xFFF; fnode->mask = inode->mode & 0xFFF;
/* File Flags */ /* File Flags */
fnode->flags = 0; fnode->flags = 0;
if (inode->mode & EXT2_S_IFREG) { if ((inode->mode & EXT2_S_IFREG) == EXT2_S_IFREG) {
fnode->flags |= FS_FILE; fnode->flags |= FS_FILE;
} }
if (inode->mode & EXT2_S_IFDIR) { if ((inode->mode & EXT2_S_IFDIR) == EXT2_S_IFDIR) {
fnode->flags |= FS_DIRECTORY; fnode->flags |= FS_DIRECTORY;
} }
if (inode->mode & EXT2_S_IFBLK) { if ((inode->mode & EXT2_S_IFBLK) == EXT2_S_IFBLK) {
fnode->flags |= FS_BLOCKDEVICE; fnode->flags |= FS_BLOCKDEVICE;
} }
if (inode->mode & EXT2_S_IFCHR) { if ((inode->mode & EXT2_S_IFCHR) == EXT2_S_IFCHR) {
fnode->flags |= FS_CHARDEVICE; fnode->flags |= FS_CHARDEVICE;
} }
if (inode->mode & EXT2_S_IFIFO) { if ((inode->mode & EXT2_S_IFIFO) == EXT2_S_IFIFO) {
fnode->flags |= FS_PIPE; fnode->flags |= FS_PIPE;
} }
if (inode->mode & EXT2_S_IFLNK) { if ((inode->mode & EXT2_S_IFLNK) == EXT2_S_IFLNK) {
fnode->flags |= FS_SYMLINK; fnode->flags |= FS_SYMLINK;
} }
fnode->read = read_initrd; fnode->read = read_initrd;