Lines Matching +full:prop +full:-

1 // SPDX-License-Identifier: GPL-2.0-only
4 * Copyright (C) 1996-1999 Jakub Jelinek (jakub@redhat.com)
34 struct property *prop; member
69 struct property *prop = f->private; in property_show() local
73 len = prop->length; in property_show()
74 pval = prop->value; in property_show()
84 len -= n + 1; in property_show()
92 len--; in property_show()
103 len -= 4; in property_show()
150 BUG_ON(oi->type != op_inode_prop); in property_open()
154 struct seq_file *m = file->private_data; in property_open()
155 m->private = oi->u.prop; in property_open()
185 struct property *prop; in openpromfs_lookup() local
193 BUG_ON(oi->type != op_inode_node); in openpromfs_lookup()
195 dp = oi->u.node; in openpromfs_lookup()
197 name = dentry->d_name.name; in openpromfs_lookup()
198 len = dentry->d_name.len; in openpromfs_lookup()
202 child = dp->child; in openpromfs_lookup()
204 const char *node_name = kbasename(child->full_name); in openpromfs_lookup()
211 ino = child->unique_id; in openpromfs_lookup()
214 child = child->sibling; in openpromfs_lookup()
217 prop = dp->properties; in openpromfs_lookup()
218 while (prop) { in openpromfs_lookup()
219 int n = strlen(prop->name); in openpromfs_lookup()
221 if (len == n && !strncmp(prop->name, name, len)) { in openpromfs_lookup()
223 ent_data.prop = prop; in openpromfs_lookup()
224 ino = prop->unique_id; in openpromfs_lookup()
228 prop = prop->next; in openpromfs_lookup()
232 return ERR_PTR(-ENOENT); in openpromfs_lookup()
235 inode = openprom_iget(dir->i_sb, ino); in openpromfs_lookup()
239 if (inode->i_state & I_NEW) { in openpromfs_lookup()
242 ent_oi->type = ent_type; in openpromfs_lookup()
243 ent_oi->u = ent_data; in openpromfs_lookup()
247 inode->i_mode = S_IFDIR | S_IRUGO | S_IXUGO; in openpromfs_lookup()
248 inode->i_op = &openprom_inode_operations; in openpromfs_lookup()
249 inode->i_fop = &openprom_operations; in openpromfs_lookup()
254 !strncmp (name, "security-password", 17)) in openpromfs_lookup()
255 inode->i_mode = S_IFREG | S_IRUSR | S_IWUSR; in openpromfs_lookup()
257 inode->i_mode = S_IFREG | S_IRUGO; in openpromfs_lookup()
258 inode->i_fop = &openpromfs_prop_ops; in openpromfs_lookup()
260 inode->i_size = ent_oi->u.prop->length; in openpromfs_lookup()
273 struct device_node *dp = oi->u.node; in openpromfs_readdir()
275 struct property *prop; in openpromfs_readdir() local
280 if (ctx->pos == 0) { in openpromfs_readdir()
281 if (!dir_emit(ctx, ".", 1, inode->i_ino, DT_DIR)) in openpromfs_readdir()
283 ctx->pos = 1; in openpromfs_readdir()
285 if (ctx->pos == 1) { in openpromfs_readdir()
287 (dp->parent == NULL ? in openpromfs_readdir()
289 dp->parent->unique_id), DT_DIR)) in openpromfs_readdir()
291 ctx->pos = 2; in openpromfs_readdir()
293 i = ctx->pos - 2; in openpromfs_readdir()
296 child = dp->child; in openpromfs_readdir()
298 child = child->sibling; in openpromfs_readdir()
299 i--; in openpromfs_readdir()
303 kbasename(child->full_name), in openpromfs_readdir()
304 strlen(kbasename(child->full_name)), in openpromfs_readdir()
305 child->unique_id, DT_DIR)) in openpromfs_readdir()
308 ctx->pos++; in openpromfs_readdir()
309 child = child->sibling; in openpromfs_readdir()
313 prop = dp->properties; in openpromfs_readdir()
314 while (i && prop) { in openpromfs_readdir()
315 prop = prop->next; in openpromfs_readdir()
316 i--; in openpromfs_readdir()
318 while (prop) { in openpromfs_readdir()
319 if (!dir_emit(ctx, prop->name, strlen(prop->name), in openpromfs_readdir()
320 prop->unique_id, DT_REG)) in openpromfs_readdir()
323 ctx->pos++; in openpromfs_readdir()
324 prop = prop->next; in openpromfs_readdir()
342 return &oi->vfs_inode; in openprom_alloc_inode()
354 inode = ERR_PTR(-ENOMEM); in openprom_iget()
360 sync_filesystem(fc->root->d_sb); in openpromfs_reconfigure()
361 fc->sb_flags |= SB_NOATIME; in openpromfs_reconfigure()
377 s->s_flags |= SB_NOATIME; in openprom_fill_super()
378 s->s_blocksize = 1024; in openprom_fill_super()
379 s->s_blocksize_bits = 10; in openprom_fill_super()
380 s->s_magic = OPENPROM_SUPER_MAGIC; in openprom_fill_super()
381 s->s_op = &openprom_sops; in openprom_fill_super()
382 s->s_time_gran = 1; in openprom_fill_super()
390 root_inode->i_op = &openprom_inode_operations; in openprom_fill_super()
391 root_inode->i_fop = &openprom_operations; in openprom_fill_super()
392 root_inode->i_mode = S_IFDIR | S_IRUGO | S_IXUGO; in openprom_fill_super()
394 oi->type = op_inode_node; in openprom_fill_super()
395 oi->u.node = of_find_node_by_path("/"); in openprom_fill_super()
398 s->s_root = d_make_root(root_inode); in openprom_fill_super()
399 if (!s->s_root) in openprom_fill_super()
404 ret = -ENOMEM; in openprom_fill_super()
422 fc->ops = &openpromfs_context_ops; in openpromfs_init_fs_context()
438 inode_init_once(&oi->vfs_inode); in op_inode_init_once()
452 return -ENOMEM; in init_openprom_fs()