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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user