diff options
author | Jan Kara <jack@suse.cz> | 2011-12-12 09:13:50 -0500 |
---|---|---|
committer | Jan Kara <jack@suse.cz> | 2012-01-09 07:52:08 -0500 |
commit | fef2e9f3301934773e4f1b3cc5c7bffb119346b8 (patch) | |
tree | 32db1ddfb36294b26a5df7d87ddc19fc9dd89267 /fs/udf | |
parent | d2eb8c359309ec45d6bf5b147303ab8e13be86ea (diff) |
udf: Treat symlink component of type 2 as /
Currently, we ignore symlink component of type 2. But mkisofs and other OS'
seem to treat it as / so do the same for compatibility.
Reported-by: "Gábor S." <otnaccess@hotmail.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs/udf')
-rw-r--r-- | fs/udf/symlink.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/fs/udf/symlink.c b/fs/udf/symlink.c index b1d4488b0f14..d7c6dbe4194b 100644 --- a/fs/udf/symlink.c +++ b/fs/udf/symlink.c | |||
@@ -41,10 +41,16 @@ static void udf_pc_to_char(struct super_block *sb, unsigned char *from, | |||
41 | pc = (struct pathComponent *)(from + elen); | 41 | pc = (struct pathComponent *)(from + elen); |
42 | switch (pc->componentType) { | 42 | switch (pc->componentType) { |
43 | case 1: | 43 | case 1: |
44 | if (pc->lengthComponentIdent == 0) { | 44 | /* |
45 | p = to; | 45 | * Symlink points to some place which should be agreed |
46 | *p++ = '/'; | 46 | * upon between originator and receiver of the media. Ignore. |
47 | } | 47 | */ |
48 | if (pc->lengthComponentIdent > 0) | ||
49 | break; | ||
50 | /* Fall through */ | ||
51 | case 2: | ||
52 | p = to; | ||
53 | *p++ = '/'; | ||
48 | break; | 54 | break; |
49 | case 3: | 55 | case 3: |
50 | memcpy(p, "../", 3); | 56 | memcpy(p, "../", 3); |