[systemd-commits] 2 commits - fixme src/dbus-execute.h src/job.c src/job.h src/mount.c src/mount.h src/unit.c src/unit.h src/util.c src/util.h
Lennart Poettering
lennart at kemper.freedesktop.org
Wed Aug 11 14:19:35 PDT 2010
fixme | 12 +++++-------
src/dbus-execute.h | 2 +-
src/job.c | 24 ------------------------
src/job.h | 1 -
src/mount.c | 51 ---------------------------------------------------
src/mount.h | 2 --
src/unit.c | 24 ------------------------
src/unit.h | 4 ----
src/util.c | 12 ------------
src/util.h | 1 -
10 files changed, 6 insertions(+), 127 deletions(-)
New commits:
commit 444a79d34034aa8bfe60b92b0bb9e970803cbfb7
Author: Lennart Poettering <lennart at poettering.net>
Date: Wed Aug 11 23:19:28 2010 +0200
dbus: properly pass capabilities
diff --git a/fixme b/fixme
index 02e80e8..32bd40f 100644
--- a/fixme
+++ b/fixme
@@ -53,24 +53,18 @@
* follow property change dbus spec
-* selinux policy loading/socket stuff
+* selinux policy loading
* systemctl status $PID, systemctl stop $PID!
* place /etc/inittab with explaining blurb.
-* vielleicht implizit immer auf syslog dependen?
-
-* debian deadlock when partition set to noauto
-
* fingerprint.target, wireless.target, gps.target
* set_put(), hashmap_put() return values checken. i.e. == 0 macht kein free()!
* fix merging in .swap units
-* pahole
-
* chkconfig/systemd-install glue
* io priority during initialization
@@ -129,3 +123,7 @@ Regularly:
* Use PR_SET_PROCTITLE_AREA if it becomes available in the kernel
* %m in printf() instead of strerror();
+
+* pahole
+
+* CFLAGS="-Wl,--gc-sections -Wl,--print-gc-sections -ffunction-sections -fdata-sections"
diff --git a/src/dbus-execute.h b/src/dbus-execute.h
index 6cd88d4..a00acbe 100644
--- a/src/dbus-execute.h
+++ b/src/dbus-execute.h
@@ -127,7 +127,7 @@
{ interface, "SyslogPriority", bus_property_append_int, "i", &(context).syslog_priority }, \
{ interface, "SyslogIdentifier", bus_property_append_string, "s", (context).syslog_identifier }, \
{ interface, "SyslogLevelPrefix", bus_property_append_bool, "b", &(context).syslog_level_prefix }, \
- { interface, "Capabilities", bus_property_append_string, "s", (context).capabilities }, \
+ { interface, "Capabilities", bus_execute_append_capabilities, "s", (context).capabilities }, \
{ interface, "SecureBits", bus_property_append_int, "i", &(context).secure_bits }, \
{ interface, "CapabilityBoundingSetDrop", bus_property_append_uint64, "t", &(context).capability_bounding_set_drop }, \
{ interface, "User", bus_property_append_string, "s", (context).user }, \
commit 1e59887dc92e163163051e627817e1675374cd22
Author: Lennart Poettering <lennart at poettering.net>
Date: Wed Aug 11 23:19:04 2010 +0200
gc: remove a lot of unused code
diff --git a/src/job.c b/src/job.c
index c3b529e..d708215 100644
--- a/src/job.c
+++ b/src/job.c
@@ -134,30 +134,6 @@ void job_dependency_free(JobDependency *l) {
free(l);
}
-void job_dependency_delete(Job *subject, Job *object, bool *matters) {
- JobDependency *l;
-
- assert(object);
-
- LIST_FOREACH(object, l, object->object_list) {
- assert(l->object == object);
-
- if (l->subject == subject)
- break;
- }
-
- if (!l) {
- if (matters)
- *matters = false;
- return;
- }
-
- if (matters)
- *matters = l->matters;
-
- job_dependency_free(l);
-}
-
void job_dump(Job *j, FILE*f, const char *prefix) {
assert(j);
assert(f);
diff --git a/src/job.h b/src/job.h
index a69c4aa..ce2bb06 100644
--- a/src/job.h
+++ b/src/job.h
@@ -124,7 +124,6 @@ void job_dump(Job *j, FILE*f, const char *prefix);
JobDependency* job_dependency_new(Job *subject, Job *object, bool matters, bool conflicts);
void job_dependency_free(JobDependency *l);
-void job_dependency_delete(Job *subject, Job *object, bool *matters);
bool job_is_anchor(Job *j);
diff --git a/src/mount.c b/src/mount.c
index 9a201f3..38547f7 100644
--- a/src/mount.c
+++ b/src/mount.c
@@ -1487,57 +1487,6 @@ void mount_fd_event(Manager *m, int events) {
}
}
-int mount_path_is_mounted(Manager *m, const char* path) {
- char *t;
- int r;
-
- assert(m);
- assert(path);
-
- if (path[0] != '/')
- return 1;
-
- if (!(t = strdup(path)))
- return -ENOMEM;
-
- path_kill_slashes(t);
-
- for (;;) {
- char *e, *slash;
- Unit *u;
-
- if (!(e = unit_name_from_path(t, ".mount"))) {
- r = -ENOMEM;
- goto finish;
- }
-
- u = manager_get_unit(m, e);
- free(e);
-
- if (u &&
- (MOUNT(u)->from_etc_fstab || MOUNT(u)->from_fragment) &&
- MOUNT(u)->state != MOUNT_MOUNTED) {
- r = 0;
- goto finish;
- }
-
- assert_se(slash = strrchr(t, '/'));
-
- if (slash == t) {
- r = 1;
- goto finish;
- }
-
- *slash = 0;
- }
-
- r = 1;
-
-finish:
- free(t);
- return r;
-}
-
static void mount_reset_maintenance(Unit *u) {
Mount *m = MOUNT(u);
diff --git a/src/mount.h b/src/mount.h
index 56a7b12..226a1e2 100644
--- a/src/mount.h
+++ b/src/mount.h
@@ -99,8 +99,6 @@ extern const UnitVTable mount_vtable;
void mount_fd_event(Manager *m, int events);
-int mount_path_is_mounted(Manager *m, const char* path);
-
const char* mount_state_to_string(MountState i);
MountState mount_state_from_string(const char *s);
diff --git a/src/unit.c b/src/unit.c
index 3c2e974..59776c3 100644
--- a/src/unit.c
+++ b/src/unit.c
@@ -722,16 +722,6 @@ int unit_load_fragment_and_dropin_optional(Unit *u) {
return 0;
}
-/* Common implementation for multiple backends */
-int unit_load_nop(Unit *u) {
- assert(u);
-
- if (u->meta.load_state == UNIT_STUB)
- u->meta.load_state = UNIT_LOADED;
-
- return 0;
-}
-
int unit_load(Unit *u) {
int r;
@@ -2124,20 +2114,6 @@ Unit *unit_following(Unit *u) {
return NULL;
}
-static const char* const unit_type_table[_UNIT_TYPE_MAX] = {
- [UNIT_SERVICE] = "service",
- [UNIT_TIMER] = "timer",
- [UNIT_SOCKET] = "socket",
- [UNIT_TARGET] = "target",
- [UNIT_DEVICE] = "device",
- [UNIT_MOUNT] = "mount",
- [UNIT_AUTOMOUNT] = "automount",
- [UNIT_SNAPSHOT] = "snapshot",
- [UNIT_SWAP] = "swap"
-};
-
-DEFINE_STRING_TABLE_LOOKUP(unit_type, UnitType);
-
static const char* const unit_load_state_table[_UNIT_LOAD_STATE_MAX] = {
[UNIT_STUB] = "stub",
[UNIT_LOADED] = "loaded",
diff --git a/src/unit.h b/src/unit.h
index e3ca8bb..a99d33e 100644
--- a/src/unit.h
+++ b/src/unit.h
@@ -420,7 +420,6 @@ Unit *unit_follow_merge(Unit *u);
int unit_load_fragment_and_dropin(Unit *u);
int unit_load_fragment_and_dropin_optional(Unit *u);
-int unit_load_nop(Unit *u);
int unit_load(Unit *unit);
const char *unit_description(Unit *u);
@@ -485,9 +484,6 @@ void unit_reset_maintenance(Unit *u);
Unit *unit_following(Unit *u);
-const char *unit_type_to_string(UnitType i);
-UnitType unit_type_from_string(const char *s);
-
const char *unit_load_state_to_string(UnitLoadState i);
UnitLoadState unit_load_state_from_string(const char *s);
diff --git a/src/util.c b/src/util.c
index 4e371d1..c4ff5aa 100644
--- a/src/util.c
+++ b/src/util.c
@@ -2492,18 +2492,6 @@ char* gethostname_malloc(void) {
return strdup(u.sysname);
}
-int getmachineid_malloc(char **b) {
- int r;
-
- assert(b);
-
- if ((r = read_one_line_file("/var/lib/dbus/machine-id", b)) < 0)
- return r;
-
- strstrip(*b);
- return 0;
-}
-
char* getlogname_malloc(void) {
uid_t uid;
long bufsize;
diff --git a/src/util.h b/src/util.h
index b2a2925..21f47dc 100644
--- a/src/util.h
+++ b/src/util.h
@@ -319,7 +319,6 @@ void sigset_add_many(sigset_t *ss, ...);
char* gethostname_malloc(void);
char* getlogname_malloc(void);
int getttyname_malloc(char **r);
-int getmachineid_malloc(char **r);
int chmod_and_chown(const char *path, mode_t mode, uid_t uid, gid_t gid);
More information about the systemd-commits
mailing list