From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by gabe.freedesktop.org (Postfix) with ESMTPS id 091116E320 for ; Tue, 19 May 2020 12:22:06 +0000 (UTC) Date: Tue, 19 May 2020 15:22:04 +0300 From: Petri Latvala Message-ID: <20200519122204.GC9497@platvala-desk.ger.corp.intel.com> References: <20200519113845.12446-1-juhapekka.heikkila@gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200519113845.12446-1-juhapekka.heikkila@gmail.com> Subject: Re: [igt-dev] [PATCH i-g-t] lib/igt_params: Fix verifying of debugfs parameters List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: igt-dev-bounces@lists.freedesktop.org Sender: "igt-dev" To: Juha-Pekka Heikkila Cc: igt-dev@lists.freedesktop.org List-ID: On Tue, May 19, 2020 at 02:38:45PM +0300, Juha-Pekka Heikkila wrote: > After found correct place in debugfs for parameters there > was used wrong path for verifying existence of parameter > which caused fallback path to be used. > > Signed-off-by: Juha-Pekka Heikkila > --- > lib/igt_params.c | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/lib/igt_params.c b/lib/igt_params.c > index d8649dfd..1f6dc13f 100644 > --- a/lib/igt_params.c > +++ b/lib/igt_params.c > @@ -143,14 +143,14 @@ static int __igt_params_open(int device, char **outpath, const char *param) > > devname = openat(dir, "name", O_RDONLY); > igt_require_f(devname >= 0, > - "Driver need to name itself in debugfs!"); > + "Driver need to name itself in debugfs!\n"); > > read(devname, searchname, sizeof(searchname)); > close(devname); > > foundname = strtok_r(searchname, " ", &ctx); > igt_require_f(foundname, > - "Driver need to name itself in debugfs!"); > + "Driver need to name itself in debugfs!\n"); > > snprintf(searchpath, PATH_MAX, "%s_params", foundname); > params = openat(dir, searchpath, O_RDONLY); > @@ -162,8 +162,8 @@ static int __igt_params_open(int device, char **outpath, const char *param) > if (param != NULL) { > char filepath[PATH_MAX]; > > - snprintf(filepath, PATH_MAX, "%s/%s", > - debugfspath, param); > + snprintf(filepath, PATH_MAX, "%s/%s/%s", > + debugfspath, searchpath, param); Reviewed-by: Petri Latvala > > if (stat(filepath, &buffer) == 0) { > if (outpath != NULL) > -- > 2.26.0 > > _______________________________________________ > igt-dev mailing list > igt-dev@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/igt-dev _______________________________________________ igt-dev mailing list igt-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/igt-dev