From owner-svn-src-head@freebsd.org Wed Aug 2 10:25:36 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9904FDCC492; Wed, 2 Aug 2017 10:25:36 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [88.99.82.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 60DD883D75; Wed, 2 Aug 2017 10:25:35 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2016.home.selasky.org (unknown [62.141.129.119]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 6BADA260179; Wed, 2 Aug 2017 12:25:33 +0200 (CEST) Subject: Re: svn commit: r321920 - head/sys/sys To: Konstantin Belousov , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201708021014.v72AEHEk061037@repo.freebsd.org> From: Hans Petter Selasky Message-ID: <50d380b1-806a-6114-7324-e4cd3d6a2b2f@selasky.org> Date: Wed, 2 Aug 2017 12:23:22 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0 MIME-Version: 1.0 In-Reply-To: <201708021014.v72AEHEk061037@repo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Aug 2017 10:25:36 -0000 On 08/02/17 12:14, Konstantin Belousov wrote: > Author: kib > Date: Wed Aug 2 10:14:17 2017 > New Revision: 321920 > URL: https://svnweb.freebsd.org/changeset/base/321920 > > Log: > Change major()/minor() to work with 64bit dev_t. > > Since traditional types for the macros values are int, remove the > cookie trick and just split the dev_t at the word boundary. > > Reported by: Victor Stinner > PR: 221048 > Sponsored by: The FreeBSD Foundation > > Modified: > head/sys/sys/types.h > > Modified: head/sys/sys/types.h > ============================================================================== > --- head/sys/sys/types.h Wed Aug 2 10:12:10 2017 (r321919) > +++ head/sys/sys/types.h Wed Aug 2 10:14:17 2017 (r321920) > @@ -364,14 +364,9 @@ __bitcount64(__uint64_t _x) > > #include > > -/* > - * minor() gives a cookie instead of an index since we don't want to > - * change the meanings of bits 0-15 or waste time and space shifting > - * bits 16-31 for devices that don't use them. > - */ > -#define major(x) ((int)(((u_int)(x) >> 8)&0xff)) /* major number */ > -#define minor(x) ((int)((x)&0xffff00ff)) /* minor number */ > -#define makedev(x,y) ((dev_t)(((x) << 8) | (y))) /* create dev_t */ > +#define major(x) ((int)((dev_t)(x) >> 32)) /* major number */ > +#define minor(x) ((int)((x) & 0xffffffff)) /* minor number */ > +#define makedev(x, y) (((dev_t)(x) << 32) | (y)) /* create dev_t */ > > /* > * These declarations belong elsewhere, but are repeated here and in Hi, This change looks like it affects user-space applications? Why is not the FreeBSD version number bumped? --HPS