From owner-svn-src-head@FreeBSD.ORG Tue Sep 30 11:51:33 2014 Return-Path: Delivered-To: svn-src-head@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 593FB5E7; Tue, 30 Sep 2014 11:51:33 +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 2C154CF6; Tue, 30 Sep 2014 11:51:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8UBpXXs043909; Tue, 30 Sep 2014 11:51:33 GMT (envelope-from pjd@FreeBSD.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8UBpXYo043908; Tue, 30 Sep 2014 11:51:33 GMT (envelope-from pjd@FreeBSD.org) Message-Id: <201409301151.s8UBpXYo043908@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pjd set sender to pjd@FreeBSD.org using -f From: Pawel Jakub Dawidek Date: Tue, 30 Sep 2014 11:51:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272297 - head/sys/geom X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Sep 2014 11:51:33 -0000 Author: pjd Date: Tue Sep 30 11:51:32 2014 New Revision: 272297 URL: http://svnweb.freebsd.org/changeset/base/272297 Log: Style fixes. Modified: head/sys/geom/geom_dev.c Modified: head/sys/geom/geom_dev.c ============================================================================== --- head/sys/geom/geom_dev.c Tue Sep 30 07:28:31 2014 (r272296) +++ head/sys/geom/geom_dev.c Tue Sep 30 11:51:32 2014 (r272297) @@ -281,7 +281,7 @@ g_dev_open(struct cdev *dev, int flags, cp = dev->si_drv2; if (cp == NULL) - return(ENXIO); /* g_dev_taste() not done yet */ + return (ENXIO); /* g_dev_taste() not done yet */ g_trace(G_T_ACCESS, "g_dev_open(%s, %d, %d, %p)", cp->geom->name, flags, fmt, td); @@ -312,7 +312,7 @@ g_dev_open(struct cdev *dev, int flags, sc->sc_open += r + w + e; mtx_unlock(&sc->sc_mtx); } - return(error); + return (error); } static int @@ -324,10 +324,10 @@ g_dev_close(struct cdev *dev, int flags, cp = dev->si_drv2; if (cp == NULL) - return(ENXIO); + return (ENXIO); g_trace(G_T_ACCESS, "g_dev_close(%s, %d, %d, %p)", cp->geom->name, flags, fmt, td); - + r = flags & FREAD ? -1 : 0; w = flags & FWRITE ? -1 : 0; #ifdef notyet @@ -361,7 +361,6 @@ g_dev_ioctl(struct cdev *dev, u_long cmd struct g_kerneldump kd; off_t offset, length, chunk; int i, error; - u_int u; cp = dev->si_drv2; pp = cp->provider; @@ -396,8 +395,7 @@ g_dev_ioctl(struct cdev *dev, u_long cmd error = g_io_getattr("GEOM::frontstuff", cp, &i, data); break; case DIOCSKERNELDUMP: - u = *((u_int *)data); - if (!u) { + if (*(u_int *)data != 0) { set_dumper(NULL, NULL); error = 0; break; @@ -406,9 +404,9 @@ g_dev_ioctl(struct cdev *dev, u_long cmd kd.length = OFF_MAX; i = sizeof kd; error = g_io_getattr("GEOM::kerneldump", cp, &i, &kd); - if (!error) { + if (error == 0) { error = set_dumper(&kd.di, devtoname(dev)); - if (!error) + if (error == 0) dev->si_flags |= SI_DUMPDEV; } break; @@ -425,7 +423,7 @@ g_dev_ioctl(struct cdev *dev, u_long cmd error = EINVAL; break; } - while (length > 0) { + while (length > 0) { chunk = length; if (g_dev_del_max_sectors != 0 && chunk > g_dev_del_max_sectors * cp->provider->sectorsize) {