From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from bee.birch.relay.mailchannels.net (bee.birch.relay.mailchannels.net [23.83.209.14]) by sourceware.org (Postfix) with ESMTPS id B406F383B42D for ; Mon, 7 Jun 2021 09:17:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org B406F383B42D X-Sender-Id: dreamhost|x-authsender|siddhesh@gotplt.org Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 61571841C1A; Mon, 7 Jun 2021 09:17:43 +0000 (UTC) Received: from pdx1-sub0-mail-a14.g.dreamhost.com (100-96-13-100.trex.outbound.svc.cluster.local [100.96.13.100]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id EFA20841FB3; Mon, 7 Jun 2021 09:17:42 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|siddhesh@gotplt.org Received: from pdx1-sub0-mail-a14.g.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384) by 100.96.13.100 (trex/6.3.1); Mon, 07 Jun 2021 09:17:43 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|siddhesh@gotplt.org X-MailChannels-Auth-Id: dreamhost X-Stop-Whispering: 671d5b051c3a174b_1623057463225_4111934486 X-MC-Loop-Signature: 1623057463225:3392965543 X-MC-Ingress-Time: 1623057463224 Received: from pdx1-sub0-mail-a14.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a14.g.dreamhost.com (Postfix) with ESMTP id B5BEA7EF5D; Mon, 7 Jun 2021 02:17:42 -0700 (PDT) Received: from [192.168.1.126] (unknown [1.186.101.110]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: siddhesh@gotplt.org) by pdx1-sub0-mail-a14.g.dreamhost.com (Postfix) with ESMTPSA id F1CEA7E3D2; Mon, 7 Jun 2021 02:17:39 -0700 (PDT) Subject: Re: [PATCH 2/5] iconvconfig: Read configuration from gconv-modules.d subdirectory To: Andreas Schwab , Siddhesh Poyarekar via Libc-alpha References: <20210607085221.43612-1-siddhesh@sourceware.org> <20210607085221.43612-3-siddhesh@sourceware.org> <87bl8icad8.fsf@igel.home> X-DH-BACKEND: pdx1-sub0-mail-a14 From: Siddhesh Poyarekar Message-ID: <5df6076a-663a-5aad-19d4-94aa4c7727cd@sourceware.org> Date: Mon, 7 Jun 2021 14:47:34 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 In-Reply-To: <87bl8icad8.fsf@igel.home> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3487.1 required=5.0 tests=BAYES_00, JMQ_SPF_NEUTRAL, KAM_DMARC_NONE, KAM_DMARC_STATUS, NICE_REPLY_A, RCVD_IN_BARRACUDACENTRAL, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NEUTRAL, TXREP autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Jun 2021 09:18:05 -0000 On 6/7/21 2:36 PM, Andreas Schwab wrote: > On Jun 07 2021, Siddhesh Poyarekar via Libc-alpha wrote: > >> + /* Next, see if there is a gconv-modules.d directory containing configuration >> + files and if it is non-empty. */ >> + cp[0] = '.'; >> + cp[1] = 'd'; >> + cp[2] = '\0'; >> + >> + DIR *confdir = opendir (buf); >> + if (confdir != NULL) >> + { >> + struct dirent *ent; >> + while ((ent = readdir (confdir)) != NULL) >> + { >> + if (ent->d_type != DT_REG) >> + continue; > > Should this also handle DT_UNKNOWN? I suppose I could fall back to lstat to get the file type if dt_type is not supported by the underlying filesystem. Siddhesh