Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 17 Jun 2025 00:05:41 +0300
From:      Konstantin Belousov <kostikbel@gmail.com>
To:        Gleb Smirnoff <glebius@freebsd.org>
Cc:        Mark Johnston <markj@freebsd.org>, John Baldwin <jhb@freebsd.org>, src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org
Subject:   Re: git: 4e207e3849d4 - main - exterr: make SET_ERRORX() macros an expression evaluating to the errno
Message-ID:  <aFCHJYnDUeHcykGV@kib.kiev.ua>
In-Reply-To: <aFCGJjKoPgFfqprl@cell.glebi.us>
References:  <202506131940.55DJeTa1046740@gitrepo.freebsd.org> <0003a97e-60ed-4868-8844-0a0346bc97ee@FreeBSD.org> <aE1yO1glTul0Zu8r@nuc> <aFCGJjKoPgFfqprl@cell.glebi.us>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Jun 16, 2025 at 02:01:26PM -0700, Gleb Smirnoff wrote:
> On Sat, Jun 14, 2025 at 08:59:39AM -0400, Mark Johnston wrote:
> M> If your suggestion is implemented, then it would be sensible to use a
> M> different name to avoid collisions, maybe SET_EXTERROR() or just
> M> EXTERROR().
> 
> I'd vote for EXTERROR(). But now with the function existing, why would
> we recommend to use the macro instead of the function at all?
Because there is an option to not bloat the kernel with strings.
Also there is a desire to provide more info, like amount of the arguments
supplied, automatically.

It is already EXTERROR().  See vm/vm_mmap.c for exemplary usage.

> IMHO, the
> function shall be the right use and that will make any macro collisions
> with ZFS or whatever void.



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