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)
Thu, May 2, 10:53 PM
Unknown Object (File)
Thu, May 2, 10:49 PM
Unknown Object (File)
Thu, May 2, 10:38 PM
Unknown Object (File)
Thu, May 2, 9:04 PM
Unknown Object (File)
Jan 31 2024, 6:21 PM
Unknown Object (File)
Dec 23 2023, 1:28 AM
Unknown Object (File)
Dec 21 2023, 9:14 PM
Unknown Object (File)
Nov 14 2023, 11:54 AM
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 Passed
Unit
No Test Coverage
Build Status
Buildable 20222
Build 19701: arc lint + arc unit

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.