chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
build-sys: support setting path and service names from configure
[elogind.git]
/
device.h
diff --git
a/device.h
b/device.h
index 30b8915c16f16f22cfbf7c02bd7402d30d563d21..a5c5f745b81f712dfea4e582e7205269c0a54b8c 100644
(file)
--- a/
device.h
+++ b/
device.h
@@
-31,7
+31,8
@@
typedef struct Device Device;
typedef enum DeviceState {
DEVICE_DEAD,
DEVICE_AVAILABLE,
typedef enum DeviceState {
DEVICE_DEAD,
DEVICE_AVAILABLE,
- _DEVICE_STATE_MAX
+ _DEVICE_STATE_MAX,
+ _DEVICE_STATE_INVALID = -1
} DeviceState;
struct Device {
} DeviceState;
struct Device {
@@
-39,7
+40,6
@@
struct Device {
DeviceState state;
DeviceState state;
- /* A single device can be created by multiple sysfs objects */
char *sysfs;
};
char *sysfs;
};
@@
-47,4
+47,7
@@
extern const UnitVTable device_vtable;
void device_fd_event(Manager *m, int events);
void device_fd_event(Manager *m, int events);
+const char* device_state_to_string(DeviceState i);
+DeviceState device_state_from_string(const char *s);
+
#endif
#endif