From owner-svn-src-all@FreeBSD.ORG Thu Jul 18 23:25:57 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id D83B9C32; Thu, 18 Jul 2013 23:25:57 +0000 (UTC) (envelope-from jimharris@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id CABDBF43; Thu, 18 Jul 2013 23:25:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6INPvo4013068; Thu, 18 Jul 2013 23:25:57 GMT (envelope-from jimharris@svn.freebsd.org) Received: (from jimharris@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6INPvJa013066; Thu, 18 Jul 2013 23:25:57 GMT (envelope-from jimharris@svn.freebsd.org) Message-Id: <201307182325.r6INPvJa013066@svn.freebsd.org> From: Jim Harris Date: Thu, 18 Jul 2013 23:25:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253459 - head/sbin/nvmecontrol X-SVN-Group: head 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.14 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, 18 Jul 2013 23:25:57 -0000 Author: jimharris Date: Thu Jul 18 23:25:57 2013 New Revision: 253459 URL: http://svnweb.freebsd.org/changeset/base/253459 Log: Use _PATH_DEV (from paths.h) for the "/dev/" string, rather than hard-coding it. Sponsored by: Intel Suggested by: kib Reviewed by: kib, carl MFC after: 3 days Modified: head/sbin/nvmecontrol/devlist.c head/sbin/nvmecontrol/nvmecontrol.c Modified: head/sbin/nvmecontrol/devlist.c ============================================================================== --- head/sbin/nvmecontrol/devlist.c Thu Jul 18 23:12:44 2013 (r253458) +++ head/sbin/nvmecontrol/devlist.c Thu Jul 18 23:25:57 2013 (r253459) @@ -32,6 +32,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -82,7 +83,7 @@ devlist(int argc, char *argv[]) if (ret != 0) { if (ret == EACCES) { - warnx("could not open /dev/%s\n", name); + warnx("could not open "_PATH_DEV"%s\n", name); continue; } else break; Modified: head/sbin/nvmecontrol/nvmecontrol.c ============================================================================== --- head/sbin/nvmecontrol/nvmecontrol.c Thu Jul 18 23:12:44 2013 (r253458) +++ head/sbin/nvmecontrol/nvmecontrol.c Thu Jul 18 23:25:57 2013 (r253459) @@ -35,6 +35,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -175,7 +176,7 @@ open_dev(const char *str, int *fd, int s return (EINVAL); } - snprintf(full_path, sizeof(full_path), "/dev/%s", str); + snprintf(full_path, sizeof(full_path), _PATH_DEV"%s", str); *fd = open(full_path, O_RDWR); if (*fd < 0) { if (show_error)