Skip to content

Commit ccc1b68

Browse files
quic-bjorandeandersson
authored andcommitted
qdl: Fail fast when programmer is unavailable
Having the tool fail due to missing images before we establish the USB connection turns out to be rather nice, so let's do the same thing with the flash programmer. Signed-off-by: Bjorn Andersson <[email protected]>
1 parent ce175f2 commit ccc1b68

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

qdl.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,8 @@ int main(int argc, char **argv)
238238
print_version();
239239

240240
prog_mbn = argv[optind++];
241+
if (access(prog_mbn, F_OK))
242+
errx(1, "unable to load programmer \"%s\"", prog_mbn);
241243

242244
do {
243245
type = detect_type(argv[optind]);

0 commit comments

Comments
 (0)