Skip to content

Commit b696a50

Browse files
committed
[image] Skip misleading "format not recognised" error message
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>
1 parent 55e409b commit b696a50

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/core/image.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ static int image_probe ( struct image *image ) {
191191
image->type = type;
192192
DBGC ( image, "IMAGE %s is %s\n",
193193
image->name, type->name );
194-
break;
194+
return 0;
195195
}
196196
DBGC ( image, "IMAGE %s is not %s: %s\n", image->name,
197197
type->name, strerror ( rc ) );

0 commit comments

Comments
 (0)