From owner-svn-src-head@freebsd.org Mon Aug 19 17:51:07 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 00A24CCD5F; Mon, 19 Aug 2019 17:51:07 +0000 (UTC) (envelope-from scottph@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46C1gZ6FYhz46Kd; Mon, 19 Aug 2019 17:51:06 +0000 (UTC) (envelope-from scottph@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B84F81E3FC; Mon, 19 Aug 2019 17:51:06 +0000 (UTC) (envelope-from scottph@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x7JHp6Ig095525; Mon, 19 Aug 2019 17:51:06 GMT (envelope-from scottph@FreeBSD.org) Received: (from scottph@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7JHp6Hi095523; Mon, 19 Aug 2019 17:51:06 GMT (envelope-from scottph@FreeBSD.org) Message-Id: <201908191751.x7JHp6Hi095523@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: scottph set sender to scottph@FreeBSD.org using -f From: D Scott Phillips Date: Mon, 19 Aug 2019 17:51:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r351225 - in head/sys/dev: acpica nvdimm X-SVN-Group: head X-SVN-Commit-Author: scottph X-SVN-Commit-Paths: in head/sys/dev: acpica nvdimm X-SVN-Commit-Revision: 351225 X-SVN-Commit-Repository: base 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.29 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: Mon, 19 Aug 2019 17:51:07 -0000 Author: scottph Date: Mon Aug 19 17:51:06 2019 New Revision: 351225 URL: https://svnweb.freebsd.org/changeset/base/351225 Log: Don't set the string "unknown" as a device's location_str Return an empty string when the location is unknown instead of the string "unknown". This ensures that all location entries are of the form key=val. Suggested by: imp Approved by: jhb (mentor) MFC after: 1 week Sponsored by: Intel Corporation Differential Revision: https://reviews.freebsd.org/D21326 Modified: head/sys/dev/acpica/acpi.c head/sys/dev/nvdimm/nvdimm.c Modified: head/sys/dev/acpica/acpi.c ============================================================================== --- head/sys/dev/acpica/acpi.c Mon Aug 19 17:28:12 2019 (r351224) +++ head/sys/dev/acpica/acpi.c Mon Aug 19 17:51:06 2019 (r351225) @@ -866,7 +866,7 @@ acpi_child_location_str_method(device_t cbdev, device_ strlcat(buf, buf2, buflen); } } else { - snprintf(buf, buflen, "unknown"); + snprintf(buf, buflen, ""); } return (0); } Modified: head/sys/dev/nvdimm/nvdimm.c ============================================================================== --- head/sys/dev/nvdimm/nvdimm.c Mon Aug 19 17:28:12 2019 (r351224) +++ head/sys/dev/nvdimm/nvdimm.c Mon Aug 19 17:51:06 2019 (r351225) @@ -571,7 +571,7 @@ nvdimm_root_child_location_str(device_t dev, device_t if (handle != NULL) res = snprintf(buf, buflen, "handle=%s", acpi_name(handle)); else - res = snprintf(buf, buflen, "unknown"); + res = snprintf(buf, buflen, ""); if (res >= buflen) return (EOVERFLOW);