Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 9 Jan 2016 17:08:33 +0000 (UTC)
From:      Dmitry Chagin <dchagin@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r293563 - stable/10/sys/compat/linux
Message-ID:  <201601091708.u09H8XMW051667@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: dchagin
Date: Sat Jan  9 17:08:33 2016
New Revision: 293563
URL: https://svnweb.freebsd.org/changeset/base/293563

Log:
  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.

Modified:
  stable/10/sys/compat/linux/linux_stats.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/compat/linux/linux_stats.c
==============================================================================
--- stable/10/sys/compat/linux/linux_stats.c	Sat Jan  9 17:07:17 2016	(r293562)
+++ stable/10/sys/compat/linux/linux_stats.c	Sat Jan  9 17:08:33 2016	(r293563)
@@ -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 *fstypenam
 		{"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 l
 	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 l
 	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));
 }
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201601091708.u09H8XMW051667>