From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from userp1040.oracle.com ([156.151.31.81]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cap8x-0000IU-KY for kexec@lists.infradead.org; Mon, 06 Feb 2017 19:40:12 +0000 From: Eric DeVolder Subject: [PATCH v2 10/12] crashdump/sh: Add print_crashkernel_region_size() function Date: Mon, 6 Feb 2017 13:42:22 -0600 Message-Id: <1486410144-28595-11-git-send-email-eric.devolder@oracle.com> In-Reply-To: <1486410144-28595-1-git-send-email-eric.devolder@oracle.com> References: <1486410144-28595-1-git-send-email-eric.devolder@oracle.com> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "kexec" Errors-To: kexec-bounces+dwmw2=infradead.org@lists.infradead.org To: horms@verge.net.au, kexec@lists.infradead.org, andrew.cooper3@citrix.com, dyoung@redhat.com Cc: daniel.kiper@oracle.com, konrad.wilk@oracle.com From: Daniel Kiper Follow similar x86 patch. Signed-off-by: Daniel Kiper Signed-off-by: Eric DeVolder --- kexec/arch/sh/crashdump-sh.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/kexec/arch/sh/crashdump-sh.c b/kexec/arch/sh/crashdump-sh.c index 9e6af6b..6556eb1 100644 --- a/kexec/arch/sh/crashdump-sh.c +++ b/kexec/arch/sh/crashdump-sh.c @@ -178,3 +178,13 @@ int is_crashkernel_mem_reserved(void) return parse_iomem_single("Crash kernel\n", &start, &end) == 0 ? (start != end) : 0; } + +void print_crashkernel_region_size(void) +{ + uint64_t start, end; + + if (!parse_iomem_single("Crash kernel\n", &start, &end) && start != end) + printf("%lu\n", end - start + 1); + else + printf("0\n"); +} -- 2.7.4 _______________________________________________ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec