]> err.no Git - systemd/commitdiff
device: rename 'available' state to 'plugged'
authorLennart Poettering <lennart@poettering.net>
Fri, 16 Jul 2010 19:32:34 +0000 (21:32 +0200)
committerLennart Poettering <lennart@poettering.net>
Fri, 16 Jul 2010 19:32:34 +0000 (21:32 +0200)
src/device.c
src/device.h

index aeafd5e9f377af7fcb5f440339a4917cdbfb9eaf..dc626d8189777f035c31212f1f68237de19d755d 100644 (file)
@@ -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);
index a5c5f745b81f712dfea4e582e7205269c0a54b8c..654499cfd7f0b528fdcdc9c1ac3c156ea72842ca 100644 (file)
@@ -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;