
24 Oct
2018
24 Oct
'18
3:58 p.m.
Dear Peng Fan,
In message 20181024051500.12467-1-peng.fan@nxp.com you wrote:
When the required files to build a bootable imx8 image are not found, return EXIT_SUCCESS to avoid build CI system. And if the files are missing, give a error message during the build.
Full NAK.
Naked-by: Wolfgang Denk wd@denx.de
if (tmp_fd < 0) {
fprintf(stderr, "%s: Can't open: %s\n",
fprintf(stderr, "*** %s: Can't open: %s ***\n", filename, strerror(errno));
exit(EXIT_FAILURE);
exit(EXIT_SUCCESS);
An error like this must ALWAYS be reported by a proper return / exit code o fthe funtion / program, other wise it is impossible to use such tools in any automatic scripts, pipelines etc.
Anything else is just fundamentally broken. I am shocked to see such a patch.
Wolfgang Denk
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de
It is common sense to take a method and try it. If it fails, admit it
frankly and try another. But above all, try something.
- Franklin D. Roosevelt