Lines Matching +full:non +full:- +full:pc

1 // SPDX-License-Identifier: GPL-2.0-only
6 * Symlink handling routines for the OSTA-UDF(tm) filesystem.
9 * (C) 1998-2001 Ben Fennema
31 struct pathComponent *pc; in udf_pc_to_char() local
37 tolen--; in udf_pc_to_char()
39 pc = (struct pathComponent *)(from + elen); in udf_pc_to_char()
41 switch (pc->componentType) { in udf_pc_to_char()
47 if (pc->lengthComponentIdent > 0) { in udf_pc_to_char()
48 elen += pc->lengthComponentIdent; in udf_pc_to_char()
54 return -ENAMETOOLONG; in udf_pc_to_char()
57 tolen--; in udf_pc_to_char()
61 return -ENAMETOOLONG; in udf_pc_to_char()
64 tolen -= 3; in udf_pc_to_char()
68 return -ENAMETOOLONG; in udf_pc_to_char()
71 tolen -= 2; in udf_pc_to_char()
72 /* that would be . - just ignore */ in udf_pc_to_char()
75 elen += pc->lengthComponentIdent; in udf_pc_to_char()
77 return -EIO; in udf_pc_to_char()
78 comp_len = udf_get_filename(sb, pc->componentIdent, in udf_pc_to_char()
79 pc->lengthComponentIdent, in udf_pc_to_char()
85 tolen -= comp_len; in udf_pc_to_char()
87 return -ENAMETOOLONG; in udf_pc_to_char()
89 tolen--; in udf_pc_to_char()
94 p[-1] = '\0'; in udf_pc_to_char()
102 struct page *page = &folio->page; in udf_symlink_filler()
103 struct inode *inode = page->mapping->host; in udf_symlink_filler()
111 if (inode->i_size > inode->i_sb->s_blocksize) { in udf_symlink_filler()
112 err = -ENAMETOOLONG; in udf_symlink_filler()
116 if (iinfo->i_alloc_type == ICBTAG_FLAG_AD_IN_ICB) { in udf_symlink_filler()
117 symlink = iinfo->i_data + iinfo->i_lenEAttr; in udf_symlink_filler()
122 err = -EFSCORRUPTED; in udf_symlink_filler()
125 symlink = bh->b_data; in udf_symlink_filler()
128 err = udf_pc_to_char(inode->i_sb, symlink, inode->i_size, p, PAGE_SIZE); in udf_symlink_filler()
148 struct dentry *dentry = path->dentry; in udf_symlink_getattr()
153 page = read_mapping_page(inode->i_mapping, 0, NULL); in udf_symlink_getattr()
157 * UDF uses non-trivial encoding of symlinks so i_size does not match in udf_symlink_getattr()
165 stat->size = strlen(page_address(page)); in udf_symlink_getattr()