From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by sourceware.org (Postfix) with ESMTPS id 680123858D32 for ; Mon, 19 Sep 2022 08:53:51 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 680123858D32 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.de Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out2.suse.de (Postfix) with ESMTP id 663F71FA3D; Mon, 19 Sep 2022 08:53:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1663577630; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=NqkUUZlCHxqDxFwfckv8vYHD8rfkTgt4fhhzcS2mumo=; b=bC0uMS0aRFPcCE3EPSPbsYr2BnU7nThbdgYz0gOgw9U2Z2MbJF92KU0TP45ZmdV0rkodoY xbo/zWpKYfOFZUmCbixUQPpQcAi6ZSyVWdc95ne09WeIUS3hwUkBGowPVP+gUT5F0RurH6 Q3wdRgP9Tjk5QcDpheFeUlubII4L35g= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1663577630; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=NqkUUZlCHxqDxFwfckv8vYHD8rfkTgt4fhhzcS2mumo=; b=Dvvk1opuFupd1JzPXXoe1ch/OUac8SxTlKPxvut25bje7zZjwDRRsXMRiLNnR1uU5uMQ/p JS5NE0Mp+xDOBZCQ== Received: from hawking.suse.de (unknown [10.168.4.11]) by relay2.suse.de (Postfix) with ESMTP id 60D882C141; Mon, 19 Sep 2022 08:53:50 +0000 (UTC) Received: by hawking.suse.de (Postfix, from userid 17005) id E55AB44021C; Mon, 19 Sep 2022 10:53:49 +0200 (CEST) From: Andreas Schwab To: Florian Weimer Cc: Florian Weimer via Libc-alpha Subject: Re: [PATCH] Linux: Do not skip d_ino == 0 entries in readdir, readdir64 (bug 12165) References: <87o7vbj1kz.fsf@oldenburg.str.redhat.com> <87r107hil6.fsf@oldenburg.str.redhat.com> X-Yow: I'LL get it!! It's probably a FEW of my ITALIAN GIRL-FRIENDS!! Date: Mon, 19 Sep 2022 10:53:49 +0200 In-Reply-To: <87r107hil6.fsf@oldenburg.str.redhat.com> (Florian Weimer's message of "Mon, 19 Sep 2022 10:30:29 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-3.0 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Sep 19 2022, Florian Weimer wrote: > * Andreas Schwab: > >> On Sep 19 2022, Florian Weimer via Libc-alpha wrote: >> >>> - if (bytes <= 0) >>> - { >>> - /* On some systems getdents fails with ENOENT when the >> >> Shouldn't that be "some file systems"? >> >>> - open directory has been rmdir'd already. POSIX.1 >>> - requires that we treat this condition like normal EOF. */ >>> - if (bytes < 0 && errno == ENOENT) >>> - bytes = 0; >>> - >>> - /* Don't modifiy errno when reaching EOF. */ >>> - if (bytes == 0) >>> - __set_errno (saved_errno); >>> - dp = NULL; >>> - break; >>> - } >>> - dirp->size = (size_t) bytes; >>> - >>> - /* Reset the offset into the buffer. */ >>> - dirp->offset = 0; >>> + /* Linux fails with ENOENT if IS_DEADDIR is true for the >> >> What is IS_DEADDIR? > > It's an internal Linux construct. Isn't this clear from the context? I'd rather keep the original comment with the missing word added. I find it easier to understand without the reference to kernel internals. -- Andreas Schwab, SUSE Labs, schwab@suse.de GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 "And now for something completely different."