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
F108993573: D17571.diff
Thu, Jan 30, 9:59 AM
Unknown Object (File)
Tue, Jan 21, 9:17 AM
Unknown Object (File)
Sat, Jan 18, 5:50 PM
Unknown Object (File)
Wed, Jan 1, 5:02 PM
Unknown Object (File)
Dec 16 2024, 5:16 PM
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
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.