HomeFreeBSD

Get rid unneccessary useless calls to lseek(2) from getgrent(3).

Description

Get rid unneccessary useless calls to lseek(2) from getgrent(3).
Looks like this:

fstatat(AT_FDCWD,"/etc/nsswitch.conf",{ mode=-rw-r--r-- ,inode=2167001,size=390,blksize=32768 },0x0) = 0 (0x0)
open("/etc/group",O_RDONLY|O_CLOEXEC,0666) = 3 (0x3)
fstat(3,{ mode=-rw-r--r-- ,inode=2166927,size=919,blksize=32768 }) = 0 (0x0)
-lseek(3,0x0,SEEK_CUR) = 0 (0x0)
-lseek(3,0x0,SEEK_SET) = 0 (0x0)
read(3,"# $FreeBSD: release/10.0.0/etc/g"...,32768) = 919 (0x397)
close(3) = 0 (0x0)

Reviewed by: kib
Approved by: re (gjb)
MFC after: 2 weeks
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D17571

Details

Provenance
traszAuthored on
Reviewer
kib
Differential Revision
D17571: Get rid of unneccessary calls to lseek(2) from getgrent(3)
Parents
rS339386: Provide pmap_large_map() KPI on amd64.
Branches
Unknown
Tags
Unknown