Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761368AbcKDNtq (ORCPT ); Fri, 4 Nov 2016 09:49:46 -0400 Received: from mout.web.de ([217.72.192.78]:63807 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934855AbcKDNto (ORCPT ); Fri, 4 Nov 2016 09:49:44 -0400 Subject: Re: scripts/basic/bin2c: Complete error handling in main() To: Michal Marek , linux-kbuild@vger.kernel.org References: <72e07814-56e9-505a-d660-91ff20b6efea@users.sourceforge.net> <44402655-ef0d-1e2f-0587-f17295a08aa3@users.sourceforge.net> <0fcf5fb3-ff4a-a003-7814-51a6ab5ad988@users.sourceforge.net> <359604cc-ec1a-84eb-4cf1-88e72641f724@users.sourceforge.net> Cc: Masahiro Yamada , LKML , kernel-janitors@vger.kernel.org From: SF Markus Elfring Message-ID: <917e7b99-bb75-80b2-a356-918d6128705a@users.sourceforge.net> Date: Fri, 4 Nov 2016 13:48:51 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:ryP1FPWh7HllKXOh66wLa5G9+2YwZkCZVooTEgqNvJBQuLmzxua zzRyL3jyhC+IE5GI0FRGTDxd8AoZolG1zG8ci0A8FMhOK5fOgzO1pO1fUEh/8qg4s4qZzPl 77gymH8RKQlFUubOaQ3Oi5k4MWmSZO00bvk8zzjHiAY6X2Cl63lsdUYKPSNNk9HIgV99K0t +uXmVIAtv1CU9HaPkhgEw== X-UI-Out-Filterresults: notjunk:1;V01:K0:aPgkrwy+FJY=:voWYz5stP3JXa6WNlBJPUu WfDp/C37KHirCbcOCqpW3P43HXgRPGP4NVUTd7IokoNSkcqQufp1BYat3EOIa+0/oRwFacwmL XTpEKCUNCFWOrCUVa9C7Mnodxn8jSOMXtnqm3AaO2IiHE9D132HDMxxHQVs9Ltrjrs/1g6/oN XmTXVYkuZlNpOEEIKTdpan5gF1Zuu3wuSzDOexJXIZkqdvIrU5g6xcGl1RiTO6V8U3TGUAgnF slWvWys+yh3ICk3TY+sa6eYJc75aFS3ZEr0W7A0tQbhKGG19ww61fBDdOjt6nonyGIa1pdAr8 ZNVfuC6aKMmmJVURSTdfclpP6V2tKfdzeO9caPxiCRLUMZHzrwfauUTo5jQwmK/ag9O8EniTA /x/Uy7chcKh6U7nzpFeD0mYbE/rMHwCLQqCxrssmbqs0GeyocunqQaIZ8fvjkFzqeMyRyQlYT qo04i9+5A/jk/JyYL+rZ01ebMQkoG/wBiDbN6IBbaLW6epaG3pkinssiy+U1sbJhkoH/yox9+ 7c/Az6b4OO8UCkLwo80pFjV54+Qnt/ETjPEGbNdpJHs3GLy6zbN7sR1PchkkNhP6F0PrI5Z6x +LKxAY1ljvB49S0Y+lsuAbFOl9cjj3zBym4fvmvWkRt83LHU++0TkTefrFGyxElnkJ3koU6DA IMgs9sIWkaPQZoqvCZWwR1+FkHfK40baBfMwVt3AynlyNNdc4V5NkHakLB8Gm8atesqeH21hi ycaTQfwIQFrOxc9s/ihEUIsHBcLQXAV+Y0SVikcAfNhakA6nHzBEUzMJIbr370gWsR5IqDyaL rBomcZv Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 334 Lines: 12 >>> You could define an xprintf() macro that checks if the return value >>> is < 0 and simply calls perror() and exit(1) in such case. >> Does such a macro belong to any general header file from the Linux >> software library? > No. Would you like to add it? How do you think about to reuse it in more source files? Regards, Markus