summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2013-11-22 14:30:52 +0100
committerLennart Poettering <lennart@poettering.net>2013-11-22 16:31:40 +0100
commitbaabc5776475f7313cdaa5f3bdb45c1c5d053f91 (patch)
treebee2f4582c1ae6e75c9d6e287bab17e69d3a1821
parent254ed85a8c6ff182133a9843125e541929ba8197 (diff)
build-sys: move more files from core/ to share/ that are generic enough
-rw-r--r--.gitignore1
-rw-r--r--Makefile.am36
-rw-r--r--TODO2
-rw-r--r--src/core/.gitignore4
-rw-r--r--src/shared/.gitignore4
-rw-r--r--src/shared/initreq.h (renamed from src/core/initreq.h)32
-rw-r--r--src/shared/securebits.h (renamed from src/core/securebits.h)4
-rw-r--r--src/shared/special.h (renamed from src/core/special.h)0
-rw-r--r--src/shared/syscall-list.c (renamed from src/core/syscall-list.c)0
-rw-r--r--src/shared/syscall-list.h (renamed from src/core/syscall-list.h)0
10 files changed, 41 insertions, 42 deletions
diff --git a/.gitignore b/.gitignore
index 20edf322c9..8d0d770c00 100644
--- a/.gitignore
+++ b/.gitignore
@@ -90,6 +90,7 @@
/tags
/test-boot-timestamp
/test-bus-chat
+/test-bus-error
/test-bus-introspect
/test-bus-kernel
/test-bus-kernel-bloom
diff --git a/Makefile.am b/Makefile.am
index 06d4fcf233..983eb8fd89 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -665,6 +665,9 @@ libsystemd_shared_la_SOURCES = \
src/shared/linux/seccomp-bpf.h \
src/shared/ioprio.h \
src/shared/missing.h \
+ src/shared/initreq.h \
+ src/shared/securebits.h \
+ src/shared/special.h \
src/shared/list.h \
src/shared/macro.h \
src/shared/def.h \
@@ -764,11 +767,15 @@ libsystemd_shared_la_SOURCES = \
src/shared/net-util.c \
src/shared/net-util.h \
src/shared/errno-list.c \
- src/shared/errno-list.h
+ src/shared/errno-list.h \
+ src/shared/syscall-list.c \
+ src/shared/syscall-list.h
nodist_libsystemd_shared_la_SOURCES = \
src/shared/errno-from-name.h \
- src/shared/errno-to-name.h
+ src/shared/errno-to-name.h \
+ src/shared/syscall-from-name.h \
+ src/shared/syscall-to-name.h
# ------------------------------------------------------------------------------
noinst_LTLIBRARIES += \
@@ -973,17 +980,12 @@ libsystemd_core_la_SOURCES = \
src/core/namespace.h \
src/core/tcpwrap.c \
src/core/tcpwrap.h \
- src/core/securebits.h \
- src/core/initreq.h \
- src/core/special.h \
src/core/build.h \
src/core/sysfs-show.h \
src/core/switch-root.h \
src/core/switch-root.c \
src/core/killall.h \
src/core/killall.c \
- src/core/syscall-list.c \
- src/core/syscall-list.h \
src/core/audit-fd.c \
src/core/audit-fd.h \
src/core/async.c \
@@ -997,9 +999,7 @@ endif
nodist_libsystemd_core_la_SOURCES = \
src/core/load-fragment-gperf.c \
- src/core/load-fragment-gperf-nulstr.c \
- src/core/syscall-from-name.h \
- src/core/syscall-to-name.h
+ src/core/load-fragment-gperf-nulstr.c
libsystemd_core_la_CFLAGS = \
$(AM_CFLAGS) \
@@ -1037,30 +1037,30 @@ CLEANFILES += \
src/core/load-fragment-gperf.gperf \
src/core/load-fragment-gperf.c \
src/core/load-fragment-gperf-nulstr.c \
- src/core/syscall-list.txt \
- src/core/syscall-from-name.gperf \
+ src/shared/syscall-list.txt \
+ src/shared/syscall-from-name.gperf \
src/shared/errno-list.txt \
src/shared/errno-from-name.gperf
BUILT_SOURCES += \
- src/core/syscall-from-name.h \
- src/core/syscall-to-name.h \
+ src/shared/syscall-from-name.h \
+ src/shared/syscall-to-name.h \
src/shared/errno-from-name.h \
src/shared/errno-to-name.h
-src/core/syscall-list.txt: Makefile
+src/shared/syscall-list.txt: Makefile
$(AM_V_at)$(MKDIR_P) $(dir $@)
$(AM_V_GEN)$(CPP) $(CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) -dM -include sys/syscall.h - < /dev/null | $(AWK) '/^#define[ \t]+__NR_[^ ]+[ \t]+[0-9(]/ { sub(/__NR_/, "", $$2); if ($$2 !~ /SYSCALL_BASE/) print $$2; }' > $@
-src/core/syscall-from-name.gperf: src/core/syscall-list.txt Makefile
+src/shared/syscall-from-name.gperf: src/shared/syscall-list.txt Makefile
$(AM_V_at)$(MKDIR_P) $(dir $@)
$(AM_V_GEN)$(AWK) 'BEGIN{ print "struct syscall_name { const char* name; int id; };"; print "%null-strings"; print "%%";} { printf "%s, __NR_%s\n", $$1, $$1 }' < $< > $@
-src/core/syscall-from-name.h: src/core/syscall-from-name.gperf Makefile
+src/shared/syscall-from-name.h: src/shared/syscall-from-name.gperf Makefile
$(AM_V_at)$(MKDIR_P) $(dir $@)
$(AM_V_GPERF)$(GPERF) -L ANSI-C -t --ignore-case -N lookup_syscall -H hash_syscall_name -p -C < $< > $@
-src/core/syscall-to-name.h: src/core/syscall-list.txt Makefile
+src/shared/syscall-to-name.h: src/shared/syscall-list.txt Makefile
$(AM_V_at)$(MKDIR_P) $(dir $@)
$(AM_V_GEN)$(AWK) 'BEGIN{ print "static const char* const syscall_names[] = { "} { printf "[SYSCALL_TO_INDEX(__NR_%s)] = \"%s\",\n", $$1, $$1 } END{print "};"}' < $< > $@
diff --git a/TODO b/TODO
index 8acc879667..6805fd6d1f 100644
--- a/TODO
+++ b/TODO
@@ -43,8 +43,6 @@ CGroup Rework Completion:
Features:
-* bus: translate all EIO, EINVAL, .. errors into dbus error 1:1 and back.
-
* add API to clone sd_bus_message objects
* sd-bus: synthesized messages should get serial number (uint32_t) -1
diff --git a/src/core/.gitignore b/src/core/.gitignore
index a763f72507..f293bbdc93 100644
--- a/src/core/.gitignore
+++ b/src/core/.gitignore
@@ -1,6 +1,2 @@
-/syscall-from-name.gperf
-/syscall-from-name.h
-/syscall-list.txt
-/syscall-to-name.h
/macros.systemd
/systemd.pc
diff --git a/src/shared/.gitignore b/src/shared/.gitignore
index c9b5f81719..3820d1956b 100644
--- a/src/shared/.gitignore
+++ b/src/shared/.gitignore
@@ -1,3 +1,7 @@
+/syscall-from-name.gperf
+/syscall-from-name.h
+/syscall-list.txt
+/syscall-to-name.h
/errno-from-name.gperf
/errno-from-name.h
/errno-list.txt
diff --git a/src/core/initreq.h b/src/shared/initreq.h
index 859042ce42..710037d84b 100644
--- a/src/core/initreq.h
+++ b/src/shared/initreq.h
@@ -45,14 +45,14 @@
* Linux doesn't use this right now.
*/
struct init_request_bsd {
- char gen_id[8]; /* Beats me.. telnetd uses "fe" */
- char tty_id[16]; /* Tty name minus /dev/tty */
- char host[INITRQ_HLEN]; /* Hostname */
- char term_type[16]; /* Terminal type */
- int signal; /* Signal to send */
- int pid; /* Process to send to */
- char exec_name[128]; /* Program to execute */
- char reserved[128]; /* For future expansion. */
+ char gen_id[8]; /* Beats me.. telnetd uses "fe" */
+ char tty_id[16]; /* Tty name minus /dev/tty */
+ char host[INITRQ_HLEN]; /* Hostname */
+ char term_type[16]; /* Terminal type */
+ int signal; /* Signal to send */
+ int pid; /* Process to send to */
+ char exec_name[128]; /* Program to execute */
+ char reserved[128]; /* For future expansion. */
};
@@ -64,14 +64,14 @@ struct init_request_bsd {
* struct to be 384 bytes.
*/
struct init_request {
- int magic; /* Magic number */
- int cmd; /* What kind of request */
- int runlevel; /* Runlevel to change to */
- int sleeptime; /* Time between TERM and KILL */
- union {
- struct init_request_bsd bsd;
- char data[368];
- } i;
+ int magic; /* Magic number */
+ int cmd; /* What kind of request */
+ int runlevel; /* Runlevel to change to */
+ int sleeptime; /* Time between TERM and KILL */
+ union {
+ struct init_request_bsd bsd;
+ char data[368];
+ } i;
};
#endif
diff --git a/src/core/securebits.h b/src/shared/securebits.h
index ba0bba5353..98fbe0d433 100644
--- a/src/core/securebits.h
+++ b/src/shared/securebits.h
@@ -38,8 +38,8 @@
#define issecure(X) (issecure_mask(X) & current_cred_xxx(securebits))
#define SECURE_ALL_BITS (issecure_mask(SECURE_NOROOT) | \
- issecure_mask(SECURE_NO_SETUID_FIXUP) | \
- issecure_mask(SECURE_KEEP_CAPS))
+ issecure_mask(SECURE_NO_SETUID_FIXUP) | \
+ issecure_mask(SECURE_KEEP_CAPS))
#define SECURE_ALL_LOCKS (SECURE_ALL_BITS << 1)
#endif /* !_LINUX_SECUREBITS_H */
diff --git a/src/core/special.h b/src/shared/special.h
index 6d252e7baa..6d252e7baa 100644
--- a/src/core/special.h
+++ b/src/shared/special.h
diff --git a/src/core/syscall-list.c b/src/shared/syscall-list.c
index dc84dca8fe..dc84dca8fe 100644
--- a/src/core/syscall-list.c
+++ b/src/shared/syscall-list.c
diff --git a/src/core/syscall-list.h b/src/shared/syscall-list.h
index 37efc5681d..37efc5681d 100644
--- a/src/core/syscall-list.h
+++ b/src/shared/syscall-list.h