Просмотр исходного кода

[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>
tags/v1.20.1
Michael Brown 10 лет назад
Родитель
Сommit
b696a5063e
1 измененных файлов: 1 добавлений и 1 удалений
  1. 1
    1
      src/core/image.c

+ 1
- 1
src/core/image.c Просмотреть файл

191
 			image->type = type;
191
 			image->type = type;
192
 			DBGC ( image, "IMAGE %s is %s\n",
192
 			DBGC ( image, "IMAGE %s is %s\n",
193
 			       image->name, type->name );
193
 			       image->name, type->name );
194
-			break;
194
+			return 0;
195
 		}
195
 		}
196
 		DBGC ( image, "IMAGE %s is not %s: %s\n", image->name,
196
 		DBGC ( image, "IMAGE %s is not %s: %s\n", image->name,
197
 		       type->name, strerror ( rc ) );
197
 		       type->name, strerror ( rc ) );

Загрузка…
Отмена
Сохранить