Date: Thu, 17 Mar 2011 21:24:33 +0000 (UTC) From: John Baldwin <jhb@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r219722 - head/usr.sbin/mfiutil Message-ID: <201103172124.p2HLOX2S039526@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jhb Date: Thu Mar 17 21:24:32 2011 New Revision: 219722 URL: http://svn.freebsd.org/changeset/base/219722 Log: Preserve errno in an error case. Submitted by: gcooper Modified: head/usr.sbin/mfiutil/mfi_show.c Modified: head/usr.sbin/mfiutil/mfi_show.c ============================================================================== --- head/usr.sbin/mfiutil/mfi_show.c Thu Mar 17 21:02:14 2011 (r219721) +++ head/usr.sbin/mfiutil/mfi_show.c Thu Mar 17 21:24:32 2011 (r219722) @@ -174,8 +174,9 @@ show_battery(int ac, char **av) if (mfi_dcmd_command(fd, MFI_DCMD_BBU_GET_STATUS, &stat, sizeof(stat), NULL, 0, NULL) < 0) { + error = errno; warn("Failed to get status"); - return (errno); + return (error); } printf("mfi%d: Battery State:\n", mfi_unit);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201103172124.p2HLOX2S039526>