mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-15 05:52:19 +00:00
ps: Use Core::System::fstat()
This commit is contained in:
parent
46510bbb64
commit
61552415a3
Notes:
sideshowbarker
2024-07-17 08:36:27 +09:00
Author: https://github.com/AtkinsSJ
Commit: 61552415a3
Pull-request: https://github.com/SerenityOS/serenity/pull/18856
Reviewed-by: https://github.com/awesomekling
1 changed files with 1 additions and 7 deletions
|
@ -14,13 +14,7 @@
|
|||
|
||||
static ErrorOr<DeprecatedString> determine_tty_pseudo_name()
|
||||
{
|
||||
struct stat tty_stat;
|
||||
if (fstat(STDIN_FILENO, &tty_stat) < 0) {
|
||||
int saved_errno = errno;
|
||||
perror("fstat");
|
||||
return Error::from_errno(saved_errno);
|
||||
}
|
||||
|
||||
auto tty_stat = TRY(Core::System::fstat(STDIN_FILENO));
|
||||
int tty_device_major = major(tty_stat.st_rdev);
|
||||
int tty_device_minor = minor(tty_stat.st_rdev);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue