chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1c73380
)
terminal-util: no real reason to assert on O_CREAT
author
Lennart Poettering
<lennart@poettering.net>
Mon, 3 Aug 2015 17:06:01 +0000
(19:06 +0200)
committer
Sven Eden
<yamakuzure@gmx.net>
Tue, 14 Mar 2017 09:18:46 +0000
(10:18 +0100)
That's just handle this as a normal error.
src/basic/terminal-util.c
patch
|
blob
|
history
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);