O_TRUNC
to_fd = open(to.p_path, O_WRONLY | O_TRUNC, 0);
to_fd = open(to.p_path, O_WRONLY | O_TRUNC | O_CREAT,
to_fd = open(to.p_path, O_WRONLY | O_TRUNC | O_CREAT,
if ((fp = open(short2str(hfile), O_WRONLY | O_CREAT | O_TRUNC,
if (open(tmp, O_RDWR | O_CREAT | O_TRUNC | O_EXCL, 0600) < 0) {
if ((fd = open(tmp, O_WRONLY | O_CREAT | O_TRUNC, 0666)) < 0) {
{ "trunc", O_TRUNC, C_OFLAG },
if ((oflag & O_TRUNC) && (ddflags & C_SEEK)) {
if ((oflag & O_TRUNC) && (ddflags & C_NOTRUNC)) {
(oflag | (ddflags & (C_SEEK | C_NOTRUNC) ? 0 : O_TRUNC))
flags = O_WRONLY | O_CREAT | O_TRUNC;
if ((fd = open(hname, O_WRONLY | O_CREAT | O_TRUNC | O_EXLOCK, 0600)) != -1) {
fd = open(pathx, O_RDWR|O_CREAT|O_EXCL|O_TRUNC, 0600);
open(to, O_CREAT | O_TRUNC | O_WRONLY, sbp->st_mode)) < 0) {
#define AR_MODE (O_WRONLY | O_CREAT | O_TRUNC) /* mode for archive */
return (open(arcn->name, O_TRUNC | O_EXCL | O_RDWR, 0));
fd = open_history_file(file, O_WRONLY|O_CREAT|O_TRUNC);
if ((f = open(fname, O_WRONLY|O_CREAT|O_TRUNC, 0666)) < 0)
#ifndef O_TRUNC
O_NOFOLLOW|O_CREAT|O_TRUNC|O_EXCL|O_NOCTTY|O_DIRECTORY|O_REGULAR)
outfile = open(outname, O_CREAT | O_TRUNC | O_WRONLY, 0666);
fd = open(log->path, O_WRONLY | O_CREAT | O_TRUNC, 0644);
fd = open(log->path, O_WRONLY | O_CREAT | O_TRUNC, 0644);
fd = open(log->path, O_WRONLY | O_CREAT | O_TRUNC, 0644);
O_TRUNC :
return(open(path, O_WRONLY|O_CREAT|O_TRUNC, mode));
O_RDWR | O_SHLOCK | O_TRUNC | O_CLOEXEC)
if (!file || (flags & O_TRUNC) ||
#define OPEN_FLAGS (O_CREAT | O_TRUNC | O_WRONLY | O_CLOEXEC)
o = O_CREAT | O_TRUNC;
if (oflags & O_TRUNC)
if ((i = open(fname, O_WRONLY|O_CREAT|O_TRUNC,
fci->flags = O_CREAT | O_TRUNC | O_RDWR;
fd = open(PCNPATH(pcn), O_RDWR | O_CREAT | O_TRUNC);
fi->flags = (mode & ~(O_CREAT | O_EXCL | O_TRUNC)) - 1;
return open(path, O_CREAT | O_TRUNC | O_WRONLY, mode);
if ((f = open(tempfile, O_WRONLY|O_CREAT|O_TRUNC, 0600)) == -1)
trunc = O_TRUNC;
if ((fd = open(fname, O_WRONLY|O_CREAT|O_TRUNC, 0666)) == -1)
wrinfo.fd = open(argv[1], O_WRONLY | O_TRUNC | O_CREAT, 0644);
wrinfo.fd = open(argv[1], O_WRONLY | O_TRUNC | O_CREAT, 0644);
oflags |= O_TRUNC;
fd = open(device, O_RDWR|O_CREAT|O_TRUNC, 0666);
error = udf_opendisc(dev_name, O_RDWR | O_CREAT | O_TRUNC);
dev_fd = open(dev_name, O_RDWR | O_CREAT | O_TRUNC, 0666);
fd = open(device, O_RDWR|O_CREAT|O_TRUNC, 0666);
fd2 = open(tmpl, O_WRONLY | O_CREAT | O_TRUNC, 0644);
if ((ofile = open(name, O_WRONLY | O_CREAT | O_TRUNC, 0666)) < 0) {
if (!Nflag && (ofile = open(name, O_WRONLY | O_CREAT | O_TRUNC,
if ((fd_seed = open(tmp, O_CREAT|O_TRUNC|O_WRONLY, 0600)) == -1)
if ((fd_new = open(tmp, O_CREAT|O_TRUNC|O_WRONLY, 0600)) == -1) {
fd = open(file, O_WRONLY | O_CREAT | O_TRUNC, mode);
if ((fastfd = open(_PATH_FASTBOOT, O_WRONLY|O_CREAT|O_TRUNC,
if ((logfd = open(_PATH_NOLOGIN, O_WRONLY|O_CREAT|O_TRUNC,
if ((flag & O_TRUNC) && (tp->t_state & TS_TTSTOP)) {
if ((flag & O_TRUNC) && (tp->t_state & TS_TTSTOP)) {
if ((fdout = open(argp[2], O_CREAT | O_TRUNC | O_RDWR, 0644)) < 0) {
if ((to = open(argv[0], O_WRONLY | O_TRUNC | O_CREAT, 0644)) == -1)
if ((to = open(to_file, O_RDWR | O_TRUNC | O_CREAT, 0644)) < 0)
if ((ofd = open(boothfs, O_CREAT | O_TRUNC | O_WRONLY, 0644)) == -1)
if ((fd = open(fn, O_WRONLY | O_CREAT | O_TRUNC, 0644)) < 0) {
if ((prep_fd = open(outname, O_RDWR|O_TRUNC, 0)) < 0) {
if ((rs6000_fd = open(outname, O_RDWR|O_TRUNC, 0)) < 0) {
if ((bebox_fd = open(outname, O_RDWR|O_TRUNC, 0)) < 0) {
if (from & O_TRUNC) to |= C_O_TRUNC; \
if (flag & (FWRITE | O_TRUNC | O_CREAT | O_EXCL)) {
SCARG(&nuap, flags) = O_WRONLY | O_CREAT | O_TRUNC;
res |= cvtto_bsd_mask(lflags, LINUX_O_TRUNC, O_TRUNC);
res |= cvtto_linux_mask(bflags, O_TRUNC, LINUX_O_TRUNC);
SCARG(&oa, flags) = O_CREAT | O_TRUNC | O_WRONLY;
SCARG(&ua, flags) = O_CREAT | O_TRUNC | O_WRONLY;
SCARG(&ua, flags) = O_WRONLY | O_CREAT | O_TRUNC;
SCARG(&ouap, flags) = O_WRONLY | O_CREAT | O_TRUNC;
SCARG(&ua, flags) = O_WRONLY | O_CREAT | O_TRUNC;
SCARG(&ap, flags) = O_WRONLY | O_CREAT | O_TRUNC;
fd = open(name, O_WRONLY | O_CREAT | O_TRUNC, 0644);
fd = open(name, O_WRONLY | O_CREAT | O_TRUNC, 0644);
fd = open(name, O_WRONLY | O_CREAT | O_TRUNC, 0644);
fd = open(name, O_WRONLY | O_CREAT | O_TRUNC, 0644);
int fmode = FFLAGS(O_WRONLY|O_CREAT|O_TRUNC|O_EXCL);
error = union_copyup(un, (mode&O_TRUNC) == 0, cred, l);
fmode = FFLAGS(O_WRONLY | O_CREAT | O_TRUNC | O_EXCL);
!(ap->a_mode & O_TRUNC), cred);
if ((vfe != NULL) && ((fmode & FWRITE) || (fmode & O_TRUNC))) {
if (flags & O_TRUNC) {
fmode &= ~O_TRUNC;
if (fmode & O_TRUNC) {
if ((fflags & (FWRITE | O_TRUNC)) != 0) {
flags = sflags & (3 | O_APPEND | O_ASYNC | O_CREAT | O_TRUNC | O_EXCL);
flags |= (sflags & 0x200) ? O_TRUNC : 0;
O_ASYNC|O_SYNC|O_CREAT|O_TRUNC|O_EXCL|O_DSYNC|\
fd = open(imgpath, O_CREAT | O_RDWR | O_TRUNC, 0600);
RL(dkfd = open(imgpath, O_CREAT|O_RDWR|O_TRUNC, 0600));
fd = open(imgpath, O_CREAT | O_RDWR | O_TRUNC, 0600);
fd = open(imgpath, O_CREAT | O_RDWR | O_TRUNC, 0600);
fd = rump_sys_open("/mp/null", O_WRONLY | O_CREAT | O_TRUNC, 0600);
RL(fd = rump_sys_open("file", O_RDWR|O_CREAT|O_TRUNC, 0666));
RL(fd = rump_sys_open("file", O_RDWR|O_CREAT|O_TRUNC, 0666));
int f = rump_sys_open(LOCKFILE, O_WRONLY|O_CREAT|O_TRUNC, 0666);
O_WRONLY|O_CREAT|O_TRUNC, 0666);
O_RDWR | O_CREAT | O_TRUNC, 0600)) != -1);
O_RDWR | O_CREAT | O_TRUNC, 0600)) != -1);
fd = open (lockfile, O_RDWR|O_CREAT|O_EXCL|O_TRUNC, 0666);
fd = open (lockfile, O_RDWR|O_CREAT|O_EXCL|O_TRUNC, 0666);
output = open(path, O_WRONLY | O_CREAT | O_TRUNC, 0600);
O_WRONLY|O_CREAT|O_TRUNC, 0666)) < 0)
db = dbopen(NULL, O_CREAT|O_TRUNC|O_RDWR, 0, DB_HASH, &hi);
db = state_open(NULL, O_RDWR|O_CREAT|O_TRUNC, 0600);
RL(fd = open(FILENAME, O_WRONLY | O_CREAT | O_TRUNC, 0644));
fd = open(DUMP_FILE, O_WRONLY|O_CREAT|O_TRUNC, 0222);
fd = open(FILE_NAME, O_RDWR|O_CREAT|O_TRUNC, 0666);
fd = open(FILE_NAME, O_RDWR|O_CREAT|O_TRUNC, 0666);
REQUIRE_LIBC(open("t1", O_CREAT | O_TRUNC | O_WRONLY, 0600), -1);
fd = open("foo", O_RDWR|O_CREAT|O_TRUNC, 0666);
fd = open(SYSCTLBAKFILE, O_WRONLY|O_CREAT|O_TRUNC|O_EXCL,
if ((fdes = open(atfile, O_CREAT | O_TRUNC | O_WRONLY, S_IRUSR)) == -1)
ti.outfd = open(*argv, O_CREAT|(aflag ? O_APPEND : O_TRUNC)|O_WRONLY, 0666);
fd = open(pidfile, O_WRONLY | O_CREAT | O_TRUNC, 0644);
if ((capdbp = dbopen(capname, O_CREAT | O_TRUNC | O_RDWR,
oi.dbflags |= O_TRUNC;
(append ? 0 : O_TRUNC) | (synclog ? 0 : O_SYNC),
O_WRONLY|O_CREAT|O_TRUNC|O_EXCL|O_SYNC|O_CLOEXEC, 0);
flags = (detach_ctl.overwrite ? 0 : O_EXCL) | O_CREAT | O_TRUNC | O_WRONLY;
int mode = O_CREAT|(aflag ? O_APPEND : O_TRUNC)|O_WRONLY;
int mode = O_CREAT|(aflag ? O_APPEND : O_TRUNC)|O_WRONLY;
aflag = O_WRONLY | O_APPEND | O_CREAT | O_TRUNC;
aflag &= ~O_TRUNC;
aflag & O_TRUNC ? "write" : "append", filename);
image_fd = open(dest, O_WRONLY|O_CREAT|O_TRUNC, 0666);
tofd = open(to, O_CREAT|O_TRUNC|O_WRONLY, 0666);
O_WRONLY|O_APPEND|O_CREAT|O_TRUNC,
O_WRONLY|O_APPEND|O_CREAT|O_TRUNC,
O_WRONLY|O_APPEND|O_CREAT|O_TRUNC,
O_WRONLY|O_APPEND|O_CREAT|O_TRUNC, DEFFILEMODE)) == -1)
while ((fd = open(tempname, O_RDWR|O_CREAT|O_TRUNC|O_SYNC|O_EXCL, 0644))
if ((ofd = open(fname, O_WRONLY | O_CREAT | O_TRUNC, DEFFILEMODE)) < 0)
O_WRONLY|O_CREAT|O_TRUNC, DEFFILEMODE)) < 0) {
if ((fd = open(*path, O_RDWR|O_CREAT|O_TRUNC, mode)) < 0)
db = dbopen(path, O_CREAT|O_RDWR | (iflag ? O_TRUNC : 0),
oflags = (O_WRONLY | O_TRUNC | O_CREAT);
(O_WRONLY | O_CREAT | O_TRUNC), 0777);
O_CREAT | O_WRONLY | O_TRUNC, S_IRUSR | S_IWUSR)) < 0)
if ((ofd = open(dest, O_WRONLY | O_CREAT | O_TRUNC, 0666)) == -1) {
fd = open(outfile, O_WRONLY | O_CREAT | O_TRUNC, mode);
flags |= O_TRUNC;
fd = open(new_key_file, O_WRONLY|O_TRUNC|O_CREAT|O_EXLOCK, 0600);
db_compat = dbopen(db_name_tmp, O_CREAT|O_EXCL|O_EXLOCK|O_RDWR|O_TRUNC,
flags = O_CREAT | O_WRONLY | O_TRUNC | O_EXCL;
fd = prog_open(fss.fss_bstore, O_CREAT|O_TRUNC|O_WRONLY, 0600);
fd = open(filename, O_CREAT | O_WRONLY | O_TRUNC, 0660);
fd = open(filename, O_CREAT | O_WRONLY | O_TRUNC, 0660);
db = dbopen(dbtemp, O_CREAT | O_EXLOCK | O_TRUNC | O_RDWR,
fd = open(outf, O_WRONLY | O_CREAT | O_TRUNC, 0600);
n = open(tempfile, O_WRONLY|O_CREAT|O_TRUNC|O_EXCL, 0664);
pfd = open(tempremote, O_WRONLY|O_CREAT|O_TRUNC|O_EXCL, 0664);
if ((fsopts->fd = open(image, O_RDWR | O_CREAT | O_TRUNC, 0666)) == -1) {
oflags |= O_TRUNC;
if ((fd = open(image, O_RDWR | O_CREAT | O_TRUNC, 0666)) == -1) {
fd = open(name, O_WRONLY|O_CREAT|O_TRUNC, 0666);
if ((fd = open(NDBOOTD_PID_FILE, O_WRONLY | O_CREAT | O_TRUNC, 0644)) >= 0) {
if ((fd = open(outfile, O_CREAT | O_TRUNC | O_WRONLY, 0644)) == -1) {
wfd = open(filename, O_WRONLY|O_TRUNC|O_CREAT, 0600);
saved_pacct_db = dbopen(_PATH_SAVACCT, O_RDWR|O_CREAT|O_TRUNC, 0644,
pacct_db = dbopen(NULL, O_RDWR|O_CREAT|O_TRUNC, 0644, DB_BTREE, NULL);
saved_usracct_db = dbopen(_PATH_USRACCT, O_RDWR|O_CREAT|O_TRUNC, 0644,
usracct_db = dbopen(NULL, O_RDWR|O_CREAT|O_TRUNC, 0644, DB_BTREE, &bti);
if ((cdbw_fd = open(tname, O_WRONLY | O_CREAT | O_TRUNC, 0666)) == -1) {
outfd = open(outfile, O_WRONLY | O_CREAT | O_TRUNC, 0666);
lockfd = open_locked(_PATH_YPBIND_LOCK, O_CREAT|O_RDWR|O_TRUNC, 0644);
fd = open_locked(path, O_CREAT|O_RDWR|O_TRUNC, 0644);
fd = open_locked(path, O_CREAT|O_RDWR|O_TRUNC, 0644);