[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 1/2] libxl_internal: lock_carefd -> carefd
lock_ prefix is redundant. Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx> Cc: Ian Campbell <ian.campbell@xxxxxxxxxx> Cc: Ian Jackson <ian.jackson@xxxxxxxxxxxxx> --- 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 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |