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)
Sep 26 2024, 3:22 PM
Unknown Object (File)
Sep 18 2024, 1:58 AM
Unknown Object (File)
Aug 29 2024, 2:05 AM
Unknown Object (File)
Aug 23 2024, 11:56 PM
Unknown Object (File)
Aug 21 2024, 7:21 PM
Unknown Object (File)
Aug 10 2024, 3:32 PM
Unknown Object (File)
Jul 28 2024, 3:46 AM
Unknown Object (File)
Jul 12 2024, 8:09 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 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.