From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55857) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZM8Ps-0005om-Vv for qemu-devel@nongnu.org; Mon, 03 Aug 2015 01:36:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZM8Pp-0003AE-KA for qemu-devel@nongnu.org; Mon, 03 Aug 2015 01:36:04 -0400 Received: from e28smtp02.in.ibm.com ([122.248.162.2]:37084) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZM8Po-00039i-UI for qemu-devel@nongnu.org; Mon, 03 Aug 2015 01:36:01 -0400 Received: from /spool/local by e28smtp02.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 3 Aug 2015 11:05:57 +0530 From: Bharata B Rao Date: Mon, 3 Aug 2015 11:05:39 +0530 Message-Id: <1438580143-587-2-git-send-email-bharata@linux.vnet.ibm.com> In-Reply-To: <1438580143-587-1-git-send-email-bharata@linux.vnet.ibm.com> References: <1438580143-587-1-git-send-email-bharata@linux.vnet.ibm.com> Subject: [Qemu-devel] [RFC PATCH v0 1/5] spapr: Provide better error message when slots exceed max allowed List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: mdroth@linux.vnet.ibm.com, agraf@suse.de, qemu-ppc@nongnu.org, Bharata B Rao , nfont@linux.vnet.ibm.com, david@gibson.dropbear.id.au Currently when user specifies more slots than allowed max of SPAPR_MAX_RAM_SLOTS (32), we error out like this: qemu-system-ppc64: unsupported amount of memory slots: 64 Let the user know about the max allowed slots like this: qemu-system-ppc64: Specified number of memory slots 64 exceeds max supported 32 Signed-off-by: Bharata B Rao --- hw/ppc/spapr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index 6e24bf9..6d9cbd9 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -1777,8 +1777,8 @@ static void ppc_spapr_init(MachineState *machine) ram_addr_t hotplug_mem_size = machine->maxram_size - machine->ram_size; if (machine->ram_slots > SPAPR_MAX_RAM_SLOTS) { - error_report("unsupported amount of memory slots: %"PRIu64, - machine->ram_slots); + error_report("Specified number of memory slots %"PRIu64" exceeds max supported %d\n", + machine->ram_slots, SPAPR_MAX_RAM_SLOTS); exit(EXIT_FAILURE); } -- 2.1.0