chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
logind,machined: bump TasksMax=
[elogind.git]
/
src
/
login
/
loginctl.c
diff --git
a/src/login/loginctl.c
b/src/login/loginctl.c
index ac141dca73126d8c219b5283666ea9aff1d4fe51..186959e9c2322c17e5b2e87f35a55fc2f8375bde 100644
(file)
--- a/
src/login/loginctl.c
+++ b/
src/login/loginctl.c
@@
-19,33
+19,40
@@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include <unistd.h>
#include <errno.h>
#include <errno.h>
-#include <string.h>
#include <getopt.h>
#include <locale.h>
#include <getopt.h>
#include <locale.h>
+#include <string.h>
+#include <unistd.h>
#include "sd-bus.h"
#include "sd-bus.h"
-#include "sd-login.h"
-#include "
bus
-util.h"
+
+#include "
alloc
-util.h"
#include "bus-error.h"
#include "bus-error.h"
+#include "bus-util.h"
+//#include "cgroup-show.h"
+#include "cgroup-util.h"
#include "log.h"
#include "log.h"
-
#include "util
.h"
+
//#include "logs-show
.h"
#include "macro.h"
#include "pager.h"
#include "macro.h"
#include "pager.h"
-#include "build.h"
+#include "parse-util.h"
+#include "process-util.h"
+#include "signal-util.h"
+#include "spawn-polkit-agent.h"
#include "strv.h"
#include "strv.h"
-#include "unit-name.h"
#include "sysfs-show.h"
#include "sysfs-show.h"
-// #include "logs-show.h"
-#include "cgroup-show.h"
-#include "cgroup-util.h"
-#include "spawn-polkit-agent.h"
-#include "verbs.h"
-#include "process-util.h"
#include "terminal-util.h"
#include "terminal-util.h"
-#include "signal-util.h"
+#include "unit-name.h"
+#include "user-util.h"
+#include "util.h"
+#include "verbs.h"
+
+/// Additional includes for elogind
#include "logind-action.h"
#include "logind-action.h"
+#include "musl_missing.h"
+#include "sd-login.h"
+#include "virt.h"
static char **arg_property = NULL;
static bool arg_all = false;
static char **arg_property = NULL;
static bool arg_all = false;
@@
-95,8
+102,7
@@
static void polkit_agent_open_if_enabled(void) {
polkit_agent_open();
}
polkit_agent_open();
}
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
static OutputFlags get_output_flags(void) {
return
static OutputFlags get_output_flags(void) {
return
@@
-247,8
+253,7
@@
static int list_seats(int argc, char *argv[], void *userdata) {
return 0;
}
return 0;
}
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
static int show_unit_cgroup(sd_bus *bus, const char *interface, const char *unit, pid_t leader) {
_cleanup_bus_error_free_ sd_bus_error error = SD_BUS_ERROR_NULL;
_cleanup_bus_message_unref_ sd_bus_message *reply = NULL;
static int show_unit_cgroup(sd_bus *bus, const char *interface, const char *unit, pid_t leader) {
_cleanup_bus_error_free_ sd_bus_error error = SD_BUS_ERROR_NULL;
_cleanup_bus_message_unref_ sd_bus_message *reply = NULL;
@@
-746,7
+751,7
@@
static int print_property(const char *name, sd_bus_message *m, const char *conte
if (r < 0)
return bus_log_parse_error(r);
if (r < 0)
return bus_log_parse_error(r);
- if (
UID_IS_INVALID
(uid)) {
+ if (
!uid_is_valid
(uid)) {
log_error("Invalid user ID: " UID_FMT, uid);
return -EINVAL;
}
log_error("Invalid user ID: " UID_FMT, uid);
return -EINVAL;
}
@@
-1694,7
+1699,7
@@
static int parse_argv(int argc, char *argv[]) {
assert(argc >= 0);
assert(argv);
assert(argc >= 0);
assert(argv);
- while ((c = getopt_long(argc, argv, "hp:als:H:M:ci", options, NULL)) >= 0)
+ while ((c = getopt_long(argc, argv, "hp:als:H:M:
n:o:
ci", options, NULL)) >= 0)
switch (c) {
switch (c) {
@@
-1703,9
+1708,7
@@
static int parse_argv(int argc, char *argv[]) {
return 0;
case ARG_VERSION:
return 0;
case ARG_VERSION:
- puts(PACKAGE_STRING);
- puts(SYSTEMD_FEATURES);
- return 0;
+ return version();
case 'p': {
r = strv_extend(&arg_property, optarg);
case 'p': {
r = strv_extend(&arg_property, optarg);
@@
-1846,7
+1849,7
@@
int main(int argc, char *argv[]) {
if (r <= 0)
goto finish;
if (r <= 0)
goto finish;
- r = bus_
open
_transport(arg_transport, arg_host, false, &bus);
+ r = bus_
connect
_transport(arg_transport, arg_host, false, &bus);
if (r < 0) {
log_error_errno(r, "Failed to create bus connection: %m");
goto finish;
if (r < 0) {
log_error_errno(r, "Failed to create bus connection: %m");
goto finish;