Date: Tue, 30 Sep 2014 11:51:33 +0000 (UTC) From: Pawel Jakub Dawidek <pjd@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272297 - head/sys/geom Message-ID: <201409301151.s8UBpXYo043908@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201409301151.s8UBpXYo043908>