Date: Wed, 2 Aug 2017 14:36:14 +0200 From: Hans Petter Selasky <hps@selasky.org> To: Konstantin Belousov <kib@FreeBSD.org>, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r321920 - head/sys/sys Message-ID: <f7a4a90c-f1d8-b381-27fe-3cf76b574a29@selasky.org> In-Reply-To: <201708021014.v72AEHEk061037@repo.freebsd.org> References: <201708021014.v72AEHEk061037@repo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On 08/02/17 12:14, Konstantin Belousov wrote: > +#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 */ One more comment on this issue: I think makedev(x, y) should be declared like this, to avoid issues when "y" is negative: #define makedev(x, y) (((dev_t)(x) << 32) | (unsigned int)(y)) /* create dev_t */ ??? --HPS
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?f7a4a90c-f1d8-b381-27fe-3cf76b574a29>