This is not a public API where we have to care about size of
data types. Moreover, I'll be adding new type to lock soon and it
would help if compiler could point on all the locations I need to
fix.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
src/locking/lock_driver.h | 4 ++--
src/locking/lock_driver_lockd.c | 4 ++--
src/locking/lock_driver_nop.c | 4 ++--
src/locking/lock_driver_sanlock.c | 4 ++--
src/locking/lock_manager.c | 4 ++--
src/locking/lock_manager.h | 4 ++--
6 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/src/locking/lock_driver.h b/src/locking/lock_driver.h
index 4a2bbe4..e7a8371 100644
--- a/src/locking/lock_driver.h
+++ b/src/locking/lock_driver.h
@@ -171,7 +171,7 @@ typedef int (*virLockDriverDeinit)(void);
* Returns 0 if successful initialized a new context, -1 on error
*/
typedef int (*virLockDriverNew)(virLockManagerPtr man,
- unsigned int type,
+ virLockManagerObjectType type,
size_t nparams,
virLockManagerParamPtr params,
unsigned int flags);
@@ -218,7 +218,7 @@ typedef void (*virLockDriverFree)(virLockManagerPtr man);
* Returns 0 on success, or -1 on failure
*/
typedef int (*virLockDriverAddResource)(virLockManagerPtr man,
- unsigned int type,
+ virLockManagerResourceType type,
const char *name,
size_t nparams,
virLockManagerParamPtr params,
diff --git a/src/locking/lock_driver_lockd.c b/src/locking/lock_driver_lockd.c
index 70ed45d..a4a9a62 100644
--- a/src/locking/lock_driver_lockd.c
+++ b/src/locking/lock_driver_lockd.c
@@ -427,7 +427,7 @@ static void virLockManagerLockDaemonFree(virLockManagerPtr lock)
static int virLockManagerLockDaemonNew(virLockManagerPtr lock,
- unsigned int type,
+ virLockManagerObjectType type,
size_t nparams,
virLockManagerParamPtr params,
unsigned int flags)
@@ -492,7 +492,7 @@ static int virLockManagerLockDaemonNew(virLockManagerPtr lock,
static int virLockManagerLockDaemonAddResource(virLockManagerPtr lock,
- unsigned int type,
+ virLockManagerResourceType type,
const char *name,
size_t nparams,
virLockManagerParamPtr params,
diff --git a/src/locking/lock_driver_nop.c b/src/locking/lock_driver_nop.c
index 89aad3a..5f72ee5 100644
--- a/src/locking/lock_driver_nop.c
+++ b/src/locking/lock_driver_nop.c
@@ -48,7 +48,7 @@ static int virLockManagerNopDeinit(void)
static int virLockManagerNopNew(virLockManagerPtr lock ATTRIBUTE_UNUSED,
- unsigned int type ATTRIBUTE_UNUSED,
+ virLockManagerObjectType type ATTRIBUTE_UNUSED,
size_t nparams ATTRIBUTE_UNUSED,
virLockManagerParamPtr params ATTRIBUTE_UNUSED,
unsigned int flags_unused ATTRIBUTE_UNUSED)
@@ -57,7 +57,7 @@ static int virLockManagerNopNew(virLockManagerPtr lock
ATTRIBUTE_UNUSED,
}
static int virLockManagerNopAddResource(virLockManagerPtr lock ATTRIBUTE_UNUSED,
- unsigned int type ATTRIBUTE_UNUSED,
+ virLockManagerResourceType type
ATTRIBUTE_UNUSED,
const char *name ATTRIBUTE_UNUSED,
size_t nparams ATTRIBUTE_UNUSED,
virLockManagerParamPtr params ATTRIBUTE_UNUSED,
diff --git a/src/locking/lock_driver_sanlock.c b/src/locking/lock_driver_sanlock.c
index e052875..2de9a55 100644
--- a/src/locking/lock_driver_sanlock.c
+++ b/src/locking/lock_driver_sanlock.c
@@ -445,7 +445,7 @@ static int virLockManagerSanlockDeinit(void)
static int virLockManagerSanlockNew(virLockManagerPtr lock,
- unsigned int type,
+ virLockManagerObjectType type,
size_t nparams,
virLockManagerParamPtr params,
unsigned int flags)
@@ -732,7 +732,7 @@ static int virLockManagerSanlockCreateLease(struct sanlk_resource
*res)
static int virLockManagerSanlockAddResource(virLockManagerPtr lock,
- unsigned int type,
+ virLockManagerResourceType type,
const char *name,
size_t nparams,
virLockManagerParamPtr params,
diff --git a/src/locking/lock_manager.c b/src/locking/lock_manager.c
index 8fc82c8..83684f2 100644
--- a/src/locking/lock_manager.c
+++ b/src/locking/lock_manager.c
@@ -295,7 +295,7 @@ virLockDriverPtr virLockManagerPluginGetDriver(virLockManagerPluginPtr
plugin)
* Returns a new lock manager context
*/
virLockManagerPtr virLockManagerNew(virLockDriverPtr driver,
- unsigned int type,
+ virLockManagerObjectType type,
size_t nparams,
virLockManagerParamPtr params,
unsigned int flags)
@@ -322,7 +322,7 @@ virLockManagerPtr virLockManagerNew(virLockDriverPtr driver,
int virLockManagerAddResource(virLockManagerPtr lock,
- unsigned int type,
+ virLockManagerResourceType type,
const char *name,
size_t nparams,
virLockManagerParamPtr params,
diff --git a/src/locking/lock_manager.h b/src/locking/lock_manager.h
index 4c2236f..0f85a7b 100644
--- a/src/locking/lock_manager.h
+++ b/src/locking/lock_manager.h
@@ -41,13 +41,13 @@ bool virLockManagerPluginUsesState(virLockManagerPluginPtr plugin);
virLockDriverPtr virLockManagerPluginGetDriver(virLockManagerPluginPtr plugin);
virLockManagerPtr virLockManagerNew(virLockDriverPtr driver,
- unsigned int type,
+ virLockManagerObjectType type,
size_t nparams,
virLockManagerParamPtr params,
unsigned int flags);
int virLockManagerAddResource(virLockManagerPtr manager,
- unsigned int type,
+ virLockManagerResourceType type,
const char *name,
size_t nparams,
virLockManagerParamPtr params,
--
2.4.9