diff --git a/src/Makefile.am b/src/Makefile.am index aa5ab6929b..0e0db9bac6 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -249,6 +249,7 @@ MAINTAINERCLEANFILES += $(LOCK_DAEMON_GENERATED) LOCK_DRIVER_LOCKD_SOURCES = \ locking/lock_driver_lockd.c \ + locking/lock_driver_lockd.h \ $(NULL) LOCK_DAEMON_SOURCES = \ diff --git a/src/lock_protocol-structs b/src/lock_protocol-structs index 8e8b84fb3b..41be9ce347 100644 --- a/src/lock_protocol-structs +++ b/src/lock_protocol-structs @@ -26,10 +26,6 @@ struct virLockSpaceProtocolDeleteResourceArgs { virLockSpaceProtocolNonNullString name; u_int flags; }; -enum virLockSpaceProtocolAcquireResourceFlags { - VIR_LOCK_SPACE_PROTOCOL_ACQUIRE_RESOURCE_SHARED = 1, - VIR_LOCK_SPACE_PROTOCOL_ACQUIRE_RESOURCE_AUTOCREATE = 2, -}; struct virLockSpaceProtocolAcquireResourceArgs { virLockSpaceProtocolNonNullString path; virLockSpaceProtocolNonNullString name; diff --git a/src/locking/lock_driver_lockd.c b/src/locking/lock_driver_lockd.c index 5b89ca142b..1812611705 100644 --- a/src/locking/lock_driver_lockd.c +++ b/src/locking/lock_driver_lockd.c @@ -34,6 +34,8 @@ #include "configmake.h" #include "virstring.h" +#include "lock_driver_lockd.h" + #define VIR_FROM_THIS VIR_FROM_LOCKING VIR_LOG_INIT("locking.lock_driver_lockd"); diff --git a/src/locking/lock_driver_lockd.h b/src/locking/lock_driver_lockd.h new file mode 100644 index 0000000000..baf346adaf --- /dev/null +++ b/src/locking/lock_driver_lockd.h @@ -0,0 +1,30 @@ +/* + * lock_driver_lockd.h: Locking for domain lifecycle operations + * + * Copyright (C) 2010-2011 Red Hat, Inc. + * + * 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 + * . + * + */ + +#ifndef __VIR_LOCK_DRIVER_LOCKD_H__ +# define __VIR_LOCK_DRIVER_LOCKD_H__ + +enum virLockSpaceProtocolAcquireResourceFlags { + VIR_LOCK_SPACE_PROTOCOL_ACQUIRE_RESOURCE_SHARED = 1, + VIR_LOCK_SPACE_PROTOCOL_ACQUIRE_RESOURCE_AUTOCREATE = 2, +}; + +#endif /* __VIR_LOCK_DRIVER_LOCKD_H__ */ diff --git a/src/locking/lock_protocol.x b/src/locking/lock_protocol.x index a77a78490c..6d4cec39e2 100644 --- a/src/locking/lock_protocol.x +++ b/src/locking/lock_protocol.x @@ -2,6 +2,7 @@ */ %#include "internal.h" +%#include "lock_driver_lockd.h" typedef opaque virLockSpaceProtocolUUID[VIR_UUID_BUFLEN]; @@ -50,11 +51,6 @@ struct virLockSpaceProtocolDeleteResourceArgs { unsigned int flags; }; -enum virLockSpaceProtocolAcquireResourceFlags { - VIR_LOCK_SPACE_PROTOCOL_ACQUIRE_RESOURCE_SHARED = 1, - VIR_LOCK_SPACE_PROTOCOL_ACQUIRE_RESOURCE_AUTOCREATE = 2 -}; - struct virLockSpaceProtocolAcquireResourceArgs { virLockSpaceProtocolNonNullString path; virLockSpaceProtocolNonNullString name;