]> git.ipfire.org Git - thirdparty/plymouth.git/commitdiff
drop lame ply_filesystem_is_mounted function
authorRay Strode <rstrode@redhat.com>
Mon, 11 Jun 2007 18:38:09 +0000 (14:38 -0400)
committerRay Strode <rstrode@redhat.com>
Mon, 11 Jun 2007 18:38:09 +0000 (14:38 -0400)
src/libply/ply-terminal.c
src/libply/ply-utils.c

index ed4395963bef8d37d6ef19a2a0538987d00211b6..b0ca9d996b9c0b1eb312aa91051193f0596e7e10 100644 (file)
@@ -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
index 172668bf175ec65d0ed200aa2c1deda121c1a029..3930fd36883fc7d4fb200484fb737ee5a49a146f 100644 (file)
@@ -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)
 {