X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fsystemd%2Fsd-login.h;h=24150394100983c5126b11a1f65bce98ade6551f;hb=a20affe2f0fb4c8d488155a0b860549e9389f32a;hp=d05424dbf3b5580f9ddd3ad3668e095272d9387a;hpb=667c24a6a86a5a26a906b7477ae81dcf4c73e64e;p=elogind.git diff --git a/src/systemd/sd-login.h b/src/systemd/sd-login.h index d05424dbf..241503941 100644 --- a/src/systemd/sd-login.h +++ b/src/systemd/sd-login.h @@ -62,9 +62,18 @@ int sd_pid_get_session(pid_t pid, char **session); * return an error for system processes. */ int sd_pid_get_owner_uid(pid_t pid, uid_t *uid); -/* Get systemd unit (i.e. service) name from PID. This will return an - * error for non-service processes. */ -int sd_pid_get_unit(pid_t, char **unit); +/* Get systemd unit (i.e. service) name from PID, for system + * services. This will return an error for non-service processes. */ +int sd_pid_get_unit(pid_t pid, char **unit); + +/* Get systemd unit (i.e. service) name from PID, for user + * services. This will return an error for non-user-service + * processes. */ +int sd_pid_get_user_unit(pid_t pid, char **unit); + +/* Get machine name from PID, for processes assigned to VM or + * container. This will return an error for non-service processes. */ +int sd_pid_get_machine_name(pid_t pid, char **name); /* Get state from uid. Possible states: offline, lingering, online, active, closing */ int sd_uid_get_state(uid_t uid, char**state); @@ -141,6 +150,9 @@ int sd_get_sessions(char ***sessions); * users. If users is NULL only returns the number of users. */ int sd_get_uids(uid_t **users); +/* Get all running virtual machines/containers */ +int sd_get_machine_names(char ***machines); + /* Monitor object */ typedef struct sd_login_monitor sd_login_monitor;