Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933191AbbBCJZK (ORCPT ); Tue, 3 Feb 2015 04:25:10 -0500 Received: from mail-la0-f44.google.com ([209.85.215.44]:56452 "EHLO mail-la0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932148AbbBCJZF (ORCPT ); Tue, 3 Feb 2015 04:25:05 -0500 MIME-Version: 1.0 Reply-To: mtk.manpages@gmail.com In-Reply-To: <87k2zze5tg.fsf@mail.parknet.co.jp> References: <1422042884-10824-1-git-send-email-xypron.glpk@gmx.de> <87k2zze5tg.fsf@mail.parknet.co.jp> From: "Michael Kerrisk (man-pages)" Date: Tue, 3 Feb 2015 10:24:42 +0100 Message-ID: Subject: Re: [PATCH v3 1/1] ioctl-fat.2: new manpage for the ioctl fat API To: OGAWA Hirofumi Cc: Heinrich Schuchardt , "linux-fsdevel@vger.kernel.org" , lkml , linux-man Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2038 Lines: 65 Hello Hirofumi, Thanks for checking the page over. On 3 February 2015 at 09:51, OGAWA Hirofumi wrote: > "Michael Kerrisk (man-pages)" writes: > >> Hello Heinrich and Ogawa, > > Hi, > >> On 23 January 2015 at 20:54, Heinrich Schuchardt wrote: >>> The ioctl(2) system call may be used to retrieve information about >>> the fat file system and to set file attributes. >>> >>> This new manpage describes the details. >> >> @Ogawa, as the FAT maintainer, might you be willing to review this page? > > > for (;;) { > > /* > * Read next directory entry. > */ > ret = ioctl( fd, VFAT_IOCTL_READDIR_BOTH, entry); > > /* > * If an error occurs, the return value is -1. > * If d_reclen is zero, the end of the directory > * list has been reached. > */ > if (ret == -1 || entry[0].d_reclen == 0) > break; > > Quick reviewed, and looks good. However, entry[0].d_reclen == 0 works as > backward compatibility though. The example might be good to use usual > way of getdents(). > > I.e., "ret" means > -1 == error > 0 == EOD > 0 > how many bytes read Sorry -- I do not really understand what you mean here "entry[0].d_reclen == 0 works as backward compatibility though"). Is the line if (ret == -1 || entry[0].d_reclen == 0) incorrect? If yes, what should the code look like? Thanks, Michael -- Michael Kerrisk Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/ Linux/UNIX System Programming Training: http://man7.org/training/ -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/