chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
logind: enable PowerOff/Reboot calls
[elogind.git]
/
src
/
device.h
diff --git
a/src/device.h
b/src/device.h
index a5c5f745b81f712dfea4e582e7205269c0a54b8c..9a56a5205b1463598d72a7e078487e56eb2e64d8 100644
(file)
--- a/
src/device.h
+++ b/
src/device.h
@@
-1,4
+1,4
@@
-/*-*- Mode: C; c-basic-offset: 8 -*-*/
+/*-*- Mode: C; c-basic-offset: 8
; indent-tabs-mode: nil
-*-*/
#ifndef foodevicehfoo
#define foodevicehfoo
#ifndef foodevicehfoo
#define foodevicehfoo
@@
-30,7
+30,7
@@
typedef struct Device Device;
* simplifies the state engine greatly */
typedef enum DeviceState {
DEVICE_DEAD,
* simplifies the state engine greatly */
typedef enum DeviceState {
DEVICE_DEAD,
- DEVICE_
AVAILABLE
,
+ DEVICE_
PLUGGED
,
_DEVICE_STATE_MAX,
_DEVICE_STATE_INVALID = -1
} DeviceState;
_DEVICE_STATE_MAX,
_DEVICE_STATE_INVALID = -1
} DeviceState;
@@
-38,9
+38,15
@@
typedef enum DeviceState {
struct Device {
Meta meta;
struct Device {
Meta meta;
- DeviceState state;
-
char *sysfs;
char *sysfs;
+
+ /* In order to be able to distinguish dependencies on
+ different device nodes we might end up creating multiple
+ devices for the same sysfs path. We chain them up here. */
+
+ LIST_FIELDS(struct Device, same_sysfs);
+
+ DeviceState state;
};
extern const UnitVTable device_vtable;
};
extern const UnitVTable device_vtable;