From: Ray Strode Date: Mon, 11 Jun 2007 18:38:09 +0000 (-0400) Subject: drop lame ply_filesystem_is_mounted function X-Git-Tag: 0.1.0~151 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=52f531cc66fda147ec98e6f2074754693d5f5f91;p=thirdparty%2Fplymouth.git drop lame ply_filesystem_is_mounted function --- diff --git a/src/libply/ply-terminal.c b/src/libply/ply-terminal.c index ed439596..b0ca9d99 100644 --- a/src/libply/ply-terminal.c +++ b/src/libply/ply-terminal.c @@ -64,28 +64,6 @@ ply_terminal_free (ply_terminal_t *terminal) free (terminal); } -static bool -ply_terminal_mount_proc_file_system (ply_terminal_t *terminal) -{ - mkdir ("/proc", 0755); - - if (mount ("none", "/proc", "proc", 0, NULL) < 0) - return false; - - return ply_file_system_is_mounted ("proc", "/proc"); -} - -static bool -ply_terminal_mount_devpts_file_system (ply_terminal_t *terminal) -{ - mkdir ("/dev/pts", 0755); - - if (mount ("none", "/dev/pts", "devpts", 0, "gid=5,mode=620") < 0) - return false; - - return ply_file_system_is_mounted ("devpts", "/dev/pts"); -} - bool ply_terminal_create_device (ply_terminal_t *terminal) { @@ -94,18 +72,6 @@ ply_terminal_create_device (ply_terminal_t *terminal) assert (terminal != NULL); assert (!ply_terminal_has_device (terminal)); - if (!ply_file_system_is_mounted ("proc", "/proc")) - { - if (!ply_terminal_mount_proc_file_system (terminal)) - return false; - } - - if (!ply_file_system_is_mounted ("devpts", "/dev/pts")) - { - if (!ply_terminal_mount_devpts_file_system (terminal)) - return false; - } - #if 0 terminal->fd = posix_openpt (O_RDWR | O_NOCTTY); #endif diff --git a/src/libply/ply-utils.c b/src/libply/ply-utils.c index 172668bf..3930fd36 100644 --- a/src/libply/ply-utils.c +++ b/src/libply/ply-utils.c @@ -567,23 +567,6 @@ ply_file_exists (const char *file) return S_ISREG (file_info.st_mode); } -bool -ply_file_system_is_mounted (const char *type, - const char *path) -{ - if (!ply_directory_exists (path)) - return false; - - /* XXX: lammmeeee - */ - if (strcmp (type, "proc") == 0) - return ply_directory_exists ("/proc/1"); - - /* FIXME: should check with getmntent() on /etc/mtab or /proc/mounts - */ - return true; -} - ply_module_handle_t * ply_open_module (const char *module_path) {