[systemd-commits] 3 commits - fixme src/99-systemd.rules src/device.c src/device.h src/systemctl.c units/smartcard.target
Lennart Poettering
lennart at kemper.freedesktop.org
Fri Jul 16 12:32:42 PDT 2010
fixme | 6 ++----
src/99-systemd.rules | 1 +
src/device.c | 8 ++++----
src/device.h | 2 +-
src/systemctl.c | 9 +++++++--
units/smartcard.target | 12 ++++++++++++
6 files changed, 27 insertions(+), 11 deletions(-)
New commits:
commit 73608ed994efef7f00eac0b0275ab0f7bc218af5
Author: Lennart Poettering <lennart at poettering.net>
Date: Fri Jul 16 21:32:34 2010 +0200
device: rename 'available' state to 'plugged'
diff --git a/src/device.c b/src/device.c
index aeafd5e..dc626d8 100644
--- a/src/device.c
+++ b/src/device.c
@@ -32,7 +32,7 @@
static const UnitActiveState state_translation_table[_DEVICE_STATE_MAX] = {
[DEVICE_DEAD] = UNIT_INACTIVE,
- [DEVICE_AVAILABLE] = UNIT_ACTIVE
+ [DEVICE_PLUGGED] = UNIT_ACTIVE
};
static void device_done(Unit *u) {
@@ -67,7 +67,7 @@ static int device_coldplug(Unit *u) {
assert(d->state == DEVICE_DEAD);
if (d->sysfs)
- device_set_state(d, DEVICE_AVAILABLE);
+ device_set_state(d, DEVICE_PLUGGED);
return 0;
}
@@ -262,7 +262,7 @@ static int device_process_new_device(Manager *m, struct udev_device *dev, bool u
if (update_state) {
manager_dispatch_load_queue(u->meta.manager);
- device_set_state(DEVICE(u), DEVICE_AVAILABLE);
+ device_set_state(DEVICE(u), DEVICE_PLUGGED);
}
unit_add_to_dbus_queue(u);
@@ -443,7 +443,7 @@ fail:
static const char* const device_state_table[_DEVICE_STATE_MAX] = {
[DEVICE_DEAD] = "dead",
- [DEVICE_AVAILABLE] = "available"
+ [DEVICE_PLUGGED] = "plugged"
};
DEFINE_STRING_TABLE_LOOKUP(device_state, DeviceState);
diff --git a/src/device.h b/src/device.h
index a5c5f74..654499c 100644
--- a/src/device.h
+++ b/src/device.h
@@ -30,7 +30,7 @@ typedef struct Device Device;
* simplifies the state engine greatly */
typedef enum DeviceState {
DEVICE_DEAD,
- DEVICE_AVAILABLE,
+ DEVICE_PLUGGED,
_DEVICE_STATE_MAX,
_DEVICE_STATE_INVALID = -1
} DeviceState;
commit 2d3b2c0032268a32557cb03a98175b828620a706
Author: Lennart Poettering <lennart at poettering.net>
Date: Fri Jul 16 21:32:11 2010 +0200
units: introduce smartcard.target
diff --git a/src/99-systemd.rules b/src/99-systemd.rules
index 6d4379e..95a91ec 100644
--- a/src/99-systemd.rules
+++ b/src/99-systemd.rules
@@ -32,5 +32,6 @@ SUBSYSTEM=="bluetooth", TAG="systemd", ENV{SYSTEMD_ALIAS}="/sys/subsystem/blueto
SUBSYSTEM=="bluetooth", TAG="systemd", ENV{SYSTEMD_WANTS}="bluetooth.target"
SUBSYSTEM=="printer", TAG="systemd", ENV{SYSTEMD_WANTS}="printer.target"
+ENV{ID_SMARTCARD_READER}=="*?", TAG="systemd", ENV{SYSTEMD_WANTS}="smartcard.target"
LABEL="systemd_end"
diff --git a/units/smartcard.target b/units/smartcard.target
new file mode 100644
index 0000000..28dd2bb
--- /dev/null
+++ b/units/smartcard.target
@@ -0,0 +1,12 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# See systemd.special(7) for details
+
+[Unit]
+Description=Smart Card
+StopWhenUnneeded=yes
commit 0ff3dea70038ca4501ab38ad38ecd67d8eea1e00
Author: Lennart Poettering <lennart at poettering.net>
Date: Fri Jul 16 21:31:34 2010 +0200
systemctl: always show units with active jobs in list-units output
diff --git a/fixme b/fixme
index b4f82a3..c6978fb 100644
--- a/fixme
+++ b/fixme
@@ -35,8 +35,6 @@
* systemctl status $PID, systemctl stop $PID!
-* systemctl list-units doesn't show units with actvie jobs?
-
* timeout waiting for mount devices?
* default logic for serial getty, ck logging, ssh readahead
@@ -61,14 +59,14 @@
* vielleicht implizit immer auf syslog dependen?
-* für selinux muss der socket wissen was für service geexeced wird.
-
* debian deadlock when partition auf noauto is.
* maintenance units müssen vergessen werden
* maintenance muss dokumentiert werden
+* fingerprint.target, smartcard.target, wireless.target, gps.target
+
External:
* patch /etc/init.d/functions with:
diff --git a/src/systemctl.c b/src/systemctl.c
index 6388d23..1ded936 100644
--- a/src/systemctl.c
+++ b/src/systemctl.c
@@ -218,7 +218,7 @@ static int list_units(DBusConnection *bus, char **args, unsigned n) {
if ((!arg_type || ((dot = strrchr(id, '.')) &&
streq(dot+1, arg_type))) &&
- (arg_all || !streq(active_state, "inactive"))) {
+ (arg_all || !streq(active_state, "inactive") || job_id > 0)) {
int a = 0, b = 0;
@@ -228,7 +228,7 @@ static int list_units(DBusConnection *bus, char **args, unsigned n) {
printf("%-45s %-6s %-12s %-12s%n", id, load_state, active_state, sub_state, &a);
if (job_id != 0)
- printf(" %-15s%n", job_type, &b);
+ printf(" => %-12s%n", job_type, &b);
else
b = 1 + 15;
@@ -249,6 +249,11 @@ static int list_units(DBusConnection *bus, char **args, unsigned n) {
dbus_message_iter_next(&sub);
}
+ printf("\nLOAD = Load State, reflects whether the unit configuration was properly loaded.\n"
+ "ACTIVE = Active State, the high-level unit activation state, i.e. generalization of the substate.\n"
+ "SUB = Substate, the low-level unit activation state, possible values depend on unit type.\n"
+ "JOB = Job, shows scheduled jobs for the unit.\n");
+
if (arg_all)
printf("\n%u units listed.\n", k);
else
More information about the systemd-commits
mailing list