summaryrefslogtreecommitdiff
path: root/src/basic/terminal-util.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-08-03 19:06:01 +0200
committerLennart Poettering <lennart@poettering.net>2015-08-03 19:07:33 +0200
commit35bdab779ff1ebff72b9a9b1c661978d14793924 (patch)
tree45ca1877a94cc44e903acdfccf8389a2d06828e8 /src/basic/terminal-util.c
parent7d927c9a4d3e05a87659e89844a7d26bb0b86d8b (diff)
terminal-util: no real reason to assert on O_CREAT
That's just handle this as a normal error.
Diffstat (limited to 'src/basic/terminal-util.c')
-rw-r--r--src/basic/terminal-util.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/basic/terminal-util.c b/src/basic/terminal-util.c
index f4c7489e09..cf55263bbf 100644
--- a/src/basic/terminal-util.c
+++ b/src/basic/terminal-util.c
@@ -308,7 +308,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);