]> git.ipfire.org Git - people/ms/systemd.git/blame - device.h
monitor udev for device changes
[people/ms/systemd.git] / device.h
CommitLineData
5cb5a6ff
LP
1/*-*- Mode: C; c-basic-offset: 8 -*-*/
2
3#ifndef foodevicehfoo
4#define foodevicehfoo
5
6typedef struct Device Device;
7
87f0e418 8#include "unit.h"
5cb5a6ff
LP
9
10/* We simply watch devices, we cannot plug/unplug them. That
11 * simplifies the state engine greatly */
12typedef enum DeviceState {
13 DEVICE_DEAD,
14 DEVICE_AVAILABLE,
15 _DEVICE_STATE_MAX
16} DeviceState;
17
18struct Device {
19 Meta meta;
20
21 DeviceState state;
22
23 /* A single device can be created by multiple sysfs objects */
25ac040b 24 char *sysfs;
5cb5a6ff
LP
25};
26
87f0e418 27extern const UnitVTable device_vtable;
5cb5a6ff 28
f94ea366
LP
29void device_fd_event(Manager *m, int events);
30
5cb5a6ff 31#endif