aboutsummaryrefslogtreecommitdiffstats
path: root/fs/adfs/dir_fplus.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/adfs/dir_fplus.c')
-rw-r--r--fs/adfs/dir_fplus.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/fs/adfs/dir_fplus.c b/fs/adfs/dir_fplus.c
index a7f41da8115b..d9e3bee4e653 100644
--- a/fs/adfs/dir_fplus.c
+++ b/fs/adfs/dir_fplus.c
@@ -197,6 +197,24 @@ adfs_fplus_getnext(struct adfs_dir *dir, struct object_info *obj)
197 if (obj->name[i] == '/') 197 if (obj->name[i] == '/')
198 obj->name[i] = '.'; 198 obj->name[i] = '.';
199 199
200 obj->filetype = -1;
201
202 /*
203 * object is a file and is filetyped and timestamped?
204 * RISC OS 12-bit filetype is stored in load_address[19:8]
205 */
206 if ((0 == (obj->attr & ADFS_NDA_DIRECTORY)) &&
207 (0xfff00000 == (0xfff00000 & obj->loadaddr))) {
208 obj->filetype = (__u16) ((0x000fff00 & obj->loadaddr) >> 8);
209
210 /* optionally append the ,xyz hex filetype suffix */
211 if (ADFS_SB(dir->sb)->s_ftsuffix)
212 obj->name_len +=
213 append_filetype_suffix(
214 &obj->name[obj->name_len],
215 obj->filetype);
216 }
217
200 dir->pos += 1; 218 dir->pos += 1;
201 ret = 0; 219 ret = 0;
202out: 220out: