main: update filtering
This commit is contained in:
1 parent
d1bb1b6094
commit
66966a242d
1 file changed
+16
-10
+16
-10
@@ -97,7 +97,7 @@ static void show_usage(void) {
|
|||||||
"\n"
|
"\n"
|
||||||
|
|
||||||
"Image filters:\n"
|
"Image filters:\n"
|
||||||
" -t types filter images by comma separated list of image types\n"
|
" -t types filter images by type\n"
|
||||||
" -d dev filter images by device\n"
|
" -d dev filter images by device\n"
|
||||||
" -w hw filter images by HW revision\n"
|
" -w hw filter images by HW revision\n"
|
||||||
"\n"
|
"\n"
|
||||||
@@ -684,28 +684,34 @@ int main(int argc, char **argv) {
|
|||||||
/* load fiasco image */
|
/* load fiasco image */
|
||||||
if ( image_fiasco ) {
|
if ( image_fiasco ) {
|
||||||
fiasco_in = fiasco_alloc_from_file(image_fiasco_arg);
|
fiasco_in = fiasco_alloc_from_file(image_fiasco_arg);
|
||||||
if ( ! fiasco_in )
|
if ( ! fiasco_in ) {
|
||||||
ERROR("Cannot load fiasco image file %s", image_fiasco_arg);
|
ERROR("Cannot load fiasco image file %s", image_fiasco_arg);
|
||||||
else
|
ret = 1;
|
||||||
image_first = fiasco_in->first;
|
goto clean;
|
||||||
|
}
|
||||||
|
image_first = fiasco_in->first;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* filter images by type */
|
/* filter images by type */
|
||||||
if ( filter_type ) {
|
if ( filter_type ) {
|
||||||
enum image_type type = image_type_from_string(filter_type_arg);
|
enum image_type type = image_type_from_string(filter_type_arg);
|
||||||
if ( ! type )
|
if ( ! type ) {
|
||||||
ERROR("Specified unknown image type for filtering: %s", filter_type_arg);
|
ERROR("Specified unknown image type for filtering: %s", filter_type_arg);
|
||||||
else
|
ret = 1;
|
||||||
filter_images_by_type(type, &image_first);
|
goto clean;
|
||||||
|
}
|
||||||
|
filter_images_by_type(type, &image_first);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* filter images by device */
|
/* filter images by device */
|
||||||
if ( filter_device ) {
|
if ( filter_device ) {
|
||||||
enum device device = device_from_string(filter_device_arg);
|
enum device device = device_from_string(filter_device_arg);
|
||||||
if ( ! device )
|
if ( ! device ) {
|
||||||
ERROR("Specified unknown device for filtering: %s", filter_device_arg);
|
ERROR("Specified unknown device for filtering: %s", filter_device_arg);
|
||||||
else
|
ret = 1;
|
||||||
filter_images_by_device(device, &image_first);
|
goto clean;
|
||||||
|
}
|
||||||
|
filter_images_by_device(device, &image_first);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* filter images by hwrev */
|
/* filter images by hwrev */
|
||||||
|
|||||||
Reference in new issue
Block a user