]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[image] Skip misleading "format not recognised" error message
authorMichael Brown <mcb30@ipxe.org>
Thu, 28 Apr 2016 11:12:50 +0000 (12:12 +0100)
committerMichael Brown <mcb30@ipxe.org>
Thu, 28 Apr 2016 11:12:50 +0000 (12:12 +0100)
Return success (rather than failure) after an image format has been
correctly identified.

This has no practical effect, since the return value from
image_probe() is deliberately never used, but avoids a somewhat
surprising and misleading "format not recognised" error message when
debugging is enabled.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/core/image.c

index 4a4e9c2a032455d6ac36c96d2051435f536a8cd3..a185b82f4ffbe54e227d3e46cc4d5306065598b0 100644 (file)
@@ -191,7 +191,7 @@ static int image_probe ( struct image *image ) {
                        image->type = type;
                        DBGC ( image, "IMAGE %s is %s\n",
                               image->name, type->name );
-                       break;
+                       return 0;
                }
                DBGC ( image, "IMAGE %s is not %s: %s\n", image->name,
                       type->name, strerror ( rc ) );