From owner-svn-src-all@FreeBSD.ORG Wed Oct 8 20:25:25 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E98A3284; Wed, 8 Oct 2014 20:25:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CAB2A8DA; Wed, 8 Oct 2014 20:25:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s98KPOTt092742; Wed, 8 Oct 2014 20:25:24 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s98KPLHK092724; Wed, 8 Oct 2014 20:25:21 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201410082025.s98KPLHK092724@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Wed, 8 Oct 2014 20:25:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272766 - in head/sys: amd64/amd64 amd64/include arm/arm arm/include i386/i386 i386/include mips/include mips/mips x86/x86 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Oct 2014 20:25:25 -0000 Author: markj Date: Wed Oct 8 20:25:21 2014 New Revision: 272766 URL: https://svnweb.freebsd.org/changeset/base/272766 Log: Pass up the error status of minidumpsys() to its callers. PR: 193761 Submitted by: Conrad Meyer Sponsored by: EMC / Isilon Storage Division Modified: head/sys/amd64/amd64/minidump_machdep.c head/sys/amd64/include/md_var.h head/sys/arm/arm/dump_machdep.c head/sys/arm/arm/minidump_machdep.c head/sys/arm/include/md_var.h head/sys/i386/i386/minidump_machdep.c head/sys/i386/include/md_var.h head/sys/mips/include/md_var.h head/sys/mips/mips/dump_machdep.c head/sys/mips/mips/minidump_machdep.c head/sys/x86/x86/dump_machdep.c Modified: head/sys/amd64/amd64/minidump_machdep.c ============================================================================== --- head/sys/amd64/amd64/minidump_machdep.c Wed Oct 8 19:54:42 2014 (r272765) +++ head/sys/amd64/amd64/minidump_machdep.c Wed Oct 8 20:25:21 2014 (r272766) @@ -215,7 +215,7 @@ blk_write(struct dumperinfo *di, char *p /* A fake page table page, to avoid having to handle both 4K and 2M pages */ static pd_entry_t fakepd[NPDEPG]; -void +int minidumpsys(struct dumperinfo *di) { uint32_t pmapsize; @@ -441,7 +441,7 @@ minidumpsys(struct dumperinfo *di) /* Signal completion, signoff and exit stage left. */ dump_write(di, NULL, 0, 0, 0); printf("\nDump complete\n"); - return; + return (0); fail: if (error < 0) @@ -462,6 +462,7 @@ minidumpsys(struct dumperinfo *di) printf("Dump failed. Partition too small.\n"); else printf("** DUMP FAILED (ERROR %d) **\n", error); + return (error); } void Modified: head/sys/amd64/include/md_var.h ============================================================================== --- head/sys/amd64/include/md_var.h Wed Oct 8 19:54:42 2014 (r272765) +++ head/sys/amd64/include/md_var.h Wed Oct 8 20:25:21 2014 (r272766) @@ -118,7 +118,7 @@ void pagezero(void *addr); void printcpuinfo(void); void setidt(int idx, alias_for_inthand_t *func, int typ, int dpl, int ist); int user_dbreg_trap(void); -void minidumpsys(struct dumperinfo *); +int minidumpsys(struct dumperinfo *); struct savefpu *get_pcb_user_save_td(struct thread *td); struct savefpu *get_pcb_user_save_pcb(struct pcb *pcb); struct pcb *get_pcb_td(struct thread *td); Modified: head/sys/arm/arm/dump_machdep.c ============================================================================== --- head/sys/arm/arm/dump_machdep.c Wed Oct 8 19:54:42 2014 (r272765) +++ head/sys/arm/arm/dump_machdep.c Wed Oct 8 20:25:21 2014 (r272766) @@ -280,10 +280,8 @@ dumpsys(struct dumperinfo *di) size_t hdrsz; int error; - if (do_minidump) { - minidumpsys(di); - return (0); - } + if (do_minidump) + return (minidumpsys(di)); bzero(&ehdr, sizeof(ehdr)); ehdr.e_ident[EI_MAG0] = ELFMAG0; Modified: head/sys/arm/arm/minidump_machdep.c ============================================================================== --- head/sys/arm/arm/minidump_machdep.c Wed Oct 8 19:54:42 2014 (r272765) +++ head/sys/arm/arm/minidump_machdep.c Wed Oct 8 20:25:21 2014 (r272766) @@ -196,7 +196,7 @@ blk_write_cont(struct dumperinfo *di, vm /* A fake page table page, to avoid having to handle both 4K and 2M pages */ static pt_entry_t fakept[NPTEPG]; -void +int minidumpsys(struct dumperinfo *di) { struct minidumphdr mdhdr; @@ -460,7 +460,7 @@ minidumpsys(struct dumperinfo *di) /* Signal completion, signoff and exit stage left. */ dump_write(di, NULL, 0, 0, 0); printf("\nDump complete\n"); - return; + return (0); fail: if (error < 0) @@ -472,6 +472,7 @@ fail: printf("\nDump failed. Partition too small.\n"); else printf("\n** DUMP FAILED (ERROR %d) **\n", error); + return (error); } void Modified: head/sys/arm/include/md_var.h ============================================================================== --- head/sys/arm/include/md_var.h Wed Oct 8 19:54:42 2014 (r272765) +++ head/sys/arm/include/md_var.h Wed Oct 8 20:25:21 2014 (r272766) @@ -68,6 +68,6 @@ extern int busdma_swi_pending; void busdma_swi(void); void dump_add_page(vm_paddr_t); void dump_drop_page(vm_paddr_t); -void minidumpsys(struct dumperinfo *); +int minidumpsys(struct dumperinfo *); #endif /* !_MACHINE_MD_VAR_H_ */ Modified: head/sys/i386/i386/minidump_machdep.c ============================================================================== --- head/sys/i386/i386/minidump_machdep.c Wed Oct 8 19:54:42 2014 (r272765) +++ head/sys/i386/i386/minidump_machdep.c Wed Oct 8 20:25:21 2014 (r272766) @@ -178,7 +178,7 @@ blk_write(struct dumperinfo *di, char *p /* A fake page table page, to avoid having to handle both 4K and 2M pages */ static pt_entry_t fakept[NPTEPG]; -void +int minidumpsys(struct dumperinfo *di) { uint64_t dumpsize; @@ -377,7 +377,7 @@ minidumpsys(struct dumperinfo *di) /* Signal completion, signoff and exit stage left. */ dump_write(di, NULL, 0, 0, 0); printf("\nDump complete\n"); - return; + return (0); fail: if (error < 0) @@ -389,6 +389,7 @@ minidumpsys(struct dumperinfo *di) printf("\nDump failed. Partition too small.\n"); else printf("\n** DUMP FAILED (ERROR %d) **\n", error); + return (error); } void Modified: head/sys/i386/include/md_var.h ============================================================================== --- head/sys/i386/include/md_var.h Wed Oct 8 19:54:42 2014 (r272765) +++ head/sys/i386/include/md_var.h Wed Oct 8 20:25:21 2014 (r272766) @@ -113,6 +113,6 @@ void ppro_reenable_apic(void); void printcpuinfo(void); void setidt(int idx, alias_for_inthand_t *func, int typ, int dpl, int selec); int user_dbreg_trap(void); -void minidumpsys(struct dumperinfo *); +int minidumpsys(struct dumperinfo *); #endif /* !_MACHINE_MD_VAR_H_ */ Modified: head/sys/mips/include/md_var.h ============================================================================== --- head/sys/mips/include/md_var.h Wed Oct 8 19:54:42 2014 (r272765) +++ head/sys/mips/include/md_var.h Wed Oct 8 20:25:21 2014 (r272766) @@ -79,5 +79,5 @@ void busdma_swi(void); struct dumperinfo; void dump_add_page(vm_paddr_t); void dump_drop_page(vm_paddr_t); -void minidumpsys(struct dumperinfo *); +int minidumpsys(struct dumperinfo *); #endif /* !_MACHINE_MD_VAR_H_ */ Modified: head/sys/mips/mips/dump_machdep.c ============================================================================== --- head/sys/mips/mips/dump_machdep.c Wed Oct 8 19:54:42 2014 (r272765) +++ head/sys/mips/mips/dump_machdep.c Wed Oct 8 20:25:21 2014 (r272766) @@ -266,10 +266,8 @@ dumpsys(struct dumperinfo *di) size_t hdrsz; int error; - if (do_minidump) { - minidumpsys(di); - return (0); - } + if (do_minidump) + return (minidumpsys(di)); bzero(&ehdr, sizeof(ehdr)); ehdr.e_ident[EI_MAG0] = ELFMAG0; Modified: head/sys/mips/mips/minidump_machdep.c ============================================================================== --- head/sys/mips/mips/minidump_machdep.c Wed Oct 8 19:54:42 2014 (r272765) +++ head/sys/mips/mips/minidump_machdep.c Wed Oct 8 20:25:21 2014 (r272766) @@ -153,7 +153,7 @@ write_buffer(struct dumperinfo *di, char return (0); } -void +int minidumpsys(struct dumperinfo *di) { struct minidumphdr mdhdr; @@ -325,7 +325,7 @@ minidumpsys(struct dumperinfo *di) /* Signal completion, signoff and exit stage left. */ dump_write(di, NULL, 0, 0, 0); printf("\nDump complete\n"); - return; + return (0); fail: if (error < 0) @@ -337,4 +337,5 @@ fail: printf("\nDump failed. Partition too small.\n"); else printf("\n** DUMP FAILED (ERROR %d) **\n", error); + return (error); } Modified: head/sys/x86/x86/dump_machdep.c ============================================================================== --- head/sys/x86/x86/dump_machdep.c Wed Oct 8 19:54:42 2014 (r272765) +++ head/sys/x86/x86/dump_machdep.c Wed Oct 8 20:25:21 2014 (r272766) @@ -275,10 +275,9 @@ dumpsys(struct dumperinfo *di) size_t hdrsz; int error; - if (do_minidump) { - minidumpsys(di); - return (0); - } + if (do_minidump) + return (minidumpsys(di)); + bzero(&ehdr, sizeof(ehdr)); ehdr.e_ident[EI_MAG0] = ELFMAG0; ehdr.e_ident[EI_MAG1] = ELFMAG1;