From: Ian Jackson Subject: [PATCH 02/29] libxl: Comment cleanups Date: Tue, 10 Feb 2015 20:09:49 +0000 Message-ID: <1423599016-32639-3-git-send-email-ian.jackson@eu.citrix.com> References: <1423599016-32639-1-git-send-email-ian.jackson@eu.citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1423599016-32639-1-git-send-email-ian.jackson@eu.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.xensource.com Cc: Ian Jackson , Yang Hongyang , Euan Harris , Lai Jiangshan , Wen Congyang List-Id: xen-devel@lists.xenproject.org * Add two comments in libxl_remus_disk_drbd documenting buggy handling of the hotplug script exit status. * Add a section heading for async exec in libxl_aoutils.c * Mention the right function name (libxl__ev_child_fork, not libxl__ev_fork) in libxl_internal.h Signed-off-by: Ian Jackson CC: Yang Hongyang CC: Wen Congyang CC: Lai Jiangshan --- v2: New patch in this version of the series. --- tools/libxl/libxl_aoutils.c | 2 ++ tools/libxl/libxl_internal.h | 2 +- tools/libxl/libxl_remus_disk_drbd.c | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/libxl/libxl_aoutils.c b/tools/libxl/libxl_aoutils.c index b10d2e1..44dc222 100644 --- a/tools/libxl/libxl_aoutils.c +++ b/tools/libxl/libxl_aoutils.c @@ -451,6 +451,8 @@ int libxl__openptys(libxl__openpty_state *op, return rc; } +/*----- async exec -----*/ + static void async_exec_timeout(libxl__egc *egc, libxl__ev_time *ev, const struct timeval *requested_abs) diff --git a/tools/libxl/libxl_internal.h b/tools/libxl/libxl_internal.h index 934465a..99db92a 100644 --- a/tools/libxl/libxl_internal.h +++ b/tools/libxl/libxl_internal.h @@ -1393,7 +1393,7 @@ _hidden int libxl__spawn_record_pid(libxl__gc*, libxl__spawn_state*, * This is a NOT function for waiting for ordinary child processes. * If you want to run (fork/exec/wait) subprocesses from libxl: * - Make your libxl entrypoint use the ao machinery - * - Use libxl__ev_fork, and use the callback programming style + * - Use libxl__ev_child_fork, and use the callback programming style * * This function is intended for interprocess communication with a * service process. If the service process does not respond quickly, diff --git a/tools/libxl/libxl_remus_disk_drbd.c b/tools/libxl/libxl_remus_disk_drbd.c index 3215f93..afe9b61 100644 --- a/tools/libxl/libxl_remus_disk_drbd.c +++ b/tools/libxl/libxl_remus_disk_drbd.c @@ -145,6 +145,8 @@ static void match_async_exec_cb(libxl__egc *egc, if (status) { rc = ERROR_REMUS_DEVOPS_DOES_NOT_MATCH; + /* BUG: seems to assume that any exit status means `no match' */ + /* BUG: exit status will have been logged as an error */ goto out; } -- 1.7.10.4