diff options
author | Russell King <rmk+kernel@armlinux.org.uk> | 2019-03-24 12:57:32 +0000 |
---|---|---|
committer | Russell King <rmk+kernel@armlinux.org.uk> | 2019-05-31 10:30:54 +0100 |
commit | 411c49bcf32d36b9988dc27968a92f3edf8ebed1 (patch) | |
tree | 578eddd0942a9ec4e4c49ca469c3428ab0d11178 /fs/adfs/dir_f.c | |
parent | 525715d0161f360df5f9f7ba8d9b77f60068dec5 (diff) | |
download | linux-rpi-411c49bcf32d36b9988dc27968a92f3edf8ebed1.tar.gz linux-rpi-411c49bcf32d36b9988dc27968a92f3edf8ebed1.tar.bz2 linux-rpi-411c49bcf32d36b9988dc27968a92f3edf8ebed1.zip |
fs/adfs: factor out object fixups
Factor out the directory object fixups, which parse the filetype and
optionally apply the filetype suffix to the filename.
Acked-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Diffstat (limited to 'fs/adfs/dir_f.c')
-rw-r--r-- | fs/adfs/dir_f.c | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/fs/adfs/dir_f.c b/fs/adfs/dir_f.c index 0fbfd0b04ae0..1bab896918ed 100644 --- a/fs/adfs/dir_f.c +++ b/fs/adfs/dir_f.c @@ -216,23 +216,8 @@ adfs_dir2obj(struct adfs_dir *dir, struct object_info *obj, obj->execaddr = adfs_readval(de->direxec, 4); obj->size = adfs_readval(de->dirlen, 4); obj->attr = de->newdiratts; - obj->filetype = -1; - /* - * object is a file and is filetyped and timestamped? - * RISC OS 12-bit filetype is stored in load_address[19:8] - */ - if ((0 == (obj->attr & ADFS_NDA_DIRECTORY)) && - (0xfff00000 == (0xfff00000 & obj->loadaddr))) { - obj->filetype = (__u16) ((0x000fff00 & obj->loadaddr) >> 8); - - /* optionally append the ,xyz hex filetype suffix */ - if (ADFS_SB(dir->sb)->s_ftsuffix) - obj->name_len += - append_filetype_suffix( - &obj->name[obj->name_len], - obj->filetype); - } + adfs_object_fixup(dir, obj); } /* |