Received: from eggs.gnu.org ([2001:4830:134:3::10]:51040) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YzjPD-0005Cq-6C for qemu-devel@nongnu.org; Tue, 02 Jun 2015 06:26:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YzjPC-00089W-BE for qemu-devel@nongnu.org; Tue, 02 Jun 2015 06:26:47 -0400 Date: Tue, 2 Jun 2015 18:26:37 +0800 From: Fam Zheng Message-ID: <20150602102637.GD22059@dhcp-14-238.nay.redhat.com> References: <1433237561-10846-1-git-send-email-famz@redhat.com> <556D8266.8060004@msgid.tls.msk.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <556D8266.8060004@msgid.tls.msk.ru> 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: Michael Tokarev Cc: Kevin Wolf , qemu-trivial@nongnu.org, Jeff Cody , qemu-devel@nongnu.org, qemu-block@nongnu.org On Tue, 06/02 13:16, Michael Tokarev wrote: > 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)); The reason I didn't use a one-liner was, "git grep 'failed to load vmstate'" in the code base would just work, besides my eyes also like the readability. > > (note also the addition of ":") Yes that applies to all error_report() in this file. > (besides what Kevin said). > > Thanks, Thanks, Fam