terminal-util: no real reason to assert on O_CREAT

That's just handle this as a normal error.
This commit is contained in:
Lennart Poettering
2015-08-03 19:07:33 +02:00
parent 7d927c9a4d
commit 35bdab779f
+2 -1
View File
@@ -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);