return true;
}
-bool
-ply_create_detachable_directory (const char *directory)
-{
-
- assert (directory != NULL);
- assert (directory[0] != '\0');
-
- ply_trace ("trying to create directory '%s'", directory);
- if (!ply_create_directory (directory))
- return false;
-
- if (mount ("none", directory, "tmpfs", 0, NULL) < 0)
- return false;
-
- return true;
-}
-
-int
-ply_detach_directory (const char *directory)
-{
- int dir_fd;
-
- dir_fd = open (directory, O_RDONLY);
-
- if (dir_fd < 0)
- {
- ply_save_errno ();
- umount (directory);
- ply_restore_errno ();
- return dir_fd;
- }
-
- if (!ply_unmount_filesystem (directory))
- {
- ply_save_errno ();
- umount (directory);
- ply_restore_errno ();
- return false;
- }
- rmdir (directory);
-
- /* return a file descriptor to the directory because it's now been
- * detached from the filesystem. The user can fchdir to this
- * directory and work from it that way
- */
-
- return dir_fd;
-}
-
static bool
ply_copy_subdirectory (const char *subdirectory,
const char *parent,
return true;
}
+bool ply_mount_tmpfs (const char *directory)
+{
+ assert (directory != NULL);
+ assert (directory[0] != '\0');
+
+ if (mount ("none", directory, "tmpfs", 0, NULL) < 0)
+ return false;
+
+ return true;
+}
+
bool
ply_move_mount (const char *source, const char *destination)
{
void ply_close_module (ply_module_handle_t *handle);
bool ply_create_directory (const char *directory);
-bool ply_create_detachable_directory (const char *directory);
-int ply_detach_directory (const char *directory);
bool ply_copy_file (const char *source, const char *destination);
bool ply_copy_directory (const char *source, const char *destination);
bool ply_unmount_filesystem (const char *directory);
bool ply_move_mount (const char *source, const char *destination);
+bool ply_mount_tmpfs (const char *directory);
ply_daemon_handle_t *ply_create_daemon (void);
bool ply_detach_daemon (ply_daemon_handle_t *handle,