From 9db02f0bc0759fe30657c7bf60030019c7a81824 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Tue, 5 Jun 2001 21:43:00 +0000 Subject: (where_is_shmfs): Recognize tmpfs. --- sysdeps/unix/sysv/linux/shm_open.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'sysdeps/unix') 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. */ -- cgit v1.2.1