From owner-svn-src-stable-7@FreeBSD.ORG Sun Sep 23 20:16:46 2012 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2F897106564A; Sun, 23 Sep 2012 20:16:46 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1AEA88FC14; Sun, 23 Sep 2012 20:16:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8NKGjrX068305; Sun, 23 Sep 2012 20:16:45 GMT (envelope-from sbruno@svn.freebsd.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8NKGjnj068303; Sun, 23 Sep 2012 20:16:45 GMT (envelope-from sbruno@svn.freebsd.org) Message-Id: <201209232016.q8NKGjnj068303@svn.freebsd.org> From: Sean Bruno Date: Sun, 23 Sep 2012 20:16:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240872 - stable/7/sys/dev/mfi X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Sep 2012 20:16:46 -0000 Author: sbruno Date: Sun Sep 23 20:16:45 2012 New Revision: 240872 URL: http://svn.freebsd.org/changeset/base/240872 Log: MFC r238373 sys/dev/mfivar.h contains references to MFI_DEBUG, but it never gets turned on unless the file also includes opt_mfi.h. Submitted by: Andrew Boyer aboyer@averesystems.com Modified: stable/7/sys/dev/mfi/mfivar.h Directory Properties: stable/7/sys/ (props changed) Modified: stable/7/sys/dev/mfi/mfivar.h ============================================================================== --- stable/7/sys/dev/mfi/mfivar.h Sun Sep 23 20:16:17 2012 (r240871) +++ stable/7/sys/dev/mfi/mfivar.h Sun Sep 23 20:16:45 2012 (r240872) @@ -61,6 +61,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include "opt_mfi.h" /* * SCSI structures and definitions are used from here, but no linking From owner-svn-src-stable-7@FreeBSD.ORG Sun Sep 23 20:24:25 2012 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 638051065764; Sun, 23 Sep 2012 20:24:25 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4BF358FC12; Sun, 23 Sep 2012 20:24:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8NKOP0l069719; Sun, 23 Sep 2012 20:24:25 GMT (envelope-from sbruno@svn.freebsd.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8NKOPdd069717; Sun, 23 Sep 2012 20:24:25 GMT (envelope-from sbruno@svn.freebsd.org) Message-Id: <201209232024.q8NKOPdd069717@svn.freebsd.org> From: Sean Bruno Date: Sun, 23 Sep 2012 20:24:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240875 - stable/7/sys/dev/mfi X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Sep 2012 20:24:26 -0000 Author: sbruno Date: Sun Sep 23 20:24:24 2012 New Revision: 240875 URL: http://svn.freebsd.org/changeset/base/240875 Log: MFC r238371 When an MFI command fails, the driver needs to set bio->bio_resid so that the upper levels notice. Otherwise we see commands silently failing leading to data corruption. This mirrors dadone() Submitted by: Andrew Boyer aboyer@averesystems.com Modified: stable/7/sys/dev/mfi/mfi_disk.c Directory Properties: stable/7/sys/ (props changed) Modified: stable/7/sys/dev/mfi/mfi_disk.c ============================================================================== --- stable/7/sys/dev/mfi/mfi_disk.c Sun Sep 23 20:24:17 2012 (r240874) +++ stable/7/sys/dev/mfi/mfi_disk.c Sun Sep 23 20:24:24 2012 (r240875) @@ -291,6 +291,7 @@ mfi_disk_complete(struct bio *bio) hdr = bio->bio_driver1; if (bio->bio_flags & BIO_ERROR) { + bio->bio_resid = bio->bio_bcount; if (bio->bio_error == 0) bio->bio_error = EIO; disk_err(bio, "hard error", -1, 1); From owner-svn-src-stable-7@FreeBSD.ORG Sun Sep 23 20:31:54 2012 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 04C46106571E; Sun, 23 Sep 2012 20:31:52 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BC39D8FC12; Sun, 23 Sep 2012 20:31:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8NKVqRc071095; Sun, 23 Sep 2012 20:31:52 GMT (envelope-from sbruno@svn.freebsd.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8NKVqW3071093; Sun, 23 Sep 2012 20:31:52 GMT (envelope-from sbruno@svn.freebsd.org) Message-Id: <201209232031.q8NKVqW3071093@svn.freebsd.org> From: Sean Bruno Date: Sun, 23 Sep 2012 20:31:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240878 - stable/7/sys/dev/aac X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Sep 2012 20:31:54 -0000 Author: sbruno Date: Sun Sep 23 20:31:52 2012 New Revision: 240878 URL: http://svn.freebsd.org/changeset/base/240878 Log: MFC r238601 On BIO_ERROR, set bio_resid to stop losing data in the error case. Submitted by: Mark Johnston Modified: stable/7/sys/dev/aac/aac_disk.c Directory Properties: stable/7/sys/ (props changed) Modified: stable/7/sys/dev/aac/aac_disk.c ============================================================================== --- stable/7/sys/dev/aac/aac_disk.c Sun Sep 23 20:31:45 2012 (r240877) +++ stable/7/sys/dev/aac/aac_disk.c Sun Sep 23 20:31:52 2012 (r240878) @@ -331,8 +331,10 @@ aac_biodone(struct bio *bp) { fwprintf(NULL, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); - if (bp->bio_flags & BIO_ERROR) + if (bp->bio_flags & BIO_ERROR) { + bp->bio_resid = bp->bio_bcount; disk_err(bp, "hard error", -1, 1); + } biodone(bp); } From owner-svn-src-stable-7@FreeBSD.ORG Tue Sep 25 01:28:16 2012 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8B15D106564A; Tue, 25 Sep 2012 01:28:16 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 30C298FC14; Tue, 25 Sep 2012 01:28:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8P1SGLb036254; Tue, 25 Sep 2012 01:28:16 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8P1SFWU036252; Tue, 25 Sep 2012 01:28:15 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201209250128.q8P1SFWU036252@svn.freebsd.org> From: Eitan Adler Date: Tue, 25 Sep 2012 01:28:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240905 - stable/7/sys/dev/ixgbe X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Sep 2012 01:28:16 -0000 Author: eadler Date: Tue Sep 25 01:28:15 2012 New Revision: 240905 URL: http://svn.freebsd.org/changeset/base/240905 Log: MFC r240466: Define missing DEBUGOUT# macros. DEBUGOUT[45] are not yet used but are being defined pre-emptively to avoid future build breakage PR: kern/168967 Approved by: cperciva (implicit) Modified: stable/7/sys/dev/ixgbe/ixgbe_osdep.h Directory Properties: stable/7/sys/ (props changed) Modified: stable/7/sys/dev/ixgbe/ixgbe_osdep.h ============================================================================== --- stable/7/sys/dev/ixgbe/ixgbe_osdep.h Tue Sep 25 01:28:14 2012 (r240904) +++ stable/7/sys/dev/ixgbe/ixgbe_osdep.h Tue Sep 25 01:28:15 2012 (r240905) @@ -67,12 +67,17 @@ #define DEBUGOUT1(S,A) printf(S "\n",A) #define DEBUGOUT2(S,A,B) printf(S "\n",A,B) #define DEBUGOUT3(S,A,B,C) printf(S "\n",A,B,C) + #define DEBUGOUT4(S,A,B,C,D) printf(S "\n",A,B,C,D) + #define DEBUGOUT5(S,A,B,C,D,E) printf(S "\n",A,B,C,D,E) + #define DEBUGOUT6(S,A,B,C,D,E,F) printf(S "\n",A,B,C,D,E,F) #define DEBUGOUT7(S,A,B,C,D,E,F,G) printf(S "\n",A,B,C,D,E,F,G) #else #define DEBUGOUT(S) #define DEBUGOUT1(S,A) #define DEBUGOUT2(S,A,B) #define DEBUGOUT3(S,A,B,C) + #define DEBUGOUT4(S,A,B,C,D) + #define DEBUGOUT5(S,A,B,C,D,E) #define DEBUGOUT6(S,A,B,C,D,E,F) #define DEBUGOUT7(S,A,B,C,D,E,F,G) #endif From owner-svn-src-stable-7@FreeBSD.ORG Tue Sep 25 01:31:33 2012 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 457FD1065740; Tue, 25 Sep 2012 01:31:31 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 624088FC1B; Tue, 25 Sep 2012 01:31:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8P1VVPH036799; Tue, 25 Sep 2012 01:31:31 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8P1VVcV036796; Tue, 25 Sep 2012 01:31:31 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201209250131.q8P1VVcV036796@svn.freebsd.org> From: Eitan Adler Date: Tue, 25 Sep 2012 01:31:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240908 - in stable/7/tools: diag diag/ac tools tools/backout_commit tools/mfc X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Sep 2012 01:31:33 -0000 Author: eadler Date: Tue Sep 25 01:31:30 2012 New Revision: 240908 URL: http://svn.freebsd.org/changeset/base/240908 Log: MFC r240470: Remove scripts and tools which only functioned when src was using CVS Approved by: cperciva (implicit) Deleted: stable/7/tools/diag/ac/ stable/7/tools/tools/backout_commit/ stable/7/tools/tools/mfc/ Modified: stable/7/tools/diag/README stable/7/tools/tools/README Directory Properties: stable/7/tools/diag/ (props changed) stable/7/tools/tools/ (props changed) Modified: stable/7/tools/diag/README ============================================================================== --- stable/7/tools/diag/README Tue Sep 25 01:31:24 2012 (r240907) +++ stable/7/tools/diag/README Tue Sep 25 01:31:30 2012 (r240908) @@ -8,8 +8,6 @@ the integrity. Please make a subdir per program, and add a brief description to this file. -ac Various scripts that checks of style/content correctness of - committers lists in doc/ area. dumpvfscache program that can be used to examine the contents of the vfs name cache. httpd-error check for Web files which does not exists on your host Modified: stable/7/tools/tools/README ============================================================================== --- stable/7/tools/tools/README Tue Sep 25 01:31:24 2012 (r240907) +++ stable/7/tools/tools/README Tue Sep 25 01:31:30 2012 (r240908) @@ -10,8 +10,6 @@ file. ansify Convert K&R-style function definitions to ANSI style ath Tools specific to the Atheros 802.11 support -backout_commit A tool for reading in a commit message and generating - a script that will backout the commit. commitsdb A tool for reconstructing commit history using md5 checksums of the commit logs. crypto Test and exercise tools related to the crypto framework @@ -38,8 +36,6 @@ kernelcruft Shellscript to find orphaned kerninclude Shellscript to find unused #includes in the kernel. kernxref Shellscript to cross reference symbols in the LINT kernel. kttcp An in-kernel version of the ttcp network performance tool -mfc Merge a directory from HEAD to a branch where it does not - already exist and other MFC related script(s). mid Create a Message-ID database for mailing lists. ncpus Count the number of processors nxge A diagnostic tool for the nxge(4) driver From owner-svn-src-stable-7@FreeBSD.ORG Tue Sep 25 01:33:24 2012 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1AE1A1065672; Tue, 25 Sep 2012 01:33:24 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E04DF8FC16; Tue, 25 Sep 2012 01:33:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8P1XNgU037160; Tue, 25 Sep 2012 01:33:23 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8P1XN1Z037159; Tue, 25 Sep 2012 01:33:23 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201209250133.q8P1XN1Z037159@svn.freebsd.org> From: Eitan Adler Date: Tue, 25 Sep 2012 01:33:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240911 - stable/7/share/misc X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Sep 2012 01:33:24 -0000 Author: eadler Date: Tue Sep 25 01:33:23 2012 New Revision: 240911 URL: http://svn.freebsd.org/changeset/base/240911 Log: MFC r240480: Belatedly add myself Approved by: cperciva (implicit) Modified: Directory Properties: stable/7/share/misc/ (props changed) From owner-svn-src-stable-7@FreeBSD.ORG Thu Sep 27 18:53:59 2012 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B2F90106566C; Thu, 27 Sep 2012 18:53:59 +0000 (UTC) (envelope-from trociny@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 83CC08FC1C; Thu, 27 Sep 2012 18:53:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8RIrxvp076868; Thu, 27 Sep 2012 18:53:59 GMT (envelope-from trociny@svn.freebsd.org) Received: (from trociny@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8RIrxkL076865; Thu, 27 Sep 2012 18:53:59 GMT (envelope-from trociny@svn.freebsd.org) Message-Id: <201209271853.q8RIrxkL076865@svn.freebsd.org> From: Mikolaj Golub Date: Thu, 27 Sep 2012 18:53:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241006 - stable/7/usr.sbin/bsnmpd/modules/snmp_hostres X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Sep 2012 18:53:59 -0000 Author: trociny Date: Thu Sep 27 18:53:59 2012 New Revision: 241006 URL: http://svn.freebsd.org/changeset/base/241006 Log: MFC r240595: In snmp_hostres, device_map table is used for consistent device table indexing. When a device has gone it is not removed from device_map table but just its entry_p field is set to NULL. So when traversing device_map in disk_OS_get_ATA_disks() and disk_OS_get_MD_disks() check for entry_p being NULL, otherwise the bsnmpd crash is possible when a removed map entry is dereferenced. Before the fix, for disk_OS_get_ATA_disks() the crash could be easily reproduced running: atacontrol detach ata1 The crash was not observed in disk_OS_get_MD_disks() because currently snmp_hostres does no see md(4) disks: to get the device list it uses devinfo(3), which does not return md devices. Reported by: Miroslav Lachman 000.fbsd quip.cz Modified: stable/7/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_diskstorage_tbl.c Directory Properties: stable/7/usr.sbin/bsnmpd/ (props changed) Modified: stable/7/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_diskstorage_tbl.c ============================================================================== --- stable/7/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_diskstorage_tbl.c Thu Sep 27 18:52:15 2012 (r241005) +++ stable/7/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_diskstorage_tbl.c Thu Sep 27 18:53:59 2012 (r241006) @@ -287,6 +287,9 @@ disk_OS_get_ATA_disks(void) /* Walk over the device table looking for ata disks */ STAILQ_FOREACH(map, &device_map, link) { + /* Skip deleted entries. */ + if (map->entry_p == NULL) + continue; for (found = lookup; found->media != DSM_UNKNOWN; found++) { if (strncmp(map->name_key, found->dev_name, strlen(found->dev_name)) != 0) @@ -342,6 +345,9 @@ disk_OS_get_MD_disks(void) /* Look for md devices */ STAILQ_FOREACH(map, &device_map, link) { + /* Skip deleted entries. */ + if (map->entry_p == NULL) + continue; if (sscanf(map->name_key, "md%d", &unit) != 1) continue; From owner-svn-src-stable-7@FreeBSD.ORG Fri Sep 28 01:04:11 2012 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 04282106564A; Fri, 28 Sep 2012 01:04:11 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E29C58FC0C; Fri, 28 Sep 2012 01:04:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8S14AOL039577; Fri, 28 Sep 2012 01:04:10 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8S14A5d039575; Fri, 28 Sep 2012 01:04:10 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201209280104.q8S14A5d039575@svn.freebsd.org> From: Eitan Adler Date: Fri, 28 Sep 2012 01:04:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241018 - stable/7/lib/libfetch X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Sep 2012 01:04:11 -0000 Author: eadler Date: Fri Sep 28 01:04:10 2012 New Revision: 241018 URL: http://svn.freebsd.org/changeset/base/241018 Log: MFC r240495: Adding missing return statements during error conditions. PR: kern/171187 Approved by: cperciva (implicit) Modified: stable/7/lib/libfetch/file.c Directory Properties: stable/7/lib/libfetch/ (props changed) Modified: stable/7/lib/libfetch/file.c ============================================================================== --- stable/7/lib/libfetch/file.c Fri Sep 28 01:04:09 2012 (r241017) +++ stable/7/lib/libfetch/file.c Fri Sep 28 01:04:10 2012 (r241018) @@ -49,12 +49,15 @@ fetchXGetFile(struct url *u, struct url_ f = fopen(u->doc, "r"); - if (f == NULL) + if (f == NULL) { fetch_syserr(); + return (NULL); + } if (u->offset && fseeko(f, u->offset, SEEK_SET) == -1) { fclose(f); fetch_syserr(); + return (NULL); } return (f); @@ -76,12 +79,15 @@ fetchPutFile(struct url *u, const char * else f = fopen(u->doc, "w+"); - if (f == NULL) + if (f == NULL) { fetch_syserr(); + return (NULL); + } if (u->offset && fseeko(f, u->offset, SEEK_SET) == -1) { fclose(f); fetch_syserr(); + return (NULL); } return (f);