@@ -779,7 +779,7 @@ pub enum Whence {
779
779
SeekCur = libc:: SEEK_CUR ,
780
780
/// Specify an offset relative to the end of the file.
781
781
SeekEnd = libc:: SEEK_END ,
782
- /// Specify an offset relative to the next location in the file greater than or
782
+ /// Specify an offset relative to the next location in the file greater than or
783
783
/// equal to offset that contains some data. If offset points to
784
784
/// some data, then the file offset is set to offset.
785
785
#[ cfg( any( target_os = "dragonfly" , target_os = "freebsd" ,
@@ -788,7 +788,7 @@ pub enum Whence {
788
788
target_arch = "mips64" ) ) ) ) ) ]
789
789
SeekData = libc:: SEEK_DATA ,
790
790
/// Specify an offset relative to the next hole in the file greater than
791
- /// or equal to offset. If offset points into the middle of a hole, then
791
+ /// or equal to offset. If offset points into the middle of a hole, then
792
792
/// the file offset should be set to offset. If there is no hole past offset,
793
793
/// then the file offset should be adjusted to the end of the file (i.e., there
794
794
/// is an implicit hole at the end of any file).
@@ -1056,15 +1056,17 @@ pub fn setgroups(groups: &[Gid]) -> Result<()> {
1056
1056
/// groups that `user` is a member of. The additional group `group` is also
1057
1057
/// added to the list.
1058
1058
///
1059
- /// *Note:* Although the `getgrouplist()` call does not return any specific
1059
+ /// [Further reading](http://man7.org/linux/man-pages/man3/getgrouplist.3.html)
1060
+ ///
1061
+ /// # Errors
1062
+ ///
1063
+ /// Although the `getgrouplist()` call does not return any specific
1060
1064
/// errors on any known platforms, this implementation will return a system
1061
1065
/// error of `EINVAL` if the number of groups to be fetched exceeds the
1062
1066
/// `NGROUPS_MAX` sysconf value. This mimics the behaviour of `getgroups()`
1063
1067
/// and `setgroups()`. Additionally, while some implementations will return a
1064
1068
/// partial list of groups when `NGROUPS_MAX` is exceeded, this implementation
1065
1069
/// will only ever return the complete list or else an error.
1066
- ///
1067
- /// [Further reading](http://man7.org/linux/man-pages/man3/getgrouplist.3.html)
1068
1070
pub fn getgrouplist ( user : & CString , group : Gid ) -> Result < Vec < Gid > > {
1069
1071
let ngroups_max = match sysconf ( SysconfVar :: NGROUPS_MAX ) {
1070
1072
Ok ( Some ( n) ) => n as c_int ,
0 commit comments