mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2025-02-20 11:43:27 +08:00
Terminal (Haiku): add basic support
This commit is contained in:
parent
ef60910e51
commit
d3a5f986a8
@ -28,6 +28,8 @@
|
||||
#elif defined(__NetBSD__)
|
||||
#include <sys/types.h>
|
||||
#include <sys/sysctl.h>
|
||||
#elif defined(__HAIKU__)
|
||||
#include <OS.h>
|
||||
#endif
|
||||
|
||||
enum { FF_PIPE_BUFSIZ = 8192 };
|
||||
@ -476,6 +478,16 @@ const char* ffProcessGetBasicInfoLinux(pid_t pid, FFstrbuf* name, pid_t* ppid, i
|
||||
if (!proc)
|
||||
return "kvm_getprocs() failed";
|
||||
|
||||
#elif defined(__HAIKU__)
|
||||
|
||||
team_info info;
|
||||
if (get_team_info(pid, &info) == B_OK)
|
||||
{
|
||||
ffStrbufSetS(name, info.name);
|
||||
if (ppid)
|
||||
*ppid = info.parent;
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
return "Unsupported platform";
|
||||
|
Loading…
x
Reference in New Issue
Block a user