4349cd7c1d153c4ffa23cf1cff1644e0afa9bcf0Lennart Poettering#pragma once
4349cd7c1d153c4ffa23cf1cff1644e0afa9bcf0Lennart Poettering
4349cd7c1d153c4ffa23cf1cff1644e0afa9bcf0Lennart Poettering/***
4349cd7c1d153c4ffa23cf1cff1644e0afa9bcf0Lennart Poettering This file is part of systemd.
4349cd7c1d153c4ffa23cf1cff1644e0afa9bcf0Lennart Poettering
4349cd7c1d153c4ffa23cf1cff1644e0afa9bcf0Lennart Poettering Copyright 2010 Lennart Poettering
4349cd7c1d153c4ffa23cf1cff1644e0afa9bcf0Lennart Poettering
4349cd7c1d153c4ffa23cf1cff1644e0afa9bcf0Lennart Poettering systemd is free software; you can redistribute it and/or modify it
4349cd7c1d153c4ffa23cf1cff1644e0afa9bcf0Lennart Poettering under the terms of the GNU Lesser General Public License as published by
4349cd7c1d153c4ffa23cf1cff1644e0afa9bcf0Lennart Poettering the Free Software Foundation; either version 2.1 of the License, or
4349cd7c1d153c4ffa23cf1cff1644e0afa9bcf0Lennart Poettering (at your option) any later version.
4349cd7c1d153c4ffa23cf1cff1644e0afa9bcf0Lennart Poettering
4349cd7c1d153c4ffa23cf1cff1644e0afa9bcf0Lennart Poettering systemd is distributed in the hope that it will be useful, but
4349cd7c1d153c4ffa23cf1cff1644e0afa9bcf0Lennart Poettering WITHOUT ANY WARRANTY; without even the implied warranty of
4349cd7c1d153c4ffa23cf1cff1644e0afa9bcf0Lennart Poettering MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
4349cd7c1d153c4ffa23cf1cff1644e0afa9bcf0Lennart Poettering Lesser General Public License for more details.
4349cd7c1d153c4ffa23cf1cff1644e0afa9bcf0Lennart Poettering
4349cd7c1d153c4ffa23cf1cff1644e0afa9bcf0Lennart Poettering You should have received a copy of the GNU Lesser General Public License
4349cd7c1d153c4ffa23cf1cff1644e0afa9bcf0Lennart Poettering along with systemd; If not, see <http://www.gnu.org/licenses/>.
4349cd7c1d153c4ffa23cf1cff1644e0afa9bcf0Lennart Poettering***/
4349cd7c1d153c4ffa23cf1cff1644e0afa9bcf0Lennart Poettering
4e036b7a96b7a72461bdb68ded304041e892b8ebLennart Poettering#include <fcntl.h>
4349cd7c1d153c4ffa23cf1cff1644e0afa9bcf0Lennart Poettering#include <mntent.h>
4e036b7a96b7a72461bdb68ded304041e892b8ebLennart Poettering#include <stdbool.h>
11c3a36649e5e5e77db499c92f3cdcbd619efd3aThomas Hindoe Paaboel Andersen#include <stdio.h>
4e036b7a96b7a72461bdb68ded304041e892b8ebLennart Poettering#include <sys/stat.h>
4e036b7a96b7a72461bdb68ded304041e892b8ebLennart Poettering#include <sys/types.h>
4e036b7a96b7a72461bdb68ded304041e892b8ebLennart Poettering
11c3a36649e5e5e77db499c92f3cdcbd619efd3aThomas Hindoe Paaboel Andersen#include "macro.h"
93cc7779e0c121b75183920173f37cd1ee9d59cfThomas Hindoe Paaboel Andersen#include "missing.h"
4349cd7c1d153c4ffa23cf1cff1644e0afa9bcf0Lennart Poettering
4349cd7c1d153c4ffa23cf1cff1644e0afa9bcf0Lennart Poetteringint fd_is_mount_point(int fd, const char *filename, int flags);
4349cd7c1d153c4ffa23cf1cff1644e0afa9bcf0Lennart Poetteringint path_is_mount_point(const char *path, int flags);
4349cd7c1d153c4ffa23cf1cff1644e0afa9bcf0Lennart Poettering
3f2c0becc3dcb1acb9d2a1816dcfe4e3de8877d4Lennart Poetteringint repeat_unmount(const char *path, int flags);
3f2c0becc3dcb1acb9d2a1816dcfe4e3de8877d4Lennart Poettering
4349cd7c1d153c4ffa23cf1cff1644e0afa9bcf0Lennart Poetteringint umount_recursive(const char *target, int flags);
4349cd7c1d153c4ffa23cf1cff1644e0afa9bcf0Lennart Poetteringint bind_remount_recursive(const char *prefix, bool ro);
4349cd7c1d153c4ffa23cf1cff1644e0afa9bcf0Lennart Poettering
4349cd7c1d153c4ffa23cf1cff1644e0afa9bcf0Lennart Poetteringint mount_move_root(const char *path);
4349cd7c1d153c4ffa23cf1cff1644e0afa9bcf0Lennart Poettering
4349cd7c1d153c4ffa23cf1cff1644e0afa9bcf0Lennart PoetteringDEFINE_TRIVIAL_CLEANUP_FUNC(FILE*, endmntent);
4349cd7c1d153c4ffa23cf1cff1644e0afa9bcf0Lennart Poettering#define _cleanup_endmntent_ _cleanup_(endmntentp)
4e036b7a96b7a72461bdb68ded304041e892b8ebLennart Poettering
4e036b7a96b7a72461bdb68ded304041e892b8ebLennart Poetteringbool fstype_is_network(const char *fstype);
4e036b7a96b7a72461bdb68ded304041e892b8ebLennart Poettering
4e036b7a96b7a72461bdb68ded304041e892b8ebLennart Poetteringunion file_handle_union {
4e036b7a96b7a72461bdb68ded304041e892b8ebLennart Poettering struct file_handle handle;
4e036b7a96b7a72461bdb68ded304041e892b8ebLennart Poettering char padding[sizeof(struct file_handle) + MAX_HANDLE_SZ];
4e036b7a96b7a72461bdb68ded304041e892b8ebLennart Poettering};
4e036b7a96b7a72461bdb68ded304041e892b8ebLennart Poettering
4e036b7a96b7a72461bdb68ded304041e892b8ebLennart Poettering#define FILE_HANDLE_INIT { .handle.handle_bytes = MAX_HANDLE_SZ }