diff options
Diffstat (limited to 'src/libudev/util.c')
-rw-r--r-- | src/libudev/util.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/libudev/util.c b/src/libudev/util.c index 10a786368e..ad16df83dd 100644 --- a/src/libudev/util.c +++ b/src/libudev/util.c @@ -618,8 +618,10 @@ int open_terminal(const char *name, int mode) { * https://bugs.launchpad.net/ubuntu/+source/linux/+bug/554172/comments/245 */ + assert(!(mode & O_CREAT)); + for (;;) { - fd = open(name, mode); + fd = open(name, mode, 0); if (fd >= 0) break; |