lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 03 Feb 2015 17:51:23 +0900
From:	OGAWA Hirofumi <hirofumi@...l.parknet.co.jp>
To:	"Michael Kerrisk \(man-pages\)" <mtk.manpages@...il.com>
Cc:	Heinrich Schuchardt <xypron.glpk@....de>,
	"linux-fsdevel\@vger.kernel.org" <linux-fsdevel@...r.kernel.org>,
	lkml <linux-kernel@...r.kernel.org>,
	linux-man <linux-man@...r.kernel.org>
Subject: Re: [PATCH v3 1/1] ioctl-fat.2: new manpage for the ioctl fat API

"Michael Kerrisk (man-pages)" <mtk.manpages@...il.com> writes:

> Hello Heinrich and Ogawa,

Hi,

> On 23 January 2015 at 20:54, Heinrich Schuchardt <xypron.glpk@....de> 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

Thanks.
-- 
OGAWA Hirofumi <hirofumi@...l.parknet.co.jp>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ