From: Lennart Poettering Date: Mon, 3 Aug 2015 17:06:01 +0000 (+0200) Subject: terminal-util: no real reason to assert on O_CREAT X-Git-Tag: v225~122^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=35bdab779ff1ebff72b9a9b1c661978d14793924;p=thirdparty%2Fsystemd.git terminal-util: no real reason to assert on O_CREAT That's just handle this as a normal error. --- diff --git a/src/basic/terminal-util.c b/src/basic/terminal-util.c index f4c7489e09c..cf55263bbfe 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);