From: Wei Liu Subject: [PATCH 1/2] libxl_internal: lock_carefd -> carefd Date: Wed, 7 Jan 2015 15:22:59 +0000 Message-ID: <1420644180-7733-2-git-send-email-wei.liu2@citrix.com> References: <1420644180-7733-1-git-send-email-wei.liu2@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1420644180-7733-1-git-send-email-wei.liu2@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xen.org Cc: Ian Jackson , Wei Liu , Ian Campbell List-Id: xen-devel@lists.xenproject.org lock_ prefix is redundant. Signed-off-by: Wei Liu Cc: Ian Campbell Cc: Ian Jackson --- tools/libxl/libxl_internal.c | 6 +++--- tools/libxl/libxl_internal.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/libxl/libxl_internal.c b/tools/libxl/libxl_internal.c index 00c3b1e..9d8025d 100644 --- a/tools/libxl/libxl_internal.c +++ b/tools/libxl/libxl_internal.c @@ -405,7 +405,7 @@ libxl__domain_userdata_lock *libxl__lock_domain_userdata(libxl__gc *gc, fd = open(lockfile, O_RDWR|O_CREAT, 0666); if (fd < 0) LOGE(ERROR, "cannot open lockfile %s, errno=%d", lockfile, errno); - lock->lock_carefd = libxl__carefd_opened(CTX, fd); + lock->carefd = libxl__carefd_opened(CTX, fd); if (fd < 0) goto out; /* Lock the file in exclusive mode, wait indefinitely to @@ -440,7 +440,7 @@ libxl__domain_userdata_lock *libxl__lock_domain_userdata(libxl__gc *gc, break; } - libxl__carefd_close(lock->lock_carefd); + libxl__carefd_close(lock->carefd); } /* Check the domain is still there, if not we should release the @@ -459,7 +459,7 @@ out: void libxl__unlock_domain_userdata(libxl__domain_userdata_lock *lock) { if (lock->path) unlink(lock->path); - if (lock->lock_carefd) libxl__carefd_close(lock->lock_carefd); + if (lock->carefd) libxl__carefd_close(lock->carefd); free(lock->path); free(lock); } diff --git a/tools/libxl/libxl_internal.h b/tools/libxl/libxl_internal.h index 9695f18..3a4e222 100644 --- a/tools/libxl/libxl_internal.h +++ b/tools/libxl/libxl_internal.h @@ -3522,7 +3522,7 @@ int libxl__cpuid_policy_is_empty(libxl_cpuid_policy_list *pl); /* Portability note: a proper flock(2) implementation is required */ typedef struct { - libxl__carefd *lock_carefd; + libxl__carefd *carefd; char *path; /* path of the lock file itself */ } libxl__domain_userdata_lock; libxl__domain_userdata_lock *libxl__lock_domain_userdata(libxl__gc *gc, -- 1.7.10.4