linux-msm / qdl

BSD 3-Clause "New" or "Revised" License
225 stars 79 forks source link

qdl: firehose: program: fail on missing file #79

Closed mwasilew closed 1 month ago

mwasilew commented 2 months ago

When parsing XML files the specified binary to be flashed may not be present. The default behaviour of QDL is to ignore missing file. This is sometimes undesireble.

This patch introduces optional flag --fail-on-missing which will enforce failure of flashing procedure if there is a missing file name.

quic-bjorande commented 2 months ago

Patch looks good.

I do however wonder if we should invert the default and add --ignore-missing instead. Trying to understand why there are references to missing files in the first place...

mwasilew commented 2 months ago

I didn't want to change the current behaviour. The difference came out when someone reported error flashing with pcat. Pcat throws error on missing file.

quic-bjorande commented 2 months ago

After internal discussion, I would like for us to follow pcat and invert the behavior of QDL. Could you please make that "--allow-missing" and reverse the introduced logic?

mwasilew commented 2 months ago

@quic-bjorande I made the changes you asked for. The code builds but I didn't test it with the device yet. I'll do that and post a comment here.

mwasilew commented 2 months ago

It seems to be working as expected