On 11/29/2017 09:16 PM, Fam Zheng wrote:
On Thu, 11/23 03:08, Max Reitz wrote:
_filter_img_info should remove format-specific information, too.  We
already have such a filter in _img_info, and it is very useful for
query-block-named-block-nodes (etc.), too.

However, in 198 we need that information (but we still want the rest of
the filter), so make that filtering optional.  Note that "the rest of
the filter" includes filtering of the test directory, so we can drop the
_filter_testdir from 198 at the same time.


+        if [[ $discard == 0 ]]; then
+            echo "$line"
+        elif [[ $discard == 1 && ! $line ]]; then

s/\$line/"\$line"/ ?


Not necessary; [[ ]] is a bashism, which is part of the shell grammar so it doesn't need quoting. In fact, there are some expressions in [[ ]] where comparing to "$foo" is actively different than comparing to $foo (mostly in regex, as the quotes change whether \ inside $foo are special to the regex or literally matched).

So this part is fine.

--
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org

Reply via email to