summaryrefslogtreecommitdiffstats
path: root/sys/compat
diff options
context:
space:
mode:
authordchagin <dchagin@FreeBSD.org>2016-01-09 17:08:33 +0000
committerdchagin <dchagin@FreeBSD.org>2016-01-09 17:08:33 +0000
commit8be89d308fd030698abab043b1d7019e4b1283a1 (patch)
treea77dbb3482ed45ef7dd06d7a5a599d8d072cf1b2 /sys/compat
parentcb583c148b9a4bd2f656af0521ae9386dfdfcebf (diff)
downloadFreeBSD-src-8be89d308fd030698abab043b1d7019e4b1283a1.zip
FreeBSD-src-8be89d308fd030698abab043b1d7019e4b1283a1.tar.gz
MFC r283461:
As for now our tmpfs is no longer being considered "highly experimental" remove /dev/shm magic commited in r218497 and convert tmpfs type to an expected magic number.
Diffstat (limited to 'sys/compat')
-rw-r--r--sys/compat/linux/linux_stats.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/sys/compat/linux/linux_stats.c b/sys/compat/linux/linux_stats.c
index 845ac67..7c1d40a 100644
--- a/sys/compat/linux/linux_stats.c
+++ b/sys/compat/linux/linux_stats.c
@@ -58,7 +58,6 @@ __FBSDID("$FreeBSD$");
#include <compat/linux/linux_util.h>
#include <compat/linux/linux_file.h>
-#define LINUX_SHMFS_MAGIC 0x01021994
static void
translate_vnhook_major_minor(struct vnode *vp, struct stat *sb)
@@ -352,6 +351,7 @@ struct l_statfs {
#define LINUX_PROC_SUPER_MAGIC 0x9fa0L
#define LINUX_UFS_SUPER_MAGIC 0x00011954L /* XXX - UFS_MAGIC in Linux */
#define LINUX_DEVFS_SUPER_MAGIC 0x1373L
+#define LINUX_SHMFS_MAGIC 0x01021994
static long
bsd_to_linux_ftype(const char *fstypename)
@@ -369,6 +369,7 @@ bsd_to_linux_ftype(const char *fstypename)
{"hpfs", LINUX_HPFS_SUPER_MAGIC},
{"coda", LINUX_CODA_SUPER_MAGIC},
{"devfs", LINUX_DEVFS_SUPER_MAGIC},
+ {"tmpfs", LINUX_SHMFS_MAGIC},
{NULL, 0L}};
for (i = 0; b2l_tbl[i].bsd_name != NULL; i++)
@@ -400,7 +401,7 @@ linux_statfs(struct thread *td, struct linux_statfs_args *args)
struct l_statfs linux_statfs;
struct statfs bsd_statfs;
char *path;
- int error, dev_shm;
+ int error;
LCONVPATHEXIST(td, args->path, &path);
@@ -408,17 +409,11 @@ linux_statfs(struct thread *td, struct linux_statfs_args *args)
if (ldebug(statfs))
printf(ARGS(statfs, "%s, *"), path);
#endif
- dev_shm = 0;
error = kern_statfs(td, path, UIO_SYSSPACE, &bsd_statfs);
- if (strncmp(path, "/dev/shm", sizeof("/dev/shm") - 1) == 0)
- dev_shm = (path[8] == '\0'
- || (path[8] == '/' && path[9] == '\0'));
LFREEPATH(path);
if (error)
return (error);
bsd_to_linux_statfs(&bsd_statfs, &linux_statfs);
- if (dev_shm)
- linux_statfs.f_type = LINUX_SHMFS_MAGIC;
return copyout(&linux_statfs, args->buf, sizeof(linux_statfs));
}
OpenPOWER on IntegriCloud