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)
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
Unknown Object (File)
Oct 30 2023, 1:23 PM
Unknown Object (File)
Aug 24 2023, 7:40 PM
Unknown Object (File)
Aug 13 2023, 6:17 AM
Unknown Object (File)
Aug 2 2023, 6:09 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.