Home
last modified time | relevance | path

Searched refs:file (Results 1 – 25 of 4369) sorted by relevance

12345678910>>...175

/linux/tools/testing/selftests/rcutorture/bin/
H A Dparse-console.sh5 # The "file" is a pathname on the local system, and "title" is
8 # Usage: parse-console.sh file title
15 file="$1"
22 # Check for presence and readability of console output file
23 if test -f "$file" -a -r "$file"
27 echo $title unreadable console output file: $file
30 if grep -Pq '\x00' < $file
34 cat /dev/null > $file
[all...]
/linux/drivers/gpu/drm/i915/gt/
H A Dshmem_utils.c17 struct file *shmem_create_from_data(const char *name, void *data, size_t len) in shmem_create_from_data()
19 struct file *file; in shmem_create_from_data() local
22 file = shmem_file_setup(name, PAGE_ALIGN(len), in shmem_create_from_data()
24 if (IS_ERR(file)) in shmem_create_from_data()
25 return file; in shmem_create_from_data()
27 err = shmem_write(file, 0, data, len); in shmem_create_from_data()
29 fput(file); in shmem_create_from_data()
33 return file; in shmem_create_from_data()
36 struct file *shmem_create_from_object(struct drm_i915_gem_object *obj) in shmem_create_from_object()
39 struct file *file; in shmem_create_from_object() local
[all …]
/linux/drivers/infiniband/core/
H A Duser_mad.c174 static int hdr_size(struct ib_umad_file *file) in hdr_size() argument
176 return file->use_pkey_index ? sizeof(struct ib_user_mad_hdr) : in hdr_size()
181 static struct ib_mad_agent *__get_agent(struct ib_umad_file *file, int id) in __get_agent() argument
183 return file->agents_dead ? NULL : file->agent[id]; in __get_agent()
186 static int queue_packet(struct ib_umad_file *file, struct ib_mad_agent *agent, in queue_packet() argument
191 mutex_lock(&file->mutex); in queue_packet()
194 atomic_read(&file->recv_list_size) > MAX_UMAD_RECV_LIST_SIZE) in queue_packet()
200 if (agent == __get_agent(file, packet->mad.hdr.id)) { in queue_packet()
201 list_add_tail(&packet->list, &file->recv_list); in queue_packet()
202 atomic_inc(&file->recv_list_size); in queue_packet()
[all …]
/linux/tools/objtool/
H A Dcheck.c41 struct instruction *find_insn(struct objtool_file *file, in find_insn() argument
46 hash_for_each_possible(file->insn_hash, insn, hash, sec_offset_hash(sec, offset)) { in find_insn()
54 struct instruction *next_insn_same_sec(struct objtool_file *file, in next_insn_same_sec() argument
58 return find_insn(file, insn->sec, insn->offset + insn->len); in next_insn_same_sec()
67 static struct instruction *next_insn_same_func(struct objtool_file *file, in next_insn_same_func() argument
70 struct instruction *next = next_insn_same_sec(file, insn); in next_insn_same_func()
84 return find_insn(file, func->cfunc->sec, func->cfunc->offset); in next_insn_same_func()
87 static struct instruction *prev_insn_same_sec(struct objtool_file *file, in prev_insn_same_sec() argument
92 return find_insn(file, insn->sec, insn->offset - insn->prev_len); in prev_insn_same_sec()
99 static struct instruction *prev_insn_same_sym(struct objtool_file *file, in prev_insn_same_sym() argument
[all …]
/linux/kernel/trace/
H A Dtrace_events_trigger.c177 event_triggers_call(struct trace_event_file *file, in event_triggers_call() argument
185 if (list_empty(&file->triggers)) in event_triggers_call()
188 list_for_each_entry_rcu(data, &file->triggers, list) { in event_triggers_call()
208 bool __trace_trigger_soft_disabled(struct trace_event_file *file) in __trace_trigger_soft_disabled() argument
210 unsigned long eflags = file->flags; in __trace_trigger_soft_disabled()
213 event_triggers_call(file, NULL, NULL, NULL); in __trace_trigger_soft_disabled()
217 return trace_event_ignore_this_pid(file); in __trace_trigger_soft_disabled()
235 event_triggers_post_call(struct trace_event_file *file, in event_triggers_post_call() argument
240 list_for_each_entry_rcu(data, &file->triggers, list) { in event_triggers_post_call()
262 static bool check_user_trigger(struct trace_event_file *file) in check_user_trigger() argument
[all …]
H A Dtrace_events.c72 #define do_for_each_event_file(tr, file) \ argument
74 list_for_each_entry(file, &tr->events, list)
76 #define do_for_each_event_file_safe(tr, file) \ argument
79 list_for_each_entry_safe(file, ___n, &tr->events, list)
703 struct trace_event_file *file = data; in trace_event_reg() local
710 file); in trace_event_reg()
714 file); in trace_event_reg()
742 struct trace_event_file *file; in trace_event_enable_cmd_record() local
747 do_for_each_event_file(tr, file) { in trace_event_enable_cmd_record()
749 if (!(file->flags & EVENT_FILE_FL_ENABLED)) in trace_event_enable_cmd_record()
[all …]
/linux/fs/proc/
H A Dinode.c235 struct file *file; in close_pdeo() local
241 file = pdeo->file; in close_pdeo()
242 pde->proc_ops->proc_release(file_inode(file), file); in close_pdeo()
275 static loff_t proc_reg_llseek(struct file *file, loff_t offset, int whence) in proc_reg_llseek() argument
277 struct proc_dir_entry *pde = PDE(file_inode(file)); in proc_reg_llseek()
281 return pde->proc_ops->proc_lseek(file, offset, whence); in proc_reg_llseek()
283 rv = pde->proc_ops->proc_lseek(file, offset, whence); in proc_reg_llseek()
304 static ssize_t pde_read(struct proc_dir_entry *pde, struct file *file, char __user *buf, size_t cou… in pde_read() argument
308 return read(file, buf, count, ppos); in pde_read()
312 static ssize_t proc_reg_read(struct file *file, char __user *buf, size_t count, loff_t *ppos) in proc_reg_read() argument
[all …]
/linux/fs/ceph/
H A Dioctl.c18 static long ceph_ioctl_get_layout(struct file *file, void __user *arg) in ceph_ioctl_get_layout() argument
20 struct ceph_inode_info *ci = ceph_inode(file_inode(file)); in ceph_ioctl_get_layout()
24 err = ceph_do_getattr(file_inode(file), CEPH_STAT_CAP_LAYOUT, false); in ceph_ioctl_get_layout()
65 static long ceph_ioctl_set_layout(struct file *file, void __user *arg) in ceph_ioctl_set_layout() argument
67 struct inode *inode = file_inode(file); in ceph_ioctl_set_layout()
71 struct ceph_inode_info *ci = ceph_inode(file_inode(file)); in ceph_ioctl_set_layout()
79 err = ceph_do_getattr(file_inode(file), CEPH_STAT_CAP_LAYOUT, false); in ceph_ioctl_set_layout()
137 static long ceph_ioctl_set_layout_policy (struct file *file, void __user *arg) in ceph_ioctl_set_layout_policy() argument
139 struct inode *inode = file_inode(file); in ceph_ioctl_set_layout_policy()
180 static long ceph_ioctl_get_dataloc(struct file *file, void __user *arg) in ceph_ioctl_get_dataloc() argument
[all …]
/linux/drivers/gpu/drm/
H A Ddrm_file.c136 struct drm_file *file; in drm_file_alloc() local
139 file = kzalloc_obj(*file); in drm_file_alloc()
140 if (!file) in drm_file_alloc()
144 file->client_id = atomic64_inc_return(&ident); in drm_file_alloc()
145 rcu_assign_pointer(file->pid, get_pid(task_tgid(current))); in drm_file_alloc()
146 file->minor = minor; in drm_file_alloc()
149 file->authenticated = capable(CAP_SYS_ADMIN); in drm_file_alloc()
151 INIT_LIST_HEAD(&file->lhead); in drm_file_alloc()
152 INIT_LIST_HEAD(&file->fbs); in drm_file_alloc()
153 mutex_init(&file->fbs_lock); in drm_file_alloc()
[all …]
/linux/include/linux/
H A Dfsnotify.h116 static inline int fsnotify_file(struct file *file, __u32 mask) in fsnotify_file() argument
124 if (FMODE_FSNOTIFY_NONE(file->f_mode)) in fsnotify_file()
127 return fsnotify_path(&file->f_path, mask); in fsnotify_file()
132 int fsnotify_open_perm_and_set_mode(struct file *file);
137 static inline int fsnotify_file_area_perm(struct file *file, int perm_mask, in fsnotify_file_area_perm() argument
145 lockdep_assert_once(file_write_not_started(file)); in fsnotify_file_area_perm()
153 if (unlikely(FMODE_FSNOTIFY_HSM(file->f_mode))) { in fsnotify_file_area_perm()
154 int ret = fsnotify_pre_content(&file->f_path, ppos, count); in fsnotify_file_area_perm()
161 likely(!FMODE_FSNOTIFY_ACCESS_PERM(file->f_mode))) in fsnotify_file_area_perm()
168 return fsnotify_path(&file->f_path, FS_ACCESS_PERM); in fsnotify_file_area_perm()
[all …]
H A Dfile.h16 struct file;
18 extern void fput(struct file *);
26 extern struct file *alloc_file_pseudo(struct inode *, struct vfsmount *,
28 extern struct file *alloc_file_pseudo_noaccount(struct inode *, struct vfsmount *,
30 extern struct file *alloc_file_clone(struct file *, int flags,
44 #define fd_file(f) ((struct file *)((f).word & ~(FDPUT_FPUT|FDPUT_POS_UNLOCK)))
51 static inline struct fd BORROWED_FD(struct file *f) in BORROWED_FD()
55 static inline struct fd CLONED_FD(struct file *f) in CLONED_FD()
66 extern struct file *fget(unsigned int fd);
67 extern struct file *fget_raw(unsigned int fd);
[all …]
/linux/fs/ocfs2/
H A Dlocks.c23 static int ocfs2_do_flock(struct file *file, struct inode *inode, in ocfs2_do_flock() argument
27 struct ocfs2_file_private *fp = file->private_data; in ocfs2_do_flock()
58 locks_lock_file_wait(file, &request); in ocfs2_do_flock()
60 ocfs2_file_unlock(file); in ocfs2_do_flock()
63 ret = ocfs2_file_lock(file, level, trylock); in ocfs2_do_flock()
72 ret = locks_lock_file_wait(file, fl); in ocfs2_do_flock()
74 ocfs2_file_unlock(file); in ocfs2_do_flock()
82 static int ocfs2_do_funlock(struct file *file, int cmd, struct file_lock *fl) in ocfs2_do_funlock() argument
85 struct ocfs2_file_private *fp = file->private_data; in ocfs2_do_funlock()
88 ocfs2_file_unlock(file); in ocfs2_do_funlock()
[all …]
/linux/tools/perf/util/
H A Ddata.c23 static void perf_data_file__close(struct perf_data_file *file) in close_dir()
25 if (file->use_stdio) { in close_dir()
26 if (file->fptr) { in close_dir()
27 fclose(file->fptr); in close_dir()
28 file->fptr = NULL; in close_dir()
31 close(file->fd);
32 file->fd = -1; in perf_data__close_dir()
34 zfree(&file->path); in perf_data__close_dir()
66 struct perf_data_file *file = &files[i]; in perf_data__create_dir()
68 ret = asprintf(&file in perf_data__create_dir()
51 struct perf_data_file *file = &files[i]; perf_data__create_dir() local
115 struct perf_data_file *file; perf_data__open_dir() local
385 perf_data_file__write(struct perf_data_file * file,void * buf,size_t size) perf_data_file__write() argument
449 struct perf_data_file *file = &data->dir.files[i]; perf_data__size() local
531 FILE *file; is_perf_data() local
[all...]
/linux/scripts/
H A Dleaking_addresses.pl268 my $file = '/boot/config-' . `uname -r`;
269 chomp $file;
270 @config_files = ($file, '/boot/config');
273 foreach my $file (@config_files) {
274 dprint("parsing config file: $file\n");
275 $value = option_from_file($option, $file);
287 my ($option, $file) = @_;
291 open(my $fh, "<", $file) or return "";
460 my ($file) = @_;
465 parse_file($file);
[all …]
/linux/drivers/media/pci/ivtv/
H A Divtv-ioctl.c309 static int ivtv_g_fmt_sliced_vbi_out(struct file *file, void *fh, struct v4l2_format *fmt) in ivtv_g_fmt_sliced_vbi_out() argument
311 struct ivtv *itv = file2id(file)->itv; in ivtv_g_fmt_sliced_vbi_out()
331 static int ivtv_g_fmt_vid_cap(struct file *file, void *fh, struct v4l2_format *fmt) in ivtv_g_fmt_vid_cap() argument
333 struct ivtv_open_id *id = file2id(file); in ivtv_g_fmt_vid_cap()
354 static int ivtv_g_fmt_vbi_cap(struct file *file, void *fh, struct v4l2_format *fmt) in ivtv_g_fmt_vbi_cap() argument
356 struct ivtv *itv = file2id(file)->itv; in ivtv_g_fmt_vbi_cap()
372 static int ivtv_g_fmt_sliced_vbi_cap(struct file *file, void *fh, struct v4l2_format *fmt) in ivtv_g_fmt_sliced_vbi_cap() argument
375 struct ivtv_open_id *id = file2id(file); in ivtv_g_fmt_sliced_vbi_cap()
395 static int ivtv_g_fmt_vid_out(struct file *file, void *fh, struct v4l2_format *fmt) in ivtv_g_fmt_vid_out() argument
397 struct ivtv_open_id *id = file2id(file); in ivtv_g_fmt_vid_out()
[all …]
/linux/drivers/media/pci/cx18/
H A Dcx18-ioctl.c52 static int cx18_g_fmt_vid_cap(struct file *file, void *fh, in cx18_g_fmt_vid_cap() argument
55 struct cx18_open_id *id = file2id(file); in cx18_g_fmt_vid_cap()
76 static int cx18_try_fmt_vid_cap(struct file *file, void *fh, in cx18_try_fmt_vid_cap() argument
79 struct cx18_open_id *id = file2id(file); in cx18_try_fmt_vid_cap()
121 static int cx18_s_fmt_vid_cap(struct file *file, void *fh, in cx18_s_fmt_vid_cap() argument
124 struct cx18_open_id *id = file2id(file); in cx18_s_fmt_vid_cap()
133 ret = cx18_try_fmt_vid_cap(file, fh, fmt); in cx18_s_fmt_vid_cap()
154 return cx18_g_fmt_vid_cap(file, fh, fmt); in cx18_s_fmt_vid_cap()
261 static int cx18_g_fmt_vbi_cap(struct file *file, void *fh, in cx18_g_fmt_vbi_cap() argument
264 struct cx18 *cx = file2id(file)->cx; in cx18_g_fmt_vbi_cap()
[all …]
/linux/drivers/net/wireless/marvell/libertas/
H A Ddebugfs.c25 static ssize_t write_file_dummy(struct file *file, const char __user *buf, in write_file_dummy() argument
33 static ssize_t lbs_dev_info(struct file *file, char __user *userbuf, in lbs_dev_info() argument
36 struct lbs_private *priv = file->private_data; in lbs_dev_info()
55 static ssize_t lbs_sleepparams_write(struct file *file, in lbs_sleepparams_write() argument
59 struct lbs_private *priv = file->private_data; in lbs_sleepparams_write()
92 static ssize_t lbs_sleepparams_read(struct file *file, char __user *userbuf, in lbs_sleepparams_read() argument
95 struct lbs_private *priv = file->private_data; in lbs_sleepparams_read()
120 static ssize_t lbs_host_sleep_write(struct file *file, in lbs_host_sleep_write() argument
124 struct lbs_private *priv = file->private_data; in lbs_host_sleep_write()
162 static ssize_t lbs_host_sleep_read(struct file *file, char __user *userbuf, in lbs_host_sleep_read() argument
[all …]
/linux/tools/testing/ktest/examples/bootconfigs/
H A Dverify-functiongraph.sh6 file="$1"
8 content=`cat $file`
10 echo "FAILED: $file has '$content', expected '$val'"
16 file="$1"
18 content=`cat $file | sed -ne "/^$val/p"`
20 echo "FAILED: $file does not contain '$val'"
21 cat $file
27 file=$1
30 if ! grep -q "$val" $file ; then
31 echo "FAILED: $file does not contain $val"
[all …]
H A Dverify-tracing.sh6 file="$1"
8 content=`cat $file`
10 echo "FAILED: $file has '$content', expected '$val'"
16 file="$1"
18 content=`cat $file | sed -ne "/^$val/p"`
20 echo "FAILED: $file does not contain '$val'"
21 cat $file
27 file=$1
30 if ! grep -q "$val" $file ; then
31 echo "FAILED: $file does not contain $val"
[all …]
/linux/virt/kvm/
H A Dvfio.c26 struct file *file; member
38 static void kvm_vfio_file_set_kvm(struct file *file, struct kvm *kvm) in kvm_vfio_file_set_kvm() argument
40 void (*fn)(struct file *file, struct kvm *kvm); in kvm_vfio_file_set_kvm()
46 fn(file, kvm); in kvm_vfio_file_set_kvm()
51 static bool kvm_vfio_file_enforced_coherent(struct file *file) in kvm_vfio_file_enforced_coherent() argument
53 bool (*fn)(struct file *file); in kvm_vfio_file_enforced_coherent()
60 ret = fn(file); in kvm_vfio_file_enforced_coherent()
67 static bool kvm_vfio_file_is_valid(struct file *file) in kvm_vfio_file_is_valid() argument
69 bool (*fn)(struct file *file); in kvm_vfio_file_is_valid()
76 ret = fn(file); in kvm_vfio_file_is_valid()
[all …]
/linux/tools/testing/selftests/coredump/
H A Dstackdump_test.c37 FILE *file; in FIXTURE_SETUP() local
42 file = fopen("/proc/sys/kernel/core_pattern", "r"); in FIXTURE_SETUP()
43 ASSERT_NE(NULL, file); in FIXTURE_SETUP()
45 ret = fread(self->original_core_pattern, 1, sizeof(self->original_core_pattern), file); in FIXTURE_SETUP()
46 ASSERT_TRUE(ret || feof(file)); in FIXTURE_SETUP()
53 ret = fclose(file); in FIXTURE_SETUP()
60 FILE *file; in FIXTURE_TEARDOWN() local
72 file = fopen("/proc/sys/kernel/core_pattern", "w"); in FIXTURE_TEARDOWN()
73 if (!file) { in FIXTURE_TEARDOWN()
78 ret = fprintf(file, "%s", self->original_core_pattern); in FIXTURE_TEARDOWN()
[all …]
/linux/fs/
H A Dkernel_read_file.c35 ssize_t kernel_read_file(struct file *file, loff_t offset, void **buf, in kernel_read_file() argument
48 if (!S_ISREG(file_inode(file)->i_mode)) in kernel_read_file()
51 ret = deny_write_access(file); in kernel_read_file()
55 i_size = i_size_read(file_inode(file)); in kernel_read_file()
72 ret = security_kernel_read_file(file, id, whole_file); in kernel_read_file()
93 bytes = kernel_read(file, *buf + copied, wanted, &pos); in kernel_read_file()
110 ret = security_kernel_post_read_file(file, *buf, i_size, id); in kernel_read_file()
122 allow_write_access(file); in kernel_read_file()
131 struct file *file; in kernel_read_file_from_path() local
137 file = filp_open(path, O_RDONLY, 0); in kernel_read_file_from_path()
[all …]
/linux/arch/powerpc/platforms/cell/spufs/
H A Dfile.c44 static int spufs_attr_open(struct inode *inode, struct file *file, in spufs_attr_open() argument
59 file->private_data = attr; in spufs_attr_open()
61 return nonseekable_open(inode, file); in spufs_attr_open()
64 static int spufs_attr_release(struct inode *inode, struct file *file) in spufs_attr_release() argument
66 kfree(file->private_data); in spufs_attr_release()
70 static ssize_t spufs_attr_read(struct file *file, char __user *buf, in spufs_attr_read() argument
77 attr = file->private_data; in spufs_attr_read()
103 static ssize_t spufs_attr_write(struct file *file, const char __user *buf, in spufs_attr_write() argument
111 attr = file->private_data; in spufs_attr_write()
142 static int __fops ## _open(struct inode *inode, struct file *file) \
[all …]
/linux/drivers/xen/xenfs/
H A Dxenstored.c12 static ssize_t xsd_read(struct file *file, char __user *buf, in xsd_read() argument
15 const char *str = (const char *)file->private_data; in xsd_read()
19 static int xsd_release(struct inode *inode, struct file *file) in xsd_release() argument
21 kfree(file->private_data); in xsd_release()
25 static int xsd_kva_open(struct inode *inode, struct file *file) in xsd_kva_open() argument
27 file->private_data = (void *)kasprintf(GFP_KERNEL, "0x%p", in xsd_kva_open()
29 if (!file->private_data) in xsd_kva_open()
34 static int xsd_kva_mmap(struct file *file, struct vm_area_struct *vma) in xsd_kva_mmap() argument
56 static int xsd_port_open(struct inode *inode, struct file *file) in xsd_port_open() argument
58 file->private_data = (void *)kasprintf(GFP_KERNEL, "%d", in xsd_port_open()
[all …]
/linux/drivers/media/usb/pvrusb2/
H A Dpvrusb2-v4l2.c41 struct file *file; member
49 static inline struct pvr2_v4l2_fh *to_pvr2_v4l2_fh(struct file *filp) in to_pvr2_v4l2_fh()
112 static int pvr2_querycap(struct file *file, void *priv, struct v4l2_capability *cap) in pvr2_querycap() argument
114 struct pvr2_v4l2_fh *fh = to_pvr2_v4l2_fh(file); in pvr2_querycap()
127 static int pvr2_g_std(struct file *file, void *priv, v4l2_std_id *std) in pvr2_g_std() argument
129 struct pvr2_v4l2_fh *fh = to_pvr2_v4l2_fh(file); in pvr2_g_std()
140 static int pvr2_s_std(struct file *file, void *priv, v4l2_std_id std) in pvr2_s_std() argument
142 struct pvr2_v4l2_fh *fh = to_pvr2_v4l2_fh(file); in pvr2_s_std()
152 static int pvr2_querystd(struct file *file, void *priv, v4l2_std_id *std) in pvr2_querystd() argument
154 struct pvr2_v4l2_fh *fh = to_pvr2_v4l2_fh(file); in pvr2_querystd()
[all …]

12345678910>>...175