[-]
[+]
|
Changed |
_service:tar_git:systemd.spec
|
|
[-]
[+]
|
Deleted |
_service:tar_git:systemd-187-reintroduce-support-for-deprecated-oom.patch
^
|
@@ -1,57 +0,0 @@
-From 8600c525cb1420570e7670c963abd19c5696b683 Mon Sep 17 00:00:00 2001
-From: Kay Sievers <kay@vrfy.org>
-Date: Mon, 04 Jun 2012 14:41:10 +0000
-Subject: remove support for deprecated /proc/self/oom_adj
-
----
-diff --git a/src/core/dbus-execute.c b/src/core/dbus-execute.c
-index f1a9da0..9322cdf 100644
---- a/src/core/dbus-execute.c
-+++ b/src/core/dbus-execute.c
-@@ -83,14 +83,6 @@ int bus_execute_append_oom_score_adjust(DBusMessageIter *i, const char *property
- if (read_one_line_file("/proc/self/oom_score_adj", &t) >= 0) {
- safe_atoi(t, &n);
- free(t);
-- } else if (read_one_line_file("/proc/self/oom_adj", &t) >= 0) {
-- safe_atoi(t, &n);
-- free(t);
--
-- if (n == OOM_ADJUST_MAX)
-- n = OOM_SCORE_ADJ_MAX;
-- else
-- n = (n * OOM_SCORE_ADJ_MAX) / -OOM_DISABLE;
- }
- }
-
-diff --git a/src/core/execute.c b/src/core/execute.c
-index 3ef4eaf..1b56f6b 100644
---- a/src/core/execute.c
-+++ b/src/core/execute.c
-@@ -1129,22 +1129,9 @@ int exec_spawn(ExecCommand *command,
- char_array_0(t);
-
- if (write_one_line_file("/proc/self/oom_score_adj", t) < 0) {
-- /* Compatibility with Linux <= 2.6.35 */
--
-- int adj;
--
-- adj = (context->oom_score_adjust * -OOM_DISABLE) / OOM_SCORE_ADJ_MAX;
-- adj = CLAMP(adj, OOM_DISABLE, OOM_ADJUST_MAX);
--
-- snprintf(t, sizeof(t), "%i", adj);
-- char_array_0(t);
--
-- if (write_one_line_file("/proc/self/oom_adj", t) < 0
-- && errno != EACCES) {
-- err = -errno;
-- r = EXIT_OOM_ADJUST;
-- goto fail_child;
-- }
-+ err = -errno;
-+ r = EXIT_OOM_ADJUST;
-+ goto fail_child;
- }
- }
-
---
-cgit v0.9.0.2-2-gbebe
|
[-]
[+]
|
Added |
_service:tar_git:systemd-208-do-not-wait-accelerometer.patch
^
|
@@ -0,0 +1,73 @@
+From a545c6e1aa31b4d7e80c9d3609d9fc4fc9921498 Mon Sep 17 00:00:00 2001
+From: Bastien Nocera <hadess@hadess.net>
+Date: Tue, 8 Jul 2014 18:29:06 +0200
+Subject: accelerometer: Don't wait for new data from the sensor
+
+Instead of waiting for new data from the sensor, which might be
+a long time coming, depending on the sensor device, ask the kernel
+for the last state for that particular input device.
+
+diff --git a/src/udev/accelerometer/accelerometer.c b/src/udev/accelerometer/accelerometer.c
+index 925d38d..32adf27 100644
+--- a/src/udev/accelerometer/accelerometer.c
++++ b/src/udev/accelerometer/accelerometer.c
+@@ -180,7 +180,7 @@ get_prev_orientation(struct udev_device *dev)
+ return string_to_orientation(value);
+ }
+
+-#define SET_AXIS(axis, code_) if (ev[i].code == code_) { if (got_##axis == 0) { axis = ev[i].value; got_##axis = true; } }
++#define READ_AXIS(axis, var) { memzero(&abs_info, sizeof(abs_info)); r = ioctl(fd, EVIOCGABS(axis), &abs_info); if (r < 0) return; var = abs_info.value; }
+
+ /* accelerometers */
+ static void test_orientation(struct udev *udev,
+@@ -189,10 +189,9 @@ static void test_orientation(struct udev *udev,
+ {
+ OrientationUp old, new;
+ _cleanup_close_ int fd = -1;
+- struct input_event ev[64];
+- bool got_syn = false;
+- bool got_x = false, got_y = false, got_z = false;
++ struct input_absinfo abs_info;
+ int x = 0, y = 0, z = 0;
++ int r;
+ char text[64];
+
+ old = get_prev_orientation(dev);
+@@ -201,30 +200,10 @@ static void test_orientation(struct udev *udev,
+ if (fd < 0)
+ return;
+
+- while (1) {
+- int i, r;
+-
+- r = read(fd, ev, sizeof(struct input_event) * 64);
+-
+- if (r < (int) sizeof(struct input_event))
+- return;
+-
+- for (i = 0; i < r / (int) sizeof(struct input_event); i++) {
+- if (got_syn) {
+- if (ev[i].type == EV_ABS) {
+- SET_AXIS(x, ABS_X);
+- SET_AXIS(y, ABS_Y);
+- SET_AXIS(z, ABS_Z);
+- }
+- }
+- if (ev[i].type == EV_SYN && ev[i].code == SYN_REPORT)
+- got_syn = true;
+- if (got_x && got_y && got_z)
+- goto read_dev;
+- }
+- }
++ READ_AXIS(ABS_X, x);
++ READ_AXIS(ABS_Y, y);
++ READ_AXIS(ABS_Z, z);
+
+-read_dev:
+ new = orientation_calc(old, x, y, z);
+ snprintf(text, sizeof(text),
+ "ID_INPUT_ACCELEROMETER_ORIENTATION=%s", orientation_to_string(new));
+--
+cgit v0.10.2
+
+
|
[-]
[+]
|
Added |
_service:tar_git:systemd-208-support-additional-argument-in-reboot.patch
^
|
@@ -0,0 +1,193 @@
+From 353fc7a7c84108b50945a7b735368f6adc35fa6b Mon Sep 17 00:00:00 2001
+From: Matti Kosola <matti.kosola@jolla.com>
+Date: Fri, 13 Mar 2015 11:01:08 +0200
+Subject: [PATCH] Support additional argument in reboot
+
+Signed-off-by: Matti Kosola <matti.kosola@jolla.com>
+---
+ man/systemctl.xml | 12 +++++++++++-
+ src/core/shutdown.c | 14 +++++++++++---
+ src/shared/def.h | 2 ++
+ src/systemctl/systemctl.c | 30 ++++++++++++++++++++++++------
+ 4 files changed, 48 insertions(+), 10 deletions(-)
+
+diff --git a/man/systemctl.xml b/man/systemctl.xml
+index e789d4b..fb246dd 100644
+--- a/man/systemctl.xml
++++ b/man/systemctl.xml
+@@ -1166,7 +1166,7 @@ kobject-uevent 1 systemd-udevd-kernel.socket systemd-udevd.service
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+- <term><command>reboot</command></term>
++ <term><command>reboot <optional><replaceable>arg</replaceable></optional></command></term>
+
+ <listitem>
+ <para>Shut down and reboot the system. This is mostly
+@@ -1179,6 +1179,16 @@ kobject-uevent 1 systemd-udevd-kernel.socket systemd-udevd.service
+ specified twice, the operation is immediately executed
+ without terminating any processes or unmounting any file
+ systems. This may result in data loss.</para>
++
++ <para>If the optional argument
++ <replaceable>arg</replaceable> is given, it will be passed
++ as the optional argument to the
++ <citerefentry><refentrytitle>reboot</refentrytitle><manvolnum>2</manvolnum></citerefentry>
++ system call. The value is architecture and firmware
++ specific. As an example, <literal>recovery</literal> might
++ be used to trigger system recovery, and
++ <literal>fota</literal> might be used to trigger a
++ <quote>firmware over the air</quote> update.</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+diff --git a/src/core/shutdown.c b/src/core/shutdown.c
+index 4709746..f4fbe50 100644
+--- a/src/core/shutdown.c
++++ b/src/core/shutdown.c
+@@ -46,6 +46,7 @@
+ #include "virt.h"
+ #include "watchdog.h"
+ #include "killall.h"
++#include "def.h"
+
+ #define FINALIZE_ATTEMPTS 50
+
+@@ -136,6 +137,7 @@ int main(int argc, char *argv[]) {
+ unsigned retries;
+ bool need_umount = true, need_swapoff = true, need_loop_detach = true, need_dm_detach = true;
+ bool in_container, use_watchdog = false;
++ _cleanup_free_ char *param = NULL;
+ char *arguments[3];
+
+ /* suppress shutdown status output if 'quiet' is used */
+@@ -172,9 +174,11 @@ int main(int argc, char *argv[]) {
+
+ in_container = detect_container(NULL) > 0;
+
+- if (streq(argv[1], "reboot"))
++ if (streq(argv[1], "reboot")) {
+ cmd = RB_AUTOBOOT;
+- else if (streq(argv[1], "poweroff"))
++ /* if this fails, that's OK */
++ read_one_line_file(REBOOT_PARAM_FILE, ¶m);
++ } else if (streq(argv[1], "poweroff"))
+ cmd = RB_POWER_OFF;
+ else if (streq(argv[1], "halt"))
+ cmd = RB_HALT_SYSTEM;
+@@ -327,7 +331,11 @@ int main(int argc, char *argv[]) {
+ cmd = RB_AUTOBOOT;
+ }
+
+- reboot(cmd);
++ if (param)
++ syscall(SYS_reboot, LINUX_REBOOT_MAGIC1, LINUX_REBOOT_MAGIC2,
++ LINUX_REBOOT_CMD_RESTART2, param);
++ else
++ reboot(cmd);
+
+ if (errno == EPERM && in_container) {
+ /* If we are in a container, and we lacked
+diff --git a/src/shared/def.h b/src/shared/def.h
+index e4ef735..d7e077a 100644
+--- a/src/shared/def.h
++++ b/src/shared/def.h
+@@ -41,3 +41,5 @@
+ #define LOWERCASE_LETTERS "abcdefghijklmnopqrstuvwxyz"
+ #define UPPERCASE_LETTERS "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
+ #define LETTERS LOWERCASE_LETTERS UPPERCASE_LETTERS
++
++#define REBOOT_PARAM_FILE "/run/systemd/reboot-param"
+diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c
+index bb7ada9..a34fddb 100644
+--- a/src/systemctl/systemctl.c
++++ b/src/systemctl/systemctl.c
+@@ -20,6 +20,8 @@
+ ***/
+
+ #include <sys/reboot.h>
++#include <linux/reboot.h>
++#include <sys/syscall.h>
+ #include <stdio.h>
+ #include <getopt.h>
+ #include <locale.h>
+@@ -4815,7 +4817,7 @@ static int systemctl_help(void) {
+ " emergency Enter system emergency mode\n"
+ " halt Shut down and halt the system\n"
+ " poweroff Shut down and power-off the system\n"
+- " reboot Shut down and reboot the system\n"
++ " reboot [ARG] Shut down and reboot the system\n"
+ " kexec Shut down and reboot the system with kexec\n"
+ " exit Request user instance exit\n"
+ " switch-root [ROOT] [INIT] Change to a different root file system\n"
+@@ -4829,7 +4831,7 @@ static int systemctl_help(void) {
+
+ static int halt_help(void) {
+
+- printf("%s [OPTIONS...]\n\n"
++ printf("%s [OPTIONS...]%s\n\n"
+ "%s the system.\n\n"
+ " --help Show this help\n"
+ " --halt Halt the machine\n"
+@@ -4840,6 +4842,7 @@ static int halt_help(void) {
+ " -d --no-wtmp Don't write wtmp record\n"
+ " --no-wall Don't send wall message before halt/power-off/reboot\n",
+ program_invocation_short_name,
++ arg_action == ACTION_REBOOT ? " [ARG]" : "",
+ arg_action == ACTION_REBOOT ? "Reboot" :
+ arg_action == ACTION_POWEROFF ? "Power off" :
+ "Halt");
+@@ -5266,7 +5269,7 @@ static int halt_parse_argv(int argc, char *argv[]) {
+ { NULL, 0, NULL, 0 }
+ };
+
+- int c, runlevel;
++ int c, r, runlevel;
+
+ assert(argc >= 0);
+ assert(argv);
+@@ -5326,7 +5329,14 @@ static int halt_parse_argv(int argc, char *argv[]) {
+ }
+ }
+
+- if (optind < argc) {
++ if (arg_action == ACTION_REBOOT && argc == optind + 1) {
++ r = write_string_file(REBOOT_PARAM_FILE, argv[optind]);
++ if (r < 0) {
++ log_error("Failed to write reboot param to "
++ REBOOT_PARAM_FILE": %s", strerror(-r));
++ return r;
++ }
++ } else if (optind < argc) {
+ log_error("Too many arguments.");
+ return -EINVAL;
+ }
+@@ -5964,6 +5974,8 @@ done:
+
+ static _noreturn_ void halt_now(enum action a) {
+
++ _cleanup_free_ char *param = NULL;
++
+ /* Make sure C-A-D is handled by the kernel from this
+ * point on... */
+ reboot(RB_ENABLE_CAD);
+@@ -5981,8 +5993,14 @@ static _noreturn_ void halt_now(enum action a) {
+ break;
+
+ case ACTION_REBOOT:
+- log_info("Rebooting.");
+- reboot(RB_AUTOBOOT);
++ if (read_one_line_file(REBOOT_PARAM_FILE, ¶m) == 0) {
++ log_info("Rebooting with arg '%s'.", param);
++ syscall(SYS_reboot, LINUX_REBOOT_MAGIC1, LINUX_REBOOT_MAGIC2,
++ LINUX_REBOOT_CMD_RESTART2, param);
++ } else {
++ log_info("Rebooting.");
++ reboot(RB_AUTOBOOT);
++ }
+ break;
+
+ default:
+--
+1.9.1
+
|
[-]
[+]
|
Changed |
_service
^
|
@@ -1,7 +1,6 @@
<services>
<service name="tar_git">
<param name="url">https://github.com/vakkov/systemd.git</param>
- <param name="revision">adc2d978e94a0afc12d38ebc0e555f810d2e9f69</param>
<param name="branch">master</param>
<param name="dumb">N</param>
</service>
|
|
Renamed |
_service:tar_git:systemd-208+master.20150610114537.9.g5108213.tar.xz
^
|