From patchwork Thu Aug 8 19:40:44 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yann Droneaud X-Patchwork-Id: 2841357 Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id BC0FEBF546 for ; Thu, 8 Aug 2013 19:53:02 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 085CA20373 for ; Thu, 8 Aug 2013 19:52:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1ED8E2034E for ; Thu, 8 Aug 2013 19:52:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966074Ab3HHTwz (ORCPT ); Thu, 8 Aug 2013 15:52:55 -0400 Received: from smtp24.services.sfr.fr ([93.17.128.84]:54817 "EHLO smtp24.services.sfr.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757896Ab3HHTwy (ORCPT ); Thu, 8 Aug 2013 15:52:54 -0400 Received: from filter.sfr.fr (localhost [127.0.0.1]) by msfrf2401.sfr.fr (SMTP Server) with ESMTP id 9C2BE700008A; Thu, 8 Aug 2013 21:42:05 +0200 (CEST) Received: from localhost.localdomain (187.20.90.92.rev.sfr.net [92.90.20.187]) by msfrf2401.sfr.fr (SMTP Server) with ESMTP id 0DD7C7000081; Thu, 8 Aug 2013 21:42:00 +0200 (CEST) X-SFR-UUID: 20130808194201567.0DD7C7000081@msfrf2401.sfr.fr Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by localhost.localdomain (8.14.7/8.14.7) with ESMTP id r78JftNs003050; Thu, 8 Aug 2013 21:41:56 +0200 Received: (from ydroneaud@localhost) by localhost.localdomain (8.14.7/8.14.7/Submit) id r78JfrR3003049; Thu, 8 Aug 2013 21:41:53 +0200 From: Yann Droneaud To: linux-rdma@vger.kernel.org Cc: Yann Droneaud Subject: [PATCH libibverbs v2 01/11] read_config(): ignore files beginning with '.' Date: Thu, 8 Aug 2013 21:40:44 +0200 Message-Id: <51be8e667556fbbed2e68d1041890bd1372325a0.1375952089.git.ydroneaud@opteya.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: References: In-Reply-To: References: MIME-Version: 1.0 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Files beginning with a dot '.' are likely the current and parent directories, or, hidden files ignored by 'ls'. Those paths are already skipped in find_sysfs_dev() they should probably be skipped here too. Signed-off-by: Yann Droneaud --- src/init.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/init.c b/src/init.c index 8e93f3f..ce9e1c0 100644 --- a/src/init.c +++ b/src/init.c @@ -306,6 +306,9 @@ static void read_config(void) while ((dent = readdir(conf_dir))) { struct stat buf; + if (dent->d_name[0] == '.') + continue; + if (asprintf(&path, "%s/%s", IBV_CONFIG_DIR, dent->d_name) < 0) { fprintf(stderr, PFX "Warning: couldn't read config file %s/%s.\n", IBV_CONFIG_DIR, dent->d_name);