From: Domen Puncer <domen@coderock.org>
To: Linux Kernel <linux-kernel@vger.kernel.org>
Subject: [PATCH 2.4.23, 2.6.0-test11] fix d_type in readdir in isofs
Date: Tue, 09 Dec 2003 10:47:32 +0100 [thread overview]
Message-ID: <200312091047.33015.domen@coderock.org> (raw)
Hi!
Played with scandir, and noticed iso9660's files d_type is always 0,
so here's a fix.
If there are no objections i'll try to fix some other filesystems too.
2.6.0-test11:
--- c/fs/isofs/dir.c 2003-08-23 01:58:53.000000000 +0200
+++ a/fs/isofs/dir.c 2003-12-09 10:29:21.000000000 +0100
@@ -230,7 +230,8 @@
}
}
if (len > 0) {
- if (filldir(dirent, p, len, filp->f_pos, inode_number, DT_UNKNOWN) < 0)
+ if (filldir(dirent, p, len, filp->f_pos, inode_number,
+ (de->flags[0]&2)?DT_DIR:DT_REG) < 0)
break;
}
filp->f_pos += de_len;
2.4.23:
--- linux-2.4.23-clean/fs/isofs/dir.c 2002-02-25 20:38:08.000000000 +0100
+++ linux-2.4.23/fs/isofs/dir.c 2003-12-09 10:28:58.000000000 +0100
@@ -230,7 +230,8 @@
}
}
if (len > 0) {
- if (filldir(dirent, p, len, filp->f_pos, inode_number, DT_UNKNOWN) < 0)
+ if (filldir(dirent, p, len, filp->f_pos, inode_number,
+ (de->flags[0]&2)?DT_DIR:DT_REG) < 0)
break;
}
filp->f_pos += de_len;
next reply other threads:[~2003-12-09 9:50 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-12-09 9:47 Domen Puncer [this message]
2003-12-09 10:09 ` [PATCH 2.4.23, 2.6.0-test11] fix d_type in readdir in isofs viro
2003-12-09 13:45 ` Domen Puncer
2003-12-09 16:28 ` Linus Torvalds
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200312091047.33015.domen@coderock.org \
--to=domen@coderock.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.