diff options
author | Lennart Poettering <lennart@poettering.net> | 2010-01-23 01:52:57 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2010-01-23 01:52:57 +0100 |
commit | 5cb5a6ffc33667c93e9bc3572534dcaa684046e3 (patch) | |
tree | 51e8b6260d56027c4d610ff6db5882737101a809 /automount.h | |
parent | cd2dbd7df9f1b8c46386b2898523aec3dd4578fd (diff) |
first attempt in implementinging execution logic
Diffstat (limited to 'automount.h')
-rw-r--r-- | automount.h | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/automount.h b/automount.h new file mode 100644 index 0000000000..b6dfd5bb06 --- /dev/null +++ b/automount.h @@ -0,0 +1,46 @@ +/*-*- Mode: C; c-basic-offset: 8 -*-*/ + +#ifndef fooautomounthfoo +#define fooautomounthfoo + +typedef struct Automount Automount; + +#include "name.h" + +typedef enum AutomountState { + AUTOMOUNT_DEAD, + AUTOMOUNT_START_PRE, + AUTOMOUNT_START_POST, + AUTOMOUNT_WAITING, + AUTOMOUNT_RUNNING, + AUTOMOUNT_STOP_PRE, + AUTOMOUNT_STOP_POST, + AUTOMOUNT_MAINTAINANCE, + _AUTOMOUNT_STATE_MAX +} AutomountState; + +typedef enum AutomountExecCommand { + AUTOMOUNT_EXEC_START_PRE, + AUTOMOUNT_EXEC_START_POST, + AUTOMOUNT_EXEC_STOP_PRE, + AUTOMOUNT_EXEC_STOP_POST, + _AUTOMOUNT_EXEC_MAX +} AutomountExecCommand; + +struct Automount { + Meta meta; + + AutomountState state; + char *path; + + ExecCommand* exec_command[_AUTOMOUNT_EXEC_MAX]; + ExecContext exec_context; + + pid_t contol_pid; + + Mount *mount; +}; + +extern const NameVTable automount_vtable; + +#endif |