summary refs log tree commit diff
diff options
context:
space:
mode:
authorAndreas Jaeger <aj@suse.de>2001-06-05 21:43:00 +0000
committerAndreas Jaeger <aj@suse.de>2001-06-05 21:43:00 +0000
commit9db02f0bc0759fe30657c7bf60030019c7a81824 (patch)
tree10f0509f1740211cb10eebf8cd26883cb187c478
parentb66aba32c0b798dc2694fd0d38c488202d0347e4 (diff)
downloadglibc-9db02f0bc0759fe30657c7bf60030019c7a81824.tar.gz
glibc-9db02f0bc0759fe30657c7bf60030019c7a81824.tar.xz
glibc-9db02f0bc0759fe30657c7bf60030019c7a81824.zip
(where_is_shmfs): Recognize tmpfs.
-rw-r--r--sysdeps/unix/sysv/linux/shm_open.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sysdeps/unix/sysv/linux/shm_open.c b/sysdeps/unix/sysv/linux/shm_open.c
index a279cfb470..bc6b93f3cb 100644
--- a/sysdeps/unix/sysv/linux/shm_open.c
+++ b/sysdeps/unix/sysv/linux/shm_open.c
@@ -78,7 +78,10 @@ where_is_shmfs (void)
 
   /* Now read the entries.  */
   while ((mp = __getmntent_r (fp, &resmem, buf, sizeof buf)) != NULL)
-    if (strcmp (mp->mnt_type, "shm") == 0)
+    /* The original name is "shm" but this got changed in early Linux
+       2.4.x to "tmpfs".  */
+    if ((strcmp (mp->mnt_type, "tmpfs") == 0)
+	|| (strcmp (mp->mnt_type, "shm")))
       {
 	/* Found it.  There might be more than one place where the
            filesystem is mounted but one is enough for us.  */