chiark / gitweb /
volume_id: clear probing result before probing and do not probe a second time, if...
authorKay Sievers <kay.sievers@vrfy.org>
Fri, 21 Nov 2008 06:26:44 +0000 (07:26 +0100)
committerKay Sievers <kay.sievers@vrfy.org>
Fri, 21 Nov 2008 06:26:44 +0000 (07:26 +0100)
commitf1ab8f912e06e50e6e42c3e3ece259d7f3e81f6b
tree40c52c0d3e54e6eef3ac12b70a9731d106c5f818
parent7106902dce55b68a878cb209e55222a904ff10ff
volume_id: clear probing result before probing and do not probe a second time, if not needed

On Thu, Nov 20, 2008 at 14:17, Karel Zak <kzak@redhat.com> wrote:
>  I see the patch (volume_id_probe_filesystem()) and a few things come
>  to mind:
>
>  - shouldn't be the relevant parts (label, uuid, version, ...) of
>    the "struct volume_id" zeroized when you found a signature and
>    before you call the next probing function?
>
>  - it seems as overkill to use two for()s and probe two times for all
>    filesystems. What about to store the first result and re-use it?
>
>  - .. or at least never use the second for() when the fist for() found
>    nothing ;-)
extras/volume_id/lib/volume_id.c