suckle
This commit is contained in:
parent
e4cafe1960
commit
17e356513f
1 changed files with 13 additions and 17 deletions
|
@ -1,23 +1,20 @@
|
||||||
#ifdef __serenity__
|
#ifdef __serenity__
|
||||||
|
|
||||||
// clang-format off
|
// clang-format off
|
||||||
#include <cerrno> // For errno
|
#include <format> // std::format
|
||||||
#include <cstring> // For strerror
|
#include <fstream> // std::ifstream
|
||||||
#include <filesystem>
|
|
||||||
#include <format>
|
|
||||||
#include <fstream>
|
|
||||||
#include <glaze/core/common.hpp> // glz::object
|
#include <glaze/core/common.hpp> // glz::object
|
||||||
#include <glaze/core/context.hpp> // glz::error_ctx, glz::error_code
|
#include <glaze/core/context.hpp> // glz::error_ctx, glz::error_code
|
||||||
#include <glaze/core/meta.hpp> // glz::detail::Object
|
#include <glaze/core/meta.hpp> // glz::detail::Object
|
||||||
#include <glaze/json/read.hpp> // glz::read_json
|
#include <glaze/core/read.hpp> // glz::read
|
||||||
#include <iostream>
|
#include <iterator> // std::istreambuf_iterator
|
||||||
#include <pwd.h> // For getpwuid(), struct passwd
|
#include <pwd.h> // getpwuid, struct passwd
|
||||||
#include <string>
|
#include <string> // std::string (String)
|
||||||
#include <string_view>
|
#include <string_view> // std::string_view (StringView)
|
||||||
#include <sys/statvfs.h>
|
#include <sys/statvfs.h> // statvfs
|
||||||
#include <sys/types.h> // For uid_t
|
#include <sys/types.h> // uid_t
|
||||||
#include <sys/utsname.h>
|
#include <sys/utsname.h> // utsname, uname
|
||||||
#include <unistd.h>
|
#include <unistd.h> // getuid, gethostname
|
||||||
|
|
||||||
#include "src/util/defs.hpp"
|
#include "src/util/defs.hpp"
|
||||||
#include "src/util/error.hpp"
|
#include "src/util/error.hpp"
|
||||||
|
@ -100,7 +97,6 @@ namespace os {
|
||||||
|
|
||||||
fn GetShell() -> Result<String, DracError> {
|
fn GetShell() -> Result<String, DracError> {
|
||||||
uid_t userId = getuid();
|
uid_t userId = getuid();
|
||||||
errno = 0;
|
|
||||||
struct passwd* pw = getpwuid(userId);
|
struct passwd* pw = getpwuid(userId);
|
||||||
|
|
||||||
if (pw == nullptr)
|
if (pw == nullptr)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue