pakfire_jail_close_pipe(jail, ctx.pipes.log_ERROR);
pakfire_jail_close_pipe(jail, ctx.pipes.log_DEBUG);
-#if 0
- // Umount everything
- if (!pakfire_on_root(jail->pakfire))
- pakfire_umount_all(jail->pakfire);
-#endif
-
return exit;
}
return r;
}
-static int pakfire_umount(struct pakfire* pakfire, const char* path, int flags) {
- int r;
-
- DEBUG(pakfire, "Umounting %s\n", path);
-
-RETRY:
- // Perform umount
- r = umount2(path, flags);
- if (r) {
- // Attempt a lazy umount when busy
- if (errno == EBUSY) {
- flags |= MNT_DETACH;
- goto RETRY;
- }
-
- ERROR(pakfire, "Could not umount %s: %m\n", path);
- }
-
- return r;
-}
-
static int __pakfire_mount_print(struct pakfire* pakfire,
struct libmnt_fs* fs, const void* data) {
DEBUG(pakfire,
return 0;
}
-static int __pakfire_umount(struct pakfire* pakfire,
- struct libmnt_fs* fs, const void* data) {
- const char* target = mnt_fs_get_target(fs);
- if (!target)
- return 1;
-
- return pakfire_umount(pakfire, target, 0);
-}
-
-/*
- umounts everything that hasn't been umounted, yet
-*/
-int pakfire_umount_all(struct pakfire* pakfire) {
- return pakfire_mount_foreach(pakfire, MNT_ITER_BACKWARD,
- __pakfire_umount, NULL);
-}
-
PAKFIRE_EXPORT int pakfire_bind(struct pakfire* pakfire, const char* src, const char* dst, int flags) {
struct stat st;
char mountpoint[PATH_MAX];