From: Richard Guy Briggs Subject: errormsg table macros [was: Re: [PATCH 2/2] errormsg: add descriptive macros to replace overloaded error codes] Date: Mon, 8 May 2017 09:48:26 -0400 Message-ID: <20170508134826.GX25861@madcap2.tricolour.ca> References: <1491302268-797-1-git-send-email-rgb@redhat.com> <1905532.6h1g383l91@x2> <20170504202945.GR25861@madcap2.tricolour.ca> <2313872.xMYfS2GaQK@x2> <20170504210535.GH21241@madcap2.tricolour.ca> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <20170504210535.GH21241@madcap2.tricolour.ca> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-audit-bounces@redhat.com Errors-To: linux-audit-bounces@redhat.com To: Steve Grubb Cc: linux-audit@redhat.com List-Id: linux-audit@redhat.com On 2017-05-04 17:05, Richard Guy Briggs wrote: > On 2017-05-04 16:49, Steve Grubb wrote: > > On Thursday, May 4, 2017 4:29:45 PM EDT Richard Guy Briggs wrote: > > > On 2017-05-04 16:11, Steve Grubb wrote: > > > > Was there a patch in this series that converted errormsg.h to use the > > > > macros? > > > I don't quite follow. Can you give a fictional example off the top of > > > your head of what you are hoping for? > > > > This table: > > > > static const struct msg_tab err_msgtab[] = { > > { -1, 2, "-F missing operation for" }, > > { -2, 2, "-F unknown field:" }, > > { -3, 1, "must be before -S" }, > > { -4, 1, "machine type not found" }, > > ... > > > > converted to using the defines. The libaudit return codes were fixed to > > defines. But the table the return codes are looked up in is still using > > numbers. > > Ah, got it, yes, completely agree. Ok, here is a pull request to make that change: https://github.com/linux-audit/audit-userspace/pull/22 I've tagged it related to: https://github.com/linux-audit/audit-userspace/issues/11 > > -Steve > > - RGB - RGB -- Richard Guy Briggs Sr. S/W Engineer, Kernel Security, Base Operating Systems Remote, Ottawa, Red Hat Canada IRC: rgb, SunRaycer Voice: +1.647.777.2635, Internal: (81) 32635