[PATCH 06/13] bootm: close open files

vj vicencb at gmail.com
Mon Oct 8 17:02:04 EDT 2012


On Mon, Oct 8, 2012 at 10:18 PM, Sascha Hauer <s.hauer at pengutronix.de> wrote:
> On Mon, Oct 08, 2012 at 12:01:20AM +0200, Vicente wrote:
>>
>> Signed-off-by: Vicente <vicencb at gmail.com>
>> ---
>>  arch/arm/lib/bootm.c | 4 +++-
>>  commands/bootm.c     | 6 +++++-
>>  2 files changed, 8 insertions(+), 2 deletions(-)
>>
>> diff --git a/arch/arm/lib/bootm.c b/arch/arm/lib/bootm.c
>> index c5b76ea..288c0b2 100644
>> --- a/arch/arm/lib/bootm.c
>> +++ b/arch/arm/lib/bootm.c
>> @@ -269,8 +269,9 @@ static int do_bootz_linux(struct image_data *data)
>>
>>       ret = do_bootz_linux_fdt(fd, data);
>>       if (ret && ret != -ENXIO)
>> -             return ret;
>> +             goto err_out;
>>
>> +     close(fd);
>>       return __do_bootm_linux(data, swap);
>
> ret = __do_bootm_linux and fall through?
>
> Sascha
>
>
> --
> Pengutronix e.K.                           |                             |
> Industrial Linux Solutions                 | http://www.pengutronix.de/  |
> Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
> Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

No,
 __do_bootm_linux does not return if everything works ok.
>From the barebox point of view there is no difference in closing or
not the files.
The difference is when the files are from a server.

Regards,
  Vicente.



More information about the barebox mailing list