[libvirt] [PATCH 12/10] secret: Introduce virSecretObjSaveConfig and virSecretObjSaveData

John Ferlan jferlan at redhat.com
Tue Apr 19 12:15:42 UTC 2016



On 04/18/2016 06:12 PM, Cole Robinson wrote:
> On 03/08/2016 12:36 PM, John Ferlan wrote:
>> Move and rename the secretRewriteFile, secretSaveDef, and secretSaveValue
>> from secret_driver to secret_conf
>>
>> Need to make some slight adjustments since the secretSave* functions
>> called secretEnsureDirectory, but otherwise mostly just a move of code.
>>
>> Signed-off-by: John Ferlan <jferlan at redhat.com>
>> ---
>>  src/conf/secret_conf.c     | 69 +++++++++++++++++++++++++++++++++++
>>  src/conf/secret_conf.h     |  4 +++
>>  src/libvirt_private.syms   |  2 ++
>>  src/secret/secret_driver.c | 90 +++++++---------------------------------------
>>  4 files changed, 87 insertions(+), 78 deletions(-)
> 
> ACK
> 
> Though there should probably be explicit virfile.c support for a generic
> 'rewrite file with this passed string', rather than requiring a callback.
> src/network/leaseshelper.c already has something similar
> 

This patch was just moving existing code. I cannot say for sure, but if
the 'opaque' data had some formatting considerations rather than just a
string, such as virXMLSaveFile which also uses virFileRewrite, then the
existing virFileRewrite is doing just what it was designed to do. I
didn't spend any cycles looks which came first.

John




More information about the libvir-list mailing list