Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 13 May 2016 11:51:44 +0000 (UTC)
From:      Hans Petter Selasky <hselasky@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r299665 - head/sys/compat/linuxkpi/common/include/linux
Message-ID:  <201605131151.u4DBpih8027028@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: hselasky
Date: Fri May 13 11:51:43 2016
New Revision: 299665
URL: https://svnweb.freebsd.org/changeset/base/299665

Log:
  Implement "old_encode_dev()" for the LinuxKPI.
  
  Obtained from:	kmacy @
  MFC after:	1 week
  Sponsored by:	Mellanox Technologies

Modified:
  head/sys/compat/linuxkpi/common/include/linux/kdev_t.h

Modified: head/sys/compat/linuxkpi/common/include/linux/kdev_t.h
==============================================================================
--- head/sys/compat/linuxkpi/common/include/linux/kdev_t.h	Fri May 13 11:42:36 2016	(r299664)
+++ head/sys/compat/linuxkpi/common/include/linux/kdev_t.h	Fri May 13 11:51:43 2016	(r299665)
@@ -35,4 +35,10 @@
 #define MINOR(dev)      minor((dev))
 #define MKDEV(ma, mi)   makedev((ma), (mi))
 
+static inline uint16_t
+old_encode_dev(dev_t dev)
+{
+	return ((MAJOR(dev) << 8) | MINOR(dev));
+}
+
 #endif	/* _LINUX_KDEV_T_H_ */



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