Received: from eggs.gnu.org ([2001:4830:134:3::10]:48045) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YzjF0-00079R-7O for qemu-devel@nongnu.org; Tue, 02 Jun 2015 06:16:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YzjEz-0000Nf-Fd for qemu-devel@nongnu.org; Tue, 02 Jun 2015 06:16:14 -0400 Message-ID: <556D8266.8060004@msgid.tls.msk.ru> Date: Tue, 02 Jun 2015 13:16:06 +0300 From: Michael Tokarev MIME-Version: 1.0 References: <1433237561-10846-1-git-send-email-famz@redhat.com> In-Reply-To: <1433237561-10846-1-git-send-email-famz@redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] sheepdog: Fix error message if failed to load vmstate List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Fam Zheng , qemu-devel@nongnu.org Cc: Kevin Wolf , qemu-trivial@nongnu.org, Jeff Cody , qemu-block@nongnu.org 02.06.2015 12:32, Fam Zheng wrote: > if (ret < 0) { > - error_report("failed to save vmstate %s", strerror(errno)); > + if (load) { > + error_report("failed to load vmstate %s", strerror(errno)); > + } else { > + error_report("failed to save vmstate %s", strerror(errno)); > + } + error_report("failed to %s vmstate: %s", load ? "load" : "save", strerror(errno)); (note also the addition of ":") (besides what Kevin said). Thanks, /mjt