| To: | xfs@xxxxxxxxxxx |
|---|---|
| Subject: | [PATCH v3 04/11] xfsprogs: Add ifdef dirent checks where it was missing |
| From: | Jan Tulak <jtulak@xxxxxxxxxx> |
| Date: | Mon, 3 Aug 2015 16:39:42 +0200 |
| Cc: | david@xxxxxxxxxxxxx, hch@xxxxxxxxxxxxx, Jan Tulak <jtulak@xxxxxxxxxx> |
| Delivered-to: | xfs@xxxxxxxxxxx |
| In-reply-to: | <1438612789-17486-1-git-send-email-jtulak@xxxxxxxxxx> |
| References: | <1438612789-17486-1-git-send-email-jtulak@xxxxxxxxxx> |
Add check for _DIRENT_HAVED_RECLEN/_OFF to read_directory().
In dump_dirent() these checks already are used, but they were
missing in read_directory.
Signed-off-by: Jan Tulak <jtulak@xxxxxxxxxx>
---
io/readdir.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/io/readdir.c b/io/readdir.c
index 20b8898..ed8f04d 100644
--- a/io/readdir.c
+++ b/io/readdir.c
@@ -104,12 +104,16 @@ read_directory(
if (!dirent)
break;
+#ifdef _DIRENT_HAVE_D_RECLEN
*total += dirent->d_reclen;
+#endif
count++;
if (dump) {
dump_dirent(offset, dirent);
+#ifdef _DIRENT_HAVE_D_OFF
offset = dirent->d_off;
+#endif
}
}
--
2.4.3
|
| Previous by Date: | [PATCH v2 01/11] xfsprogs: Don't Make .po files with gettext disabled, Jan Tulak |
|---|---|
| Next by Date: | [PATCH v3 05/11] xfsprogs: Change OS X-specific CFLAGS/LDFLAGS, Jan Tulak |
| Previous by Thread: | [PATCH v2 01/11] xfsprogs: Don't Make .po files with gettext disabled, Jan Tulak |
| Next by Thread: | Re: [PATCH v3 04/11] xfsprogs: Add ifdef dirent checks where it was missing, Christoph Hellwig |
| Indexes: | [Date] [Thread] [Top] [All Lists] |