-/*-*- Mode: C; c-basic-offset: 8 -*-*/
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
#ifndef fooautomounthfoo
#define fooautomounthfoo
AUTOMOUNT_DEAD,
AUTOMOUNT_WAITING,
AUTOMOUNT_RUNNING,
- AUTOMOUNT_MAINTENANCE,
+ AUTOMOUNT_FAILED,
_AUTOMOUNT_STATE_MAX,
_AUTOMOUNT_STATE_INVALID = -1
} AutomountState;
+typedef enum AutomountResult {
+ AUTOMOUNT_SUCCESS,
+ AUTOMOUNT_FAILURE_RESOURCES,
+ _AUTOMOUNT_RESULT_MAX,
+ _AUTOMOUNT_RESULT_INVALID = -1
+} AutomountResult;
+
struct Automount {
- Meta meta;
+ Unit meta;
AutomountState state, deserialized_state;
char *where;
- Mount *mount;
+ UnitRef mount;
int pipe_fd;
+ mode_t directory_mode;
Watch pipe_watch;
dev_t dev_id;
Set *tokens;
- bool failure:1;
+ AutomountResult result;
};
extern const UnitVTable automount_vtable;
const char* automount_state_to_string(AutomountState i);
AutomountState automount_state_from_string(const char *s);
+const char* automount_result_to_string(AutomountResult i);
+AutomountResult automount_result_from_string(const char *s);
+
#endif