2010-01-23 07:52:57 +07:00
|
|
|
/*-*- Mode: C; c-basic-offset: 8 -*-*/
|
|
|
|
|
|
|
|
#ifndef fooautomounthfoo
|
|
|
|
#define fooautomounthfoo
|
|
|
|
|
2010-02-03 19:03:47 +07:00
|
|
|
/***
|
|
|
|
This file is part of systemd.
|
|
|
|
|
|
|
|
Copyright 2010 Lennart Poettering
|
|
|
|
|
|
|
|
systemd is free software; you can redistribute it and/or modify it
|
|
|
|
under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation; either version 2 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
systemd is distributed in the hope that it will be useful, but
|
|
|
|
WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with systemd; If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
***/
|
|
|
|
|
2010-01-23 07:52:57 +07:00
|
|
|
typedef struct Automount Automount;
|
|
|
|
|
2010-01-27 03:39:06 +07:00
|
|
|
#include "unit.h"
|
2010-01-23 07:52:57 +07:00
|
|
|
|
|
|
|
typedef enum AutomountState {
|
|
|
|
AUTOMOUNT_DEAD,
|
|
|
|
AUTOMOUNT_WAITING,
|
|
|
|
AUTOMOUNT_RUNNING,
|
|
|
|
AUTOMOUNT_MAINTAINANCE,
|
2010-04-10 22:53:17 +07:00
|
|
|
_AUTOMOUNT_STATE_MAX,
|
|
|
|
_AUTOMOUNT_STATE_INVALID = -1
|
2010-01-23 07:52:57 +07:00
|
|
|
} AutomountState;
|
|
|
|
|
|
|
|
struct Automount {
|
|
|
|
Meta meta;
|
|
|
|
|
2010-04-21 08:27:44 +07:00
|
|
|
AutomountState state, deserialized_state;
|
2010-01-23 07:52:57 +07:00
|
|
|
|
2010-04-17 04:24:39 +07:00
|
|
|
char *where;
|
|
|
|
|
2010-01-23 07:52:57 +07:00
|
|
|
Mount *mount;
|
2010-04-17 04:24:39 +07:00
|
|
|
|
|
|
|
int pipe_fd;
|
|
|
|
Watch pipe_watch;
|
|
|
|
dev_t dev_id;
|
|
|
|
|
|
|
|
Set *tokens;
|
|
|
|
|
|
|
|
bool failure:1;
|
2010-01-23 07:52:57 +07:00
|
|
|
};
|
|
|
|
|
2010-01-27 03:39:06 +07:00
|
|
|
extern const UnitVTable automount_vtable;
|
2010-01-23 07:52:57 +07:00
|
|
|
|
2010-04-17 04:24:39 +07:00
|
|
|
int automount_send_ready(Automount *a, int status);
|
|
|
|
|
2010-05-13 08:07:16 +07:00
|
|
|
int automount_add_one_mount_link(Automount *a, Mount *m);
|
|
|
|
|
2010-04-21 08:27:44 +07:00
|
|
|
const char* automount_state_to_string(AutomountState i);
|
|
|
|
AutomountState automount_state_from_string(const char *s);
|
|
|
|
|
2010-01-23 07:52:57 +07:00
|
|
|
#endif
|