Re: [PATCH] storage: pool: Allow more intricate nfs protocol versions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 6/24/22 13:11, Ján Tomko wrote:
> On a Thursday in 2022, Peter Krempa wrote:
>> Treat the 'protocolVer' field as a string so that e.g. '4.1' can be
>> used.
>>
>> Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx>
>> ---
>> src/conf/schemas/storagepool.rng                   |  4 +---
>> src/conf/storage_conf.c                            | 14 +++-----------
>> src/conf/storage_conf.h                            |  2 +-
>> src/storage/storage_util.c                         |  4 ++--
>> .../pool-netfs-protocol-ver-linux.argv             |  2 +-
>> .../pool-netfs-protocol-ver.xml                    |  2 +-
>> .../pool-netfs-protocol-ver.xml                    |  2 +-
>> 7 files changed, 10 insertions(+), 20 deletions(-)
>>
>> @@ -643,12 +643,6 @@ virStoragePoolDefParseSource(xmlXPathContextPtr
>> ctxt,
>>                           
>> virStoragePoolFormatFileSystemNetTypeToString(source->format));
>>             return -1;
>>         }
>> -        if (virStrToLong_uip(ver, NULL, 0, &source->protocolVer) < 0) {
>> -            virReportError(VIR_ERR_XML_ERROR,
>> -                           _("storage pool protocol ver '%s' is
>> malformed"),
>> -                           ver);
>> -            return -1;
>> -        }
> 
> This removes any validation of the field...

Coincidentally, we have virStringParseVersion(). Just my 2 eurocents.

Michal




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux