[systemd-commits] 3 commits - src/analyze src/compat-libs src/import src/libsystemd-network src/resolve src/shared src/systemctl src/udev
Zbigniew Jędrzejewski-Szmek
zbyszek at kemper.freedesktop.org
Fri Jan 23 06:31:30 PST 2015
src/analyze/analyze-verify.h | 2 ++
src/compat-libs/linkwarning.h | 2 ++
src/import/import-dkr.h | 2 ++
src/libsystemd-network/dhcp-server-internal.h | 2 ++
src/resolve/resolved-dns-domain.h | 2 ++
src/shared/btrfs-util.h | 2 ++
src/shared/gpt.h | 2 ++
src/shared/gunicode.h | 2 ++
src/shared/login-shared.h | 2 ++
src/shared/macro.h | 2 +-
src/shared/sigbus.h | 2 ++
src/shared/sleep-config.h | 2 ++
src/systemctl/systemctl.c | 8 +++++++-
src/udev/mtd_probe/mtd_probe.h | 2 ++
src/udev/scsi_id/scsi.h | 2 ++
src/udev/scsi_id/scsi_id.h | 2 ++
src/udev/udevadm-util.h | 2 ++
17 files changed, 38 insertions(+), 2 deletions(-)
New commits:
commit c9403dced7c3eb0cc2a925c6428ca30ef8527b55
Author: Zbigniew Jędrzejewski-Szmek <zbyszek at in.waw.pl>
Date: Fri Jan 23 09:20:59 2015 -0500
#pragma once here and there
diff --git a/src/analyze/analyze-verify.h b/src/analyze/analyze-verify.h
index 5c86d98..f10c34c 100644
--- a/src/analyze/analyze-verify.h
+++ b/src/analyze/analyze-verify.h
@@ -19,6 +19,8 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
+#pragma once
+
#include <stdbool.h>
#include "path-lookup.h"
diff --git a/src/compat-libs/linkwarning.h b/src/compat-libs/linkwarning.h
index a2e9534..79ece9e 100644
--- a/src/compat-libs/linkwarning.h
+++ b/src/compat-libs/linkwarning.h
@@ -18,6 +18,8 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
+#pragma once
+
#define __make_section_unallocated(section_string) \
asm (".section " section_string "\n\t.previous");
diff --git a/src/import/import-dkr.h b/src/import/import-dkr.h
index 51aacbe..633c767 100644
--- a/src/import/import-dkr.h
+++ b/src/import/import-dkr.h
@@ -19,6 +19,8 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
+#pragma once
+
#include "sd-event.h"
#include "util.h"
diff --git a/src/libsystemd-network/dhcp-server-internal.h b/src/libsystemd-network/dhcp-server-internal.h
index eb7d6d4..58750c4 100644
--- a/src/libsystemd-network/dhcp-server-internal.h
+++ b/src/libsystemd-network/dhcp-server-internal.h
@@ -20,6 +20,8 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
+#pragma once
+
#include "sd-event.h"
#include "sd-dhcp-server.h"
diff --git a/src/resolve/resolved-dns-domain.h b/src/resolve/resolved-dns-domain.h
index 0888a78..36f27ea 100644
--- a/src/resolve/resolved-dns-domain.h
+++ b/src/resolve/resolved-dns-domain.h
@@ -19,6 +19,8 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
+#pragma once
+
#include <sys/types.h>
#include "hashmap.h"
diff --git a/src/shared/btrfs-util.h b/src/shared/btrfs-util.h
index d5249d1..1b9c142 100644
--- a/src/shared/btrfs-util.h
+++ b/src/shared/btrfs-util.h
@@ -19,6 +19,8 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
+#pragma once
+
#include <stdbool.h>
#include <sys/types.h>
diff --git a/src/shared/gpt.h b/src/shared/gpt.h
index 87308b0..add1df4 100644
--- a/src/shared/gpt.h
+++ b/src/shared/gpt.h
@@ -19,6 +19,8 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
+#pragma once
+
#include <endian.h>
#include "sd-id128.h"
diff --git a/src/shared/gunicode.h b/src/shared/gunicode.h
index a4b2934..e70818f 100644
--- a/src/shared/gunicode.h
+++ b/src/shared/gunicode.h
@@ -4,6 +4,8 @@
* Copyright 2000, 2005 Red Hat, Inc.
*/
+#pragma once
+
#include <stdint.h>
#include <stdbool.h>
#include <stdlib.h>
diff --git a/src/shared/login-shared.h b/src/shared/login-shared.h
index b2787c9..a79f20c 100644
--- a/src/shared/login-shared.h
+++ b/src/shared/login-shared.h
@@ -19,6 +19,8 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
+#pragma once
+
#include <stdbool.h>
bool session_id_valid(const char *id);
diff --git a/src/shared/sigbus.h b/src/shared/sigbus.h
index 25593af..23edc6d 100644
--- a/src/shared/sigbus.h
+++ b/src/shared/sigbus.h
@@ -19,6 +19,8 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
+#pragma once
+
void sigbus_install(void);
void sigbus_reset(void);
diff --git a/src/shared/sleep-config.h b/src/shared/sleep-config.h
index 51d2dec..5eda18e 100644
--- a/src/shared/sleep-config.h
+++ b/src/shared/sleep-config.h
@@ -19,6 +19,8 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
+#pragma once
+
int parse_sleep_config(const char *verb, char ***modes, char ***states);
int can_sleep(const char *verb);
diff --git a/src/udev/mtd_probe/mtd_probe.h b/src/udev/mtd_probe/mtd_probe.h
index 2a37ede..d99be9a 100644
--- a/src/udev/mtd_probe/mtd_probe.h
+++ b/src/udev/mtd_probe/mtd_probe.h
@@ -17,6 +17,8 @@
* Boston, MA 02110-1301 USA
*/
+#pragma once
+
#include <mtd/mtd-user.h>
/* Full oob structure as written on the flash */
diff --git a/src/udev/scsi_id/scsi.h b/src/udev/scsi_id/scsi.h
index c423cac..3f99ae7 100644
--- a/src/udev/scsi_id/scsi.h
+++ b/src/udev/scsi_id/scsi.h
@@ -10,6 +10,8 @@
* Free Software Foundation version 2 of the License.
*/
+#pragma once
+
#include <scsi/scsi.h>
struct scsi_ioctl_command {
diff --git a/src/udev/scsi_id/scsi_id.h b/src/udev/scsi_id/scsi_id.h
index 648b5ce..141b116 100644
--- a/src/udev/scsi_id/scsi_id.h
+++ b/src/udev/scsi_id/scsi_id.h
@@ -15,6 +15,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#pragma once
+
#define MAX_PATH_LEN 512
/*
diff --git a/src/udev/udevadm-util.h b/src/udev/udevadm-util.h
index dba651f..37e4fe8 100644
--- a/src/udev/udevadm-util.h
+++ b/src/udev/udevadm-util.h
@@ -15,6 +15,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#pragma once
+
#include "udev.h"
struct udev_device *find_device(struct udev *udev,
commit 6825a04de61f0bceab0ccddb34d825c3951caef1
Author: Zbigniew Jędrzejewski-Szmek <zbyszek at in.waw.pl>
Date: Fri Jan 23 09:06:00 2015 -0500
build-sys: fix build on compilers without static_assert
Build would fail when assert was used on the same line in
different files #included together.
https://bugs.freedesktop.org/show_bug.cgi?id=87339
diff --git a/src/shared/macro.h b/src/shared/macro.h
index 96d96f9..ae2971f 100644
--- a/src/shared/macro.h
+++ b/src/shared/macro.h
@@ -238,7 +238,7 @@ static inline unsigned long ALIGN_POWER2(unsigned long u) {
#else
#define assert_cc(expr) \
DISABLE_WARNING_DECLARATION_AFTER_STATEMENT; \
- struct CONCATENATE(_assert_struct_, __LINE__) { \
+ struct CONCATENATE(_assert_struct_, __COUNTER__) { \
char x[(expr) ? 0 : -1]; \
}; \
REENABLE_WARNING
commit b986229efe2cc96157aa14c37bab7843311bbef1
Author: Sangjung Woo <sangjung.woo at samsung.com>
Date: Fri Jan 23 20:21:57 2015 +0900
systemctl: bugfix for systemctl reboot command with argument
According to systemctl man page, 'systemctl reboot [arg]' should work
without any errors. However, it does not work because of 'Invalid number
of arguments' error, except for 'reboot [arg]'. This patch fixes the bug
so that both of commands work in exactly the same way.
diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c
index 44b65bb..66c0b99 100644
--- a/src/systemctl/systemctl.c
+++ b/src/systemctl/systemctl.c
@@ -2955,6 +2955,12 @@ static int start_special(sd_bus *bus, char **args) {
return -EPERM;
}
+ if (a == ACTION_REBOOT) {
+ r = update_reboot_param_file(args[1]);
+ if (r < 0)
+ return r;
+ }
+
if (arg_force >= 2 &&
(a == ACTION_HALT ||
a == ACTION_POWEROFF ||
@@ -7093,7 +7099,7 @@ static int systemctl_main(sd_bus *bus, int argc, char *argv[], int bus_error) {
{ "import-environment", MORE, 1, import_environment},
{ "halt", EQUAL, 1, start_special, FORCE },
{ "poweroff", EQUAL, 1, start_special, FORCE },
- { "reboot", EQUAL, 1, start_special, FORCE },
+ { "reboot", MORE, 1, start_special, FORCE },
{ "kexec", EQUAL, 1, start_special },
{ "suspend", EQUAL, 1, start_special },
{ "hibernate", EQUAL, 1, start_special },
More information about the systemd-commits
mailing list