Re: [libvirt] [PATCH 2/9] util: Make structs follow our naming convention
On 04/16/2018 09:55 AM, Erik Skultety wrote: > On Fri, Apr 13, 2018 at 04:47:09PM +0200, Michal Privoznik wrote: >> There are two structs virMacMap and virFDStreamData that don't >> have the underscore prefix. Put it there so that they follow the >> rest of the code. >> >> Signed-off-by: Michal Privoznik >> --- >> src/util/virfdstream.c | 4 ++-- >> src/util/virmacmap.c | 2 +- >> src/util/virmacmap.h | 2 +- >> 3 files changed, 4 insertions(+), 4 deletions(-) > > these suffer from the same problem: > daemonAdmClientPrivate > virDomainQemuMonitorEventData > xentoollog_logger_libvirt (no convention here at all, so I'd skip this one) > virLXCMeminfo > qemuBlockNodeNameBackingChainData > daemonClientStream > virNetMessageHeader > virNetMessageError > virCgroup > virNetlinkCallbackData > virPerf > virPerfEvent > virPerfEventAttr > virRotatingFileWriterEntry > virRotatingFileReaderEntry > virRotatingFileWriter > virRotatingFileReader > virMutex > virRWLock > virCond > virThreadLocal > virThread > virTypedParameterRemoteValue (the second typedef is completely wrong): > typedef struct _virTypedParameterRemoteValue virTypedParameterRemoteValue; > typedef struct virTypedParameterRemoteValue > *virTypedParameterRemoteValuePtr; > virOnceControl > vbox - basically all of the structs :P > vzDomObj > > Honestly, given the number of places where this should be fixed, I'm not sure > whether we should really go with the patch, but at the same time, I can > imagine > us having this unified once and for all. Actually, I don't need this patch. So I'm dropping it. Michal -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH 2/9] util: Make structs follow our naming convention
On Fri, Apr 13, 2018 at 04:47:09PM +0200, Michal Privoznik wrote: > There are two structs virMacMap and virFDStreamData that don't > have the underscore prefix. Put it there so that they follow the > rest of the code. > > Signed-off-by: Michal Privoznik > --- > src/util/virfdstream.c | 4 ++-- > src/util/virmacmap.c | 2 +- > src/util/virmacmap.h | 2 +- > 3 files changed, 4 insertions(+), 4 deletions(-) these suffer from the same problem: daemonAdmClientPrivate virDomainQemuMonitorEventData xentoollog_logger_libvirt (no convention here at all, so I'd skip this one) virLXCMeminfo qemuBlockNodeNameBackingChainData daemonClientStream virNetMessageHeader virNetMessageError virCgroup virNetlinkCallbackData virPerf virPerfEvent virPerfEventAttr virRotatingFileWriterEntry virRotatingFileReaderEntry virRotatingFileWriter virRotatingFileReader virMutex virRWLock virCond virThreadLocal virThread virTypedParameterRemoteValue (the second typedef is completely wrong): typedef struct _virTypedParameterRemoteValue virTypedParameterRemoteValue; typedef struct virTypedParameterRemoteValue *virTypedParameterRemoteValuePtr; virOnceControl vbox - basically all of the structs :P vzDomObj Honestly, given the number of places where this should be fixed, I'm not sure whether we should really go with the patch, but at the same time, I can imagine us having this unified once and for all. Erik -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
[libvirt] [PATCH 2/9] util: Make structs follow our naming convention
There are two structs virMacMap and virFDStreamData that don't have the underscore prefix. Put it there so that they follow the rest of the code. Signed-off-by: Michal Privoznik --- src/util/virfdstream.c | 4 ++-- src/util/virmacmap.c | 2 +- src/util/virmacmap.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/util/virfdstream.c b/src/util/virfdstream.c index be40379a92..e2d3f365cd 100644 --- a/src/util/virfdstream.c +++ b/src/util/virfdstream.c @@ -75,9 +75,9 @@ struct _virFDStreamMsg { /* Tunnelled migration stream support */ -typedef struct virFDStreamData virFDStreamData; +typedef struct _virFDStreamData virFDStreamData; typedef virFDStreamData *virFDStreamDataPtr; -struct virFDStreamData { +struct _virFDStreamData { virObjectLockable parent; int fd; diff --git a/src/util/virmacmap.c b/src/util/virmacmap.c index 42890ba2ff..d3be3066cc 100644 --- a/src/util/virmacmap.c +++ b/src/util/virmacmap.c @@ -43,7 +43,7 @@ VIR_LOG_INIT("util.virmacmap"); */ #define VIR_MAC_MAP_FILE_SIZE_MAX (32 * 1024 * 1024) -struct virMacMap { +struct _virMacMap { virObjectLockable parent; virHashTablePtr macs; diff --git a/src/util/virmacmap.h b/src/util/virmacmap.h index e6f754e247..93295c9107 100644 --- a/src/util/virmacmap.h +++ b/src/util/virmacmap.h @@ -24,7 +24,7 @@ #ifndef __VIR_MACMAP_H__ # define __VIR_MACMAP_H__ -typedef struct virMacMap virMacMap; +typedef struct _virMacMap virMacMap; typedef virMacMap *virMacMapPtr; char * -- 2.16.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list