chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
terminal-util: no real reason to assert on O_CREAT
[elogind.git]
/
src
/
basic
/
terminal-util.c
diff --git
a/src/basic/terminal-util.c
b/src/basic/terminal-util.c
index 43510f481dfa359cb9e6464555ea1ea10471117d..28ae5dc08bd9dd0ff8e6269909e8ef6c729036c2 100644
(file)
--- a/
src/basic/terminal-util.c
+++ b/
src/basic/terminal-util.c
@@
-311,7
+311,8
@@
int open_terminal(const char *name, int mode) {
* https://bugs.launchpad.net/ubuntu/+source/linux/+bug/554172/comments/245
*/
- assert(!(mode & O_CREAT));
+ if (mode & O_CREAT)
+ return -EINVAL;
for (;;) {
fd = open(name, mode, 0);