[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 1/3] nbd: Fix filename generation
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH 1/3] nbd: Fix filename generation |
Date: |
Wed, 24 Sep 2014 22:09:55 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.0 |
Il 24/09/2014 21:38, Max Reitz ha scritto:
> Export names may be used with nbd+unix, too, fix nbd_refresh_filename()
> accordingly. Also, for nbd+tcp, the documented path schema is
> "nbd://host[:port]/export", so use it. Furthermore, as can be seen from
> that schema, the port is optional.
>
> That makes six single cases for how the filename can be formatted; it is
> not easy to generalize these cases without the resulting statement being
> completely unreadable, thus there is simply one snprintf() per case.
You could use GString, but I guess it won't be much better...
Reviewed-by: Paolo Bonzini <address@hidden>