Home
last modified time | relevance | path

Searched refs:O_TRUNC (Results 1 – 53 of 53) sorted by relevance

/linux-4.4.14/include/uapi/asm-generic/
Dfcntl.h31 #ifndef O_TRUNC
32 #define O_TRUNC 00001000 /* not fcntl */ macro
/linux-4.4.14/arch/alpha/include/uapi/asm/
Dfcntl.h5 #define O_TRUNC 02000 /* not fcntl */ macro
/linux-4.4.14/arch/sparc/include/uapi/asm/
Dfcntl.h7 #define O_TRUNC 0x0400 /* not fcntl */ macro
/linux-4.4.14/arch/mips/include/uapi/asm/
Dfcntl.h17 #define O_TRUNC 0x0200 /* not fcntl */ macro
/linux-4.4.14/tools/testing/selftests/kcmp/
Dkcmp_test.c34 fd1 = open(kpath, O_RDWR | O_CREAT | O_TRUNC, 0644); in main()
/linux-4.4.14/arch/powerpc/boot/
Dmktree.c86 if ((out_fd = open(argv[2], (O_RDWR | O_CREAT | O_TRUNC), 0666)) < 0) { in main()
/linux-4.4.14/Documentation/filesystems/
Dmandatory-locking.txt92 O_TRUNC flag set should be rejected. The Linux implementation follows the SVID
93 definition, which is the "Right Thing", since only calls with O_TRUNC can
96 HP-UX even disallows open() with O_TRUNC for a file with advisory locks, not
134 4. Calls to open() with O_TRUNC, or to creat(), on a existing file that has
Dntfs.txt85 - The new driver supports truncate(2) and open(2) with O_TRUNC. But at present
Dext4.txt316 fd = open("foo", O_TRUNC)/write(fd,..)/close(fd).
/linux-4.4.14/tools/perf/util/
Ddata.c98 fd = open(file->path, O_CREAT|O_RDWR|O_TRUNC, S_IRUSR|S_IWUSR); in open_file_write()
/linux-4.4.14/tools/testing/selftests/exec/
Dexecveat.c140 int out_fd = open(dest, O_RDWR|O_CREAT|O_TRUNC, 0755); in exe_cp()
372 fd = open("subdir.ephemeral/script", O_RDWR|O_CREAT|O_TRUNC, 0755); in prerequisites()
/linux-4.4.14/fs/overlayfs/
Dinode.c346 if (!(OPEN_FMODE(flags) & FMODE_WRITE) && !(flags & O_TRUNC)) in ovl_open_need_copy_up()
367 if (file_flags & O_TRUNC) in ovl_d_select_inode()
/linux-4.4.14/tools/usb/usbip/src/
Dusbip_attach.c71 fd = open(path, O_WRONLY|O_CREAT|O_TRUNC, S_IRWXU); in record_connection()
/linux-4.4.14/tools/hv/
Dhv_fcopy_daemon.c87 O_RDWR | O_CREAT | O_TRUNC | O_CLOEXEC, 0744); in hv_start_fcopy()
/linux-4.4.14/arch/arm/vdso/
Dvdsomunge.c192 outfd = open(outfile, O_RDWR | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR); in main()
/linux-4.4.14/fs/coda/
Dcoda_linux.c56 if (flags & O_TRUNC) in coda_flags_to_cflags()
/linux-4.4.14/security/apparmor/include/
Dfile.h208 if (flags & O_TRUNC) in aa_map_file_to_perms()
/linux-4.4.14/firmware/
Dihex2fw.c119 outfd = open(argv[optind+1], O_TRUNC|O_CREAT|O_WRONLY, 0644); in main()
/linux-4.4.14/arch/alpha/boot/tools/
Dobjstrip.c98 ofd = open(argv[i++], O_WRONLY | O_CREAT | O_TRUNC, 0666); in main()
/linux-4.4.14/tools/testing/selftests/memfd/
Dmemfd_test.c402 O_RDWR | O_CREAT | O_TRUNC, in mfd_assert_shrink()
420 O_RDWR | O_CREAT | O_TRUNC, in mfd_fail_shrink()
/linux-4.4.14/fs/
Dopen.c749 f->f_flags &= ~(O_CREAT | O_EXCL | O_NOCTTY | O_TRUNC); in do_dentry_open()
925 if (flags & O_TRUNC) in build_open_flags()
1057 return sys_open(pathname, O_CREAT | O_WRONLY | O_TRUNC, mode); in SYSCALL_DEFINE2()
Dnamei.c2698 flag &= ~O_TRUNC; in may_open()
2712 if (flag & O_TRUNC) in may_open()
2807 open_flag &= ~O_TRUNC; in atomic_open()
2818 if (((open_flag & (O_CREAT | O_TRUNC)) || in atomic_open()
2826 } else if (open_flag & (O_EXCL | O_TRUNC)) { in atomic_open()
3015 bool will_truncate = (open_flag & O_TRUNC) != 0; in do_last()
3065 if (op->open_flag & (O_CREAT | O_TRUNC | O_WRONLY | O_RDWR)) { in do_last()
3093 open_flag &= ~O_TRUNC; in do_last()
Dfcntl.c746 O_TRUNC | O_APPEND | /* O_NONBLOCK | */ in fcntl_init()
/linux-4.4.14/scripts/dtc/
Dutil.c277 fd = open(filename, O_WRONLY | O_CREAT | O_TRUNC, 0666); in utilfdt_write_err()
/linux-4.4.14/fs/nfs/
Dnfs4file.c66 if (openflags & O_TRUNC) { in nfs4_file_open()
Dnfstrace.h267 { O_TRUNC, "O_TRUNC" }, \
Dnfs4trace.h168 { O_TRUNC, "O_TRUNC" }, \
Ddir.c1516 if (open_flags & O_TRUNC) { in nfs_atomic_open()
Dnfs4proc.c1222 if (open_mode & (O_EXCL|O_TRUNC)) in can_open_cached()
/linux-4.4.14/fs/cifs/
Ddir.c291 else if ((oflags & (O_CREAT | O_TRUNC)) == (O_CREAT | O_TRUNC)) in cifs_do_create()
Dfile.c84 if (flags & O_TRUNC) in cifs_posix_convert_flags()
103 else if ((flags & (O_CREAT | O_TRUNC)) == (O_CREAT | O_TRUNC)) in cifs_get_disposition()
107 else if ((flags & O_TRUNC) == O_TRUNC) in cifs_get_disposition()
657 ~(O_CREAT | O_EXCL | O_TRUNC); in cifs_reopen_file()
/linux-4.4.14/scripts/
Drecordmcount.c279 fd_map = open(tmp_file, O_WRONLY | O_TRUNC | O_CREAT, sb.st_mode); in write_file()
/linux-4.4.14/Documentation/accounting/
Dgetdelays.c370 fd = open(logfile, O_WRONLY | O_CREAT | O_TRUNC, in main()
/linux-4.4.14/scripts/kconfig/
Dconfdata.c917 fd = open(path, O_WRONLY | O_CREAT | O_TRUNC, 0644); in conf_split_config()
937 fd = open(path, O_WRONLY | O_CREAT | O_TRUNC, 0644); in conf_split_config()
/linux-4.4.14/arch/um/os-Linux/
Dfile.c190 f |= O_TRUNC; in os_open_file()
/linux-4.4.14/init/
Dinitramfs.c340 openflags |= O_TRUNC; in do_name()
/linux-4.4.14/fs/ceph/
Dfile.c119 if (flags & (O_WRONLY|O_RDWR|O_CREAT|O_TRUNC)) in prepare_open_request()
340 (flags & (O_CREAT|O_TRUNC)) ? dir : NULL, in ceph_atomic_open()
/linux-4.4.14/drivers/staging/lustre/lustre/mdc/
Dmdc_lib.c160 if (flags & O_TRUNC) in mds_pack_open_flags()
/linux-4.4.14/tools/virtio/
Dvringh_test.c148 fd = open("/tmp/vringh_test-file", O_RDWR|O_CREAT|O_TRUNC, 0600); in parallel_test()
/linux-4.4.14/fs/fuse/
Dfile.c32 inarg.flags &= ~O_TRUNC; in fuse_send_open()
182 if (fc->atomic_o_trunc && (file->f_flags & O_TRUNC)) { in fuse_finish_open()
201 bool lock_inode = (file->f_flags & O_TRUNC) && in fuse_open_common()
Ddir.c445 flags &= ~(O_CREAT | O_EXCL | O_TRUNC); in fuse_create_open()
/linux-4.4.14/kernel/trace/
Dtrace_events.c1918 (file->f_flags & O_TRUNC)) in ftrace_event_set_open()
1938 (file->f_flags & O_TRUNC)) in ftrace_event_set_pid_open()
Dtrace_uprobe.c639 if ((file->f_mode & FMODE_WRITE) && (file->f_flags & O_TRUNC)) { in probes_open()
Dftrace.c3374 if (file->f_flags & O_TRUNC) in ftrace_regex_open()
4544 (file->f_flags & O_TRUNC)) { in __ftrace_graph_open()
5444 (file->f_flags & O_TRUNC)) in ftrace_pid_open()
Dtrace_kprobe.c848 if ((file->f_mode & FMODE_WRITE) && (file->f_flags & O_TRUNC)) { in probes_open()
Dtrace.c3227 if ((file->f_mode & FMODE_WRITE) && (file->f_flags & O_TRUNC)) { in tracing_open()
/linux-4.4.14/fs/xfs/
Dxfs_ioctl.c228 if ((!(permflag & O_APPEND) || (permflag & O_TRUNC)) && in xfs_open_by_handle()
/linux-4.4.14/drivers/target/
Dtarget_core_alua.c893 struct file *file = filp_open(path, O_RDWR | O_CREAT | O_TRUNC, 0600); in core_alua_write_tpg_metadata()
Dtarget_core_pr.c1982 int flags = O_RDWR | O_CREAT | O_TRUNC; in __core_scsi3_write_aptpl_to_file()
/linux-4.4.14/Documentation/filesystems/cifs/
DCHANGES267 Fix rare oops after acpi suspend. Fix O_TRUNC opens to overwrite on
702 Fix truncate of existing files opened with O_CREAT but not O_TRUNC set.
/linux-4.4.14/kernel/
Dmodule.c893 int ret = (flags & O_TRUNC); in try_force_unload()
/linux-4.4.14/drivers/staging/lustre/lustre/llite/
Dfile.c574 if (file->f_flags & O_TRUNC) in ll_file_open()
/linux-4.4.14/Documentation/cdrom/
Dcdrom-standard.tex665 \cdrom\ devices: $O_CREAT$, $O_NOCTTY$, $O_TRUNC$, $O_APPEND$, and