tty-ask-password-agent: drop unnecessary code for non-absolute paths

utmp_wall() always prepends /dev/, so we don't need to do this a second
time here.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2022-05-31 15:54:03 +02:00
parent 35207b14cf
commit b5cb2d2847
@@ -99,8 +99,7 @@ static bool wall_tty_match(const char *path, void *userdata) {
_cleanup_close_ int fd = -1;
struct stat st;
if (!path_is_absolute(path))
path = strjoina("/dev/", path);
assert(path_is_absolute(path));
if (lstat(path, &st) < 0) {
log_debug_errno(errno, "Failed to stat %s: %m", path);