Page MenuHomeFreeBSD

Get rid of unneccessary calls to lseek(2) from getgrent(3)
ClosedPublic

Authored by trasz on Oct 15 2018, 6:44 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Sep 19, 4:53 AM
Unknown Object (File)
Sep 5 2025, 8:54 PM
Unknown Object (File)
Aug 31 2025, 8:44 AM
Unknown Object (File)
Aug 30 2025, 11:13 AM
Unknown Object (File)
Aug 11 2025, 10:37 PM
Unknown Object (File)
Aug 3 2025, 4:17 PM
Unknown Object (File)
Jul 25 2025, 2:34 AM
Unknown Object (File)
Jul 17 2025, 9:41 PM
Subscribers

Details

Summary

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)

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Note that the '(!int)' syntax is to avoid spurious differences with the current style there.

This revision is now accepted and ready to land.Oct 15 2018, 7:44 PM
This revision was automatically updated to reflect the committed changes.