From owner-svn-src-all@freebsd.org Thu May 19 16:04:21 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A1151B41F6F; Thu, 19 May 2016 16:04:21 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 58A961D85; Thu, 19 May 2016 16:04:21 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u4JG4Kut016358; Thu, 19 May 2016 16:04:20 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u4JG4KpV016356; Thu, 19 May 2016 16:04:20 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201605191604.u4JG4KpV016356@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Thu, 19 May 2016 16:04:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r300214 - in stable/10: sbin/devd sys/geom X-SVN-Group: stable-10 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.22 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: Thu, 19 May 2016 16:04:21 -0000 Author: asomers Date: Thu May 19 16:04:20 2016 New Revision: 300214 URL: https://svnweb.freebsd.org/changeset/base/300214 Log: MFC r298420, r298439, r298644 r298420 | asomers | 2016-04-21 10:43:15 -0600 (Thu, 21 Apr 2016) | 10 lines Notify userspace listeners when geom disk attributes have changed sys/geom/geom_disk.c: disk_attr_changed(): Generate a devctl event of type GEOM: for every call. r298439 | asomers | 2016-04-21 15:13:41 -0600 (Thu, 21 Apr 2016) | 10 lines DRY on buffer sizes. Update to r298420. sys/geom/geom_disk.c: In disk_attr_changed, don't repeat a buffer size. r298644 | asomers | 2016-04-26 08:48:58 -0600 (Tue, 26 Apr 2016) | 8 lines Add GEOM::physpath documentation to devd.conf(5) Modified: stable/10/sbin/devd/devd.conf.5 stable/10/sys/geom/geom_disk.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/devd/devd.conf.5 ============================================================================== --- stable/10/sbin/devd/devd.conf.5 Thu May 19 16:02:02 2016 (r300213) +++ stable/10/sbin/devd/devd.conf.5 Thu May 19 16:04:20 2016 (r300214) @@ -424,6 +424,8 @@ device node is created. A .Xr geom 4 device node is destroyed. +.It Li GEOM::physpath +The physical path of a device has changed. .It Li MEDIACHANGE Physical media has changed. .El Modified: stable/10/sys/geom/geom_disk.c ============================================================================== --- stable/10/sys/geom/geom_disk.c Thu May 19 16:02:02 2016 (r300213) +++ stable/10/sys/geom/geom_disk.c Thu May 19 16:04:20 2016 (r300214) @@ -43,6 +43,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -861,11 +862,15 @@ disk_attr_changed(struct disk *dp, const { struct g_geom *gp; struct g_provider *pp; + char devnamebuf[128]; gp = dp->d_geom; if (gp != NULL) LIST_FOREACH(pp, &gp->provider, provider) (void)g_attr_changed(pp, attr, flag); + snprintf(devnamebuf, sizeof(devnamebuf), "devname=%s%d", dp->d_name, + dp->d_unit); + devctl_notify("GEOM", "disk", attr, devnamebuf); } void