Re: [PATCH 1/3] conf: Introduce virnodedeviceobj

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

 




On 03/02/2017 04:03 AM, Pavel Hrdina wrote:
> On Wed, Mar 01, 2017 at 07:27:14PM -0500, John Ferlan wrote:
>> Move all the NodeDeviceObj API's into their own module virnodedeviceobj
>> from the node_device_conf
>>
>> Purely code motion at this point, plus adjustments to cleanly build.
>>
>> Signed-off-by: John Ferlan <jferlan@xxxxxxxxxx>
>> ---
>>  po/POTFILES.in                       |   1 +
>>  src/Makefile.am                      |   3 +-
>>  src/conf/node_device_conf.c          | 505 --------------------------------
>>  src/conf/node_device_conf.h          |  50 ----
>>  src/conf/virnodedeviceobj.c          | 542 +++++++++++++++++++++++++++++++++++
>>  src/conf/virnodedeviceobj.h          |  78 +++++
>>  src/libvirt_private.syms             |  23 +-
>>  src/node_device/node_device_driver.h |   2 +-
>>  src/test/test_driver.c               |   1 +
>>  9 files changed, 638 insertions(+), 567 deletions(-)
>>  create mode 100644 src/conf/virnodedeviceobj.c
>>  create mode 100644 src/conf/virnodedeviceobj.h
> 
> [...]
> 
>> diff --git a/src/conf/virnodedeviceobj.h b/src/conf/virnodedeviceobj.h
>> new file mode 100644
>> index 0000000..6ad7fb1
>> --- /dev/null
>> +++ b/src/conf/virnodedeviceobj.h
>> @@ -0,0 +1,78 @@
>> +/*
>> + * virnodedeviceobj.h: node device object handling for node devices
>> + *                     (derived from node_device_conf.h)
>> + *
>> + * This library is free software; you can redistribute it and/or
>> + * modify it under the terms of the GNU Lesser General Public
>> + * License as published by the Free Software Foundation; either
>> + * version 2.1 of the License, or (at your option) any later version.
>> + *
>> + * This library is distributed in the hope that it will be useful,
>> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
>> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
>> + * Lesser General Public License for more details.
>> + *
>> + * You should have received a copy of the GNU Lesser General Public
>> + * License along with this library.  If not, see
>> + * <http://www.gnu.org/licenses/>.
>> + */
>> +
>> +#ifndef __VIRNODEDEVICEOBJ_H__
>> +# define __VIRNODEDEVICEOBJ_H__
>> +
>> +# include "internal.h"
>> +# include "virthread.h"
>> +
>> +# include "node_device_conf.h"
>> +# include "object_event.h"
>> +
>> +
>> +typedef struct _virNodeDeviceDriverState virNodeDeviceDriverState;
>> +typedef virNodeDeviceDriverState *virNodeDeviceDriverStatePtr;
>> +struct _virNodeDeviceDriverState {
>> +    virMutex lock;
>> +
>> +    virNodeDeviceObjList devs;		/* currently-known devices */
>> +    void *privateData;			/* driver-specific private data */
>> +
>> +    /* Immutable pointer, self-locking APIs */
>> +    virObjectEventStatePtr nodeDeviceEventState;
>> +};
>> +
>> +
> 
> Since I'm the only one that tries to change the different coding style
> between header and source files this is a kind reminder that it would
> be nice to use the same coding style, placing the return value on
> separate line.
> 
> Thanks,
> 
> Pavel
> 

Sure I can add that to the list of things to do for each of these in
"followup" patches...  So that I don't break the unwritten? policy that
thou shalt not make formatting or style changes for code motion because
it's "difficult" to review ;-)

John

[...]

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[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