From patchwork Thu May 5 20:18:08 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Douglas Goldstein X-Patchwork-Id: 9027231 Return-Path: X-Original-To: patchwork-xen-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 9C18C9F372 for ; Thu, 5 May 2016 20:20:20 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id ABAA1203C3 for ; Thu, 5 May 2016 20:20:19 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C9BCD203B7 for ; Thu, 5 May 2016 20:20:18 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ayPj7-0000SD-UH; Thu, 05 May 2016 20:18:25 +0000 Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ayPj7-0000S5-74 for xen-devel@lists.xen.org; Thu, 05 May 2016 20:18:25 +0000 Received: from [193.109.254.147] by server-9.bemta-14.messagelabs.com id A1/38-02960-09AAB275; Thu, 05 May 2016 20:18:24 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprBIsWRWlGSWpSXmKPExsVyMXThYd3+Vdr hBr879CyWfFzM4sDocXT3b6YAxijWzLyk/IoE1ozXG/cwFXwVqGh9tZy9gfEJbxcjF4eQwCRG iY6Zr5hBHBaBdmaJTxtWMoI4EgLvWCReLFgB5HACOTESLdtb2LsYOYDsSoldW8VAwkICChK/J xxigpg0hUli6d/3TCAJNgENiSe/ZrCB2CIC0hLXPl8Gm8MsUCDR0vcTzBYWcJJYd38SWD2LgK rEpWmtYPW8Ag4Se9ffZYLYJSex4L3PBEa+BYwMqxjVi1OLylKLdM30kooy0zNKchMzc3QNDU3 0clOLixPTU3MSk4r1kvNzNzECw4QBCHYw/p3gfIhRkoNJSZR3u5J2uBBfUn5KZUZicUZ8UWlO avEhRhkODiUJXqWVQDnBotT01Iq0zBxgwMKkJTh4lER4fUDSvMUFibnFmekQqVOM9hxbfl9by 8TxaeMdILlt6j0gOW/SrmNMQix5+XmpUuK8wSBtAiBtGaV5cENhEXaJUVZKmJcR6EwhnoLUot zMElT5V4ziHIxKwrzxIFN4MvNK4Ha/AjqLCeis93M1Qc4qSURISTUwlldkMt5gsOt9tp/VuVa VxYvr7ZWD9lM/Zz3PF567Ldoylj8t7r3iHa3u5HWCh+4bqtUEH1F/LnCQ9T5v++tMlp/Llh30 zG8X/mRSts7xzpXcQJ0/xfpdE92z/BPjZ01L+xBVvMgobVPSFMbLzQc03P8FVIlxzS7cbdwTf c11yovHwtM+fe1XYinOSDTUYi4qTgQAywyZFasCAAA= X-Env-Sender: cardoe@cardoe.com X-Msg-Ref: server-5.tower-27.messagelabs.com!1462479502!39807161!1 X-Originating-IP: [209.85.161.195] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 8.34; banners=-,-,- X-VirusChecked: Checked Received: (qmail 17275 invoked from network); 5 May 2016 20:18:23 -0000 Received: from mail-yw0-f195.google.com (HELO mail-yw0-f195.google.com) (209.85.161.195) by server-5.tower-27.messagelabs.com with AES128-GCM-SHA256 encrypted SMTP; 5 May 2016 20:18:23 -0000 Received: by mail-yw0-f195.google.com with SMTP id i22so13199513ywc.1 for ; Thu, 05 May 2016 13:18:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cardoe.com; s=google; h=from:to:cc:subject:date:message-id; bh=LB/2YgrgtWYbBsWJIanmkl8fL44mELq5egtIchYBKcE=; b=Fyljg6brywkw9o/SYJTmScWrs1y0xAHCcs7gV5kKjExMepAytEq2xcvpGwHO+Iho9O b2N7orymS2MBFw4+b8DOb3DZN3I/eYrOHeQm+TQQv80uMdtwXOa9Ts+rVlvKjd87+nkW 0YdqZJpJUyFoNIoyeTtA2yjXb65gFbDKKKw+4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=LB/2YgrgtWYbBsWJIanmkl8fL44mELq5egtIchYBKcE=; b=HgQD/vSTYS/s17J7jtCQrYWSu6lh1SfsMhQ6scZXASuqr3pitIhwu8KtTQbXZnHww/ By9fNxh3wLyo5lhgqlcjufE4rT9m9us9wib4HnOUywuuj/sDN4vZG/Vao1zZ7GZrzgC/ 79gdmQFAMxc5QZo/uwA9H6AEMTQK1ySALRN4rcNaat2nBcd2yX32VkjRlV0Dt3xxZJTb Z6abv4fJnodfUMMolCVN4Xb1ue4VAkxIPWX7c5QJNMumiiewotpstUc6DxXn5bI7PAWR O0RTIUcCMhNVHmXVjrUdXuFs9Qut6wmTHWVm4X/jst/u+GwfQJYikf2XJ27IMAyLvOSC dqZw== X-Gm-Message-State: AOPr4FVwfF7Jd9l29i0Dq1zCCC4d06ITj/v5qNyDgd2Xj0cwmclUVLv4QCSyfmQG/SowYw== X-Received: by 10.37.224.13 with SMTP id x13mr9837739ybg.125.1462479502200; Thu, 05 May 2016 13:18:22 -0700 (PDT) Received: from swanson.lan (c-68-46-196-185.hsd1.al.comcast.net. [68.46.196.185]) by smtp.gmail.com with ESMTPSA id r203sm6564647ywg.36.2016.05.05.13.18.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 05 May 2016 13:18:21 -0700 (PDT) From: Doug Goldstein To: xen-devel@lists.xen.org Date: Thu, 5 May 2016 15:18:08 -0500 Message-Id: <1462479489-5320-1-git-send-email-cardoe@cardoe.com> X-Mailer: git-send-email 2.7.3 Cc: Ian Jackson , Wei Liu , Doug Goldstein Subject: [Xen-devel] [PATCH for-4.7 1/2] init: drop GNU-isms for sleep command X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Most implementations of the sleep command only take integers. GNU coreutils has a GNU extension to allow any floating point number to be passed but we shouldn't depend on that. Signed-off-by: Doug Goldstein Reviewed-by: Andrew Cooper --- tools/hotplug/Linux/block-iscsi | 2 +- tools/hotplug/Linux/init.d/xencommons.in | 4 ++-- tools/hotplug/Linux/init.d/xendriverdomain.in | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/hotplug/Linux/block-iscsi b/tools/hotplug/Linux/block-iscsi index 8e36852..3615905 100644 --- a/tools/hotplug/Linux/block-iscsi +++ b/tools/hotplug/Linux/block-iscsi @@ -74,7 +74,7 @@ find_device() { count=0 while [ ! -e /dev/disk/by-path/*"$iqn"-lun-0 ]; do - sleep 0.1 + sleep 1 count=`expr $count + 1` if [ count = 100 ]; then # 10s timeout while waiting for iSCSI disk to settle diff --git a/tools/hotplug/Linux/init.d/xencommons.in b/tools/hotplug/Linux/init.d/xencommons.in index 21e9133..eeac8ab 100644 --- a/tools/hotplug/Linux/init.d/xencommons.in +++ b/tools/hotplug/Linux/init.d/xencommons.in @@ -107,14 +107,14 @@ do_stop () { echo Stopping xenconsoled if read 2>/dev/null <$XENCONSOLED_PIDFILE pid; then kill $pid - while kill -9 $pid >/dev/null 2>&1; do sleep 0.1; done + while kill -9 $pid >/dev/null 2>&1; do sleep 1; done rm -f $XENCONSOLED_PIDFILE fi echo Stopping QEMU if read 2>/dev/null <$QEMU_PIDFILE pid; then kill $pid - while kill -9 $pid >/dev/null 2>&1; do sleep 0.1; done + while kill -9 $pid >/dev/null 2>&1; do sleep 1; done rm -f $QEMU_PIDFILE fi diff --git a/tools/hotplug/Linux/init.d/xendriverdomain.in b/tools/hotplug/Linux/init.d/xendriverdomain.in index dd5f3a3..3720dea 100644 --- a/tools/hotplug/Linux/init.d/xendriverdomain.in +++ b/tools/hotplug/Linux/init.d/xendriverdomain.in @@ -56,7 +56,7 @@ do_stop () { echo Stopping xl devd... if read 2>/dev/null <$XLDEVD_PIDFILE pid; then kill $pid - while kill -9 $pid >/dev/null 2>&1; do sleep 0.1; done + while kill -9 $pid >/dev/null 2>&1; do sleep 1; done rm -f $XLDEVD_PIDFILE fi }