diff options
author | Roman Zippel <zippel@linux-m68k.org> | 2006-01-19 02:43:12 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-19 04:20:23 +0100 |
commit | 6b192832daae6d141063c49ae1ded6f7dddee50e (patch) | |
tree | a7c1557e42ba0681eaa3d64cc4abbd5bbc255c02 /fs/hfsplus/catalog.c | |
parent | [PATCH] hfs: set correct create date for links (diff) | |
download | linux-6b192832daae6d141063c49ae1ded6f7dddee50e.tar.xz linux-6b192832daae6d141063c49ae1ded6f7dddee50e.zip |
[PATCH] hfs: set type/creator for symlinks
Set the correct type and creator for symlinks.
Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/hfsplus/catalog.c')
-rw-r--r-- | fs/hfsplus/catalog.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/fs/hfsplus/catalog.c b/fs/hfsplus/catalog.c index 04058c8096d1..f2d7c49ce759 100644 --- a/fs/hfsplus/catalog.c +++ b/fs/hfsplus/catalog.c @@ -119,8 +119,13 @@ static int hfsplus_cat_build_record(hfsplus_cat_entry *entry, u32 cnid, struct i file->access_date = hfsp_now2mt(); if (cnid == inode->i_ino) { hfsplus_set_perms(inode, &file->permissions); - file->user_info.fdType = cpu_to_be32(HFSPLUS_SB(inode->i_sb).type); - file->user_info.fdCreator = cpu_to_be32(HFSPLUS_SB(inode->i_sb).creator); + if (S_ISLNK(inode->i_mode)) { + file->user_info.fdType = cpu_to_be32(HFSP_SYMLINK_TYPE); + file->user_info.fdCreator = cpu_to_be32(HFSP_SYMLINK_CREATOR); + } else { + file->user_info.fdType = cpu_to_be32(HFSPLUS_SB(inode->i_sb).type); + file->user_info.fdCreator = cpu_to_be32(HFSPLUS_SB(inode->i_sb).creator); + } if ((file->permissions.rootflags | file->permissions.userflags) & HFSPLUS_FLG_IMMUTABLE) file->flags |= cpu_to_be16(HFSPLUS_FILE_LOCKED); } else { |