*
*
* This is X-mount.idmap= implementation.
+ *
+ * Please, see the comment in libmount/src/hooks.c to understand how hooks work.
*/
#include <stdbool.h>
#include <sys/socket.h>
* under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1 of the License, or
* (at your option) any later version.
+ *
+ * Please, see the comment in libmount/src/hooks.c to understand how hooks work.
*/
-
-/*
- * DOCS: - "lo@" prefix for fstype is unsupported
- */
-
#include <blkid.h>
#include <stdbool.h>
* under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1 of the License, or
* (at your option) any later version.
+ *
+ *
+ * Please, see the comment in libmount/src/hooks.c to understand how hooks work.
*/
-
#include "mountP.h"
#include "fileutils.h"
* under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1 of the License, or
* (at your option) any later version.
+ *
+ *
+ * This is classic mount(2) based mount.
+ *
+ * Please, see the comment in libmount/src/hooks.c to understand how hooks work.
*/
#include "mountP.h"
*
*
* This is X-mount.owner=, X-mount.group= and X-mount.mode= implementation.
+ *
+ * Please, see the comment in libmount/src/hooks.c to understand how hooks work.
*/
-
#include <sched.h>
#include "mountP.h"
*
* This is X-mount.subdir= implementation. The code uses global hookset data
* rather than per-callback (hook) data.
+ *
+ * Please, see the comment in libmount/src/hooks.c to understand how hooks work.
*/
-
#include <sched.h>
#include "mountP.h"
* under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1 of the License, or
* (at your option) any later version.
+ *
+ *
+ * Please, see comment in libmount/src/hooks.c to understand how hooks work.
*/
-
#include "mountP.h"
#ifdef HAVE_CRYPTSETUP
* (at your option) any later version.
*
*
- * The "hookset" is set of callbacks (hooks) that implement some functionality.
- * It supports two kinds of data:
+ * The "hookset" is a set of callbacks (hooks) that implement some functionality.
+ * The library defines stages where hooks are called (e.g. when preparing source, post
+ * mount(2), etc.). An arbitrary hook can, on the fly, define another hook for the
+ * arbitrary stage. The first hook from the hookset which goes to the game is a
+ * "firstcall" (defined in struct libmnt_hookset). This first hook controls
+ * what will happen in the next stages (usually nothing).
*
- * - global data : accessible for all callbacks, independent on defined hooks
+ * The library supports two kinds of data for hooksets:
*
- * - per-hook data : usually used by the callback function
+ * - global data; accessible for all callbacks. Makes sense for complex
+ * hooksets with more callbacks in more stages. Usually implemented by
+ * locally defined 'struct hookset_data' in hook_*.c.
+ *
+ * - per-hook data; acessible for specific callback
+ * Usually implemented by locally defined 'struct hook_data' in hook_*.c.
*/
-
#include "mountP.h"
#include "mount-api-utils.h"
#endif
};
-/* hooksets data */
+/* hooksets data (this is global list of hookset data) */
struct hookset_data {
const struct libmnt_hookset *hookset;
void *data;