Lines Matching refs:mode
806 umode_t mode; member
821 umode_t mode; member
920 if ( S_ISLNK (de->mode) ) kfree (de->u.symlink.linkname); in devfs_put()
921 if ( ( S_ISCHR (de->mode) || S_ISBLK (de->mode) ) && de->u.fcb.autogen ) in devfs_put()
923 devfs_dealloc_devnum ( S_ISCHR (de->mode) ? DEVFS_SPECIAL_CHR : in devfs_put()
933 if ( S_ISLNK (de->mode) ) stat_num_bytes -= de->u.symlink.length + 1; in devfs_put()
957 if ( !S_ISDIR (dir->mode) ) in _devfs_search_dir()
983 umode_t mode) in _devfs_alloc_entry() argument
993 new->mode = mode; in _devfs_alloc_entry()
994 if ( S_ISDIR (mode) ) rwlock_init (&new->u.dir.lock); in _devfs_alloc_entry()
1032 if ( !S_ISDIR (dir->mode) ) in _devfs_append_entry()
1171 if ( !old || !S_ISDIR (old->mode) ) in _devfs_make_parent_for_leaf()
1195 const char *name, umode_t mode) in _devfs_prepare_leaf() argument
1207 if ( ( de = _devfs_alloc_entry (name + leaf_pos, namelen - leaf_pos,mode) ) in _devfs_prepare_leaf()
1236 if (S_ISLNK (de->mode) && traverse_symlink) in _devfs_walk_path()
1276 if ( !S_ISDIR (dir->mode) ) in _devfs_find_by_dev()
1286 if ( !S_ISCHR (entry->mode) && !S_ISBLK (entry->mode) ) continue; in _devfs_find_by_dev()
1287 if ( S_ISCHR (entry->mode) && (type != DEVFS_SPECIAL_CHR) ) continue; in _devfs_find_by_dev()
1288 if ( S_ISBLK (entry->mode) && (type != DEVFS_SPECIAL_BLK) ) continue; in _devfs_find_by_dev()
1302 if ( !S_ISDIR (entry->mode) ) continue; in _devfs_find_by_dev()
1477 unsigned short type, umode_t mode, in devfsd_notify_de() argument
1495 entry->mode = mode; in devfsd_notify_de()
1519 if (devfsd_notify_de (de, type, de->mode, current->euid, in devfsd_notify()
1548 umode_t mode, void *ops, void *info) in devfs_register() argument
1550 char devtype = S_ISCHR (mode) ? DEVFS_SPECIAL_CHR : DEVFS_SPECIAL_BLK; in devfs_register()
1562 if ( S_ISBLK (mode) ) ops = (void *) get_blkfops (major); in devfs_register()
1570 if ( S_ISDIR (mode) ) in devfs_register()
1575 if ( S_ISLNK (mode) ) in devfs_register()
1580 if ( ( S_ISCHR (mode) || S_ISBLK (mode) ) && in devfs_register()
1586 name, S_ISCHR (mode) ? "char" : "block"); in devfs_register()
1592 if ( ( de = _devfs_prepare_leaf (&dir, name, mode) ) == NULL ) in devfs_register()
1598 if ( S_ISCHR (mode) || S_ISBLK (mode) ) in devfs_register()
1604 else if ( !S_ISREG (mode) ) in devfs_register()
1606 PRINTK ("(%s): illegal mode: %x\n", name, mode); in devfs_register()
1664 if ( ( S_ISREG (de->mode) || S_ISCHR (de->mode) || S_ISBLK (de->mode) ) && in _devfs_unhook()
1691 if ( !S_ISDIR (de->mode) ) return; in _devfs_unregister()
1842 if ( old && S_ISDIR (old->mode) ) in devfs_mk_dir()
1922 if ( S_ISCHR (de->mode) || S_ISBLK (de->mode) || S_ISREG (de->mode) ) in devfs_get_flags()
1947 if ( S_ISCHR (de->mode) || S_ISBLK (de->mode) || S_ISREG (de->mode) ) in devfs_set_flags()
1970 if ( S_ISDIR (de->mode) ) return -EISDIR; in devfs_get_maj_min()
1971 if ( !S_ISCHR (de->mode) && !S_ISBLK (de->mode) ) return -EINVAL; in devfs_get_maj_min()
2007 #define NAMEOF(de) ( (de)->mode ? (de)->name : (de)->u.name ) in devfs_generate_path()
2041 if ( !S_ISCHR (de->mode) && !S_ISBLK (de->mode) && !S_ISREG (de->mode) ) in devfs_get_ops()
2046 else if ( S_ISCHR (de->mode) || S_ISREG (de->mode) ) in devfs_get_ops()
2072 if ( !S_ISCHR (de->mode) && !S_ISBLK (de->mode) && !S_ISREG (de->mode) ) in devfs_put_ops()
2075 if ( S_ISCHR (de->mode) || S_ISREG (de->mode) ) in devfs_put_ops()
2094 if ( !S_ISREG (de->mode) ) return -EINVAL; in devfs_set_file_size()
2159 if ( !S_ISDIR (de->mode) ) return NULL; in devfs_get_first_child()
2452 if ( !S_ISBLK (de->mode) ) return 0; in check_disc_changed()
2492 if (S_ISBLK (de->mode) && de->u.fcb.removable) break; in scan_dir_for_removable()
2527 if (!S_ISBLK (de->mode) || !de->u.fcb.removable) continue; in get_removable_partition()
2572 de->mode = inode->i_mode; in devfs_notify_change()
2654 if ( S_ISCHR (de->mode) ) in _devfs_get_vfs_inode()
2661 else if ( S_ISBLK (de->mode) ) in _devfs_get_vfs_inode()
2673 else if ( S_ISFIFO (de->mode) ) inode->i_fop = &def_fifo_fops; in _devfs_get_vfs_inode()
2674 else if ( S_ISREG (de->mode) ) in _devfs_get_vfs_inode()
2679 else if ( S_ISDIR (de->mode) ) in _devfs_get_vfs_inode()
2684 else if ( S_ISLNK (de->mode) ) in _devfs_get_vfs_inode()
2690 inode->i_mode = (de->mode & S_IFMT) | S_IRUGO | S_IWUGO; in _devfs_get_vfs_inode()
2691 else inode->i_mode = de->mode; in _devfs_get_vfs_inode()
2751 file->f_pos, de->inode.ino, de->mode >> 12); in devfs_readdir()
2782 if ( S_ISDIR (de->mode) ) return 0; in devfs_open()
2815 inode->i_mode = de->mode; in devfs_open()
2914 if ( !S_ISCHR (de->mode) && !S_ISBLK (de->mode) && !S_ISREG (de->mode) ) in devfs_d_delete()
2923 inode->i_mode = (de->mode & S_IFMT) | S_IRUGO | S_IWUGO; in devfs_d_delete()
3131 static int devfs_mkdir (struct inode *dir, struct dentry *dentry, int mode) in devfs_mkdir() argument
3138 mode = (mode & ~S_IFMT) | S_IFDIR; /* VFS doesn't pass S_IFMT part */ in devfs_mkdir()
3141 de = _devfs_alloc_entry (dentry->d_name.name, dentry->d_name.len, mode); in devfs_mkdir()
3172 if ( !S_ISDIR (de->mode) ) return -ENOTDIR; in devfs_rmdir()
3193 static int devfs_mknod (struct inode *dir, struct dentry *dentry, int mode, in devfs_mknod() argument
3202 dentry->d_name.name, mode, rdev); in devfs_mknod()
3205 de = _devfs_alloc_entry (dentry->d_name.name, dentry->d_name.len, mode); in devfs_mknod()
3208 if ( S_ISBLK (mode) || S_ISCHR (mode) ) in devfs_mknod()
3352 info->mode = entry->mode; in devfsd_read()
3356 if ( S_ISCHR (de->mode) || S_ISBLK (de->mode) ) in devfsd_read()
3364 if (info->mode == 0) info->mode = de->mode; in devfsd_read()