projects
/
platform
/
upstream
/
systemd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4bf953d
)
execute: use path_equal() to compare tty names
author
Lennart Poettering
<lennart@poettering.net>
Wed, 20 Mar 2019 20:18:59 +0000
(21:18 +0100)
committer
Lennart Poettering
<lennart@poettering.net>
Wed, 20 Mar 2019 20:18:59 +0000
(21:18 +0100)
After all they might be strings such as pts/1 which we really should
consider the same as pts//1.
src/core/execute.c
patch
|
blob
|
history
diff --git
a/src/core/execute.c
b/src/core/execute.c
index
d464766
..
ac741c2
100644
(file)
--- a/
src/core/execute.c
+++ b/
src/core/execute.c
@@
-4157,7
+4157,7
@@
static bool tty_may_match_dev_console(const char *tty) {
return true; /* if we could not resolve, assume it may */
/* "tty0" means the active VC, so it may be the same sometimes */
- return
streq
(resolved, tty) || (streq(resolved, "tty0") && tty_is_vc(tty));
+ return
path_equal
(resolved, tty) || (streq(resolved, "tty0") && tty_is_vc(tty));
}
bool exec_context_may_touch_console(const ExecContext *ec) {