O_EXCL
#define B_FAIL_IF_EXISTS O_EXCL /* exclusive create */
sLogFile = open(name, O_WRONLY | O_CREAT | O_EXCL, DEFFILEMODE);
if (exists && (openMode & O_EXCL) != 0)
if (S_ISDIR(mode) || S_ISLNK(mode) || (openMode & O_EXCL) != 0)
status = Inode::Create(transaction, directory, name, mode, O_EXCL, 0, NULL,
} else if ((openMode & O_EXCL) == 0) {
if (S_ISDIR(mode) || S_ISLNK(mode) || (openMode & O_EXCL) != 0)
if ((openMode & O_EXCL) != 0)
newInodeNumber, &newNode, attribute, attributeType, (openMode & O_EXCL) != 0);
openMode &= ~(O_CREAT | O_EXCL | O_TRUNC);
if (omode & O_EXCL)
cattr, i, (mode & O_EXCL) == O_EXCL);
flags |= O_EXCL;
#ifndef O_EXCL
if (attribute && (openMode & O_EXCL))
if (openMode & O_EXCL) {
if (exists && (openMode & O_EXCL))
if (n && (omode & O_EXCL) && !uniq) /* already existing entry in there! */
return websearchfs_create_gen(_volume, dir, name, O_EXCL, perms, NULL, NULL, folders_attrs, true, false);
omode |= O_EXCL;
fFile = open(device, O_RDWR | O_EXCL, 0);
fFile = open(device, O_WRONLY | O_EXCL, 0);
fFile = open(device, O_RDWR | O_EXCL, 0);
fFile = open(device, O_WRONLY | O_EXCL, 0);
if ((fd = open(path.Path(), O_RDWR | O_CREAT | O_EXCL, 0666)) < 0) {
FLAG_INFO_ENTRY(O_EXCL),
int fd = open(path, O_RDWR | O_EXCL | O_CREAT, S_IRUSR | S_IWUSR);
O_RDONLY | O_EXCL);
O_RDWR | O_CREAT | O_EXCL, 0666)) >= 0) {
fd = openat(parentFD, entryName, O_RDWR | O_CREAT | O_EXCL,
BFile query(qname.String(), O_CREAT|O_EXCL);
fFD = open(nameBuffer, O_RDWR | O_NONBLOCK | O_EXCL);
ffd = open(buf, O_RDWR | O_NONBLOCK | O_EXCL);
posix_mode |= O_EXCL;
int fd = open(path, O_RDWR | O_EXCL);
fd = open(path, O_RDONLY | O_EXCL);
fd = open(path, O_WRONLY | O_EXCL);
int fd = open_from(directory, name, O_RDWR | O_CREAT | O_EXCL, 0644);
} else if ((mode & O_EXCL) != 0) {
fFd = open(path, O_WRONLY | O_CREAT | O_EXCL, S_IRUSR);
if ((openMode & O_EXCL) != 0)
status = FS_CALL(directory, create, name, openMode | O_EXCL, perms,
if (status != B_OK && ((openMode & O_EXCL) != 0 || status != B_FILE_EXISTS))
if ((openFlags & O_EXCL) != 0)
oflags |= O_EXCL;
openFlags &= ~O_EXCL;
oflags |= O_CREAT | O_EXCL | O_RDWR;
if ((openMode & O_EXCL) != 0)
int fd = shm_open(name, O_RDWR | O_CREAT | O_EXCL | O_NOFOLLOW, 0600);
sem = sem_open(kSemName1, O_CREAT | O_EXCL, S_IRUSR | S_IWUSR, 1);
sem2 = sem_open(kSemName1, O_CREAT | O_EXCL, S_IRUSR | S_IWUSR, 2);
SET_OPEN_MODE_FLAG(O_EXCL, FSSH_O_EXCL)