summaryrefslogtreecommitdiff
path: root/src/init/fs/misc.h
blob: e360a2519aa6e30e7c41aba722bb6cac2c94a885 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#pragma once
#include <stdbool.h>

bool fork2_n_mount(const char *path);

void fs_passthru(const char *prefix);

void fs_dir_inject(const char *path);

/** Mounts something and injects its path into the fs */
// TODO path needs to have a trailing slash
#define MOUNT(path, impl) \
	if (!fork2_n_mount(path)) {impl;} \
	if (!fork2_n_mount("/"))  fs_dir_inject(path);