2007-07-31 15:23:23 +00:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2007 Martin Willi
|
|
|
|
* Hochschule fuer Technik Rapperswil
|
|
|
|
*
|
|
|
|
* This program 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. See <http://www.fsf.org/copyleft/gpl.txt>.
|
|
|
|
*
|
|
|
|
* This program 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.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef COWFS_H
|
|
|
|
#define COWFS_H
|
|
|
|
|
2007-08-09 07:14:56 +00:00
|
|
|
#include <library.h>
|
2007-07-31 15:23:23 +00:00
|
|
|
|
|
|
|
typedef struct cowfs_t cowfs_t;
|
|
|
|
|
|
|
|
/**
|
2009-05-11 15:24:51 +00:00
|
|
|
* cowfs - Copy on write FUSE filesystem.
|
2007-07-31 15:23:23 +00:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
struct cowfs_t {
|
2009-09-04 11:46:09 +00:00
|
|
|
|
2007-07-31 15:23:23 +00:00
|
|
|
/**
|
2009-05-11 15:24:51 +00:00
|
|
|
* Set an additional copy on write overlay.
|
2007-07-31 15:23:23 +00:00
|
|
|
*
|
|
|
|
* @param path path of the overlay
|
2007-08-09 07:14:56 +00:00
|
|
|
* @return FALSE if failed
|
2007-07-31 15:23:23 +00:00
|
|
|
*/
|
2007-09-13 08:10:36 +00:00
|
|
|
bool (*set_overlay)(cowfs_t *this, char *path);
|
2009-09-04 11:46:09 +00:00
|
|
|
|
2007-07-31 15:23:23 +00:00
|
|
|
/**
|
2009-05-11 15:24:51 +00:00
|
|
|
* Stop, umount and destroy a cowfs FUSE filesystem.
|
2007-07-31 15:23:23 +00:00
|
|
|
*/
|
|
|
|
void (*destroy) (cowfs_t *this);
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
2009-05-11 15:24:51 +00:00
|
|
|
* Mount a cowfs FUSE filesystem.
|
2007-07-31 15:23:23 +00:00
|
|
|
*
|
|
|
|
* @param master read only master file system directory
|
|
|
|
* @param host copy on write host directory
|
|
|
|
* @param mount mountpoint where union is mounted
|
|
|
|
* @return instance, or NULL if FUSE initalization failed
|
|
|
|
*/
|
|
|
|
cowfs_t *cowfs_create(char *master, char *host, char *mount);
|
|
|
|
|
|
|
|
#endif /* COWFS_H */
|
|
|
|
|