Skip to content
This repository has been archived by the owner on Feb 16, 2023. It is now read-only.

fix getlogin and a typo in utmp #7

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion chdir/chdirlong.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"path/filepath"
"strings"

"github.com/EricLagergren/go-gnulib/ifdef"
"github.com/marguerite/go-gnulib/ifdef"
"golang.org/x/sys/unix"
)

Expand Down
6 changes: 3 additions & 3 deletions cwd/cwd.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ package cwd
import (
"os"

"github.com/EricLagergren/go-gnulib/chdir"
"github.com/EricLagergren/go-gnulib/util"
"github.com/EricLagergren/go-gnulib/ifdef"
"github.com/marguerite/go-gnulib/chdir"
"github.com/marguerite/go-gnulib/util"
"github.com/marguerite/go-gnulib/ifdef"

"golang.org/x/sys/unix"
)
Expand Down
2 changes: 1 addition & 1 deletion dirent/getdents_unix.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

"golang.org/x/sys/unix"

"github.com/EricLagergren/go-gnulib/util"
"github.com/marguerite/go-gnulib/util"
)

// Stream mimics C's DIR structure. It's a stream that can be read from
Expand Down
4 changes: 2 additions & 2 deletions fd/fdopendir.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ package fd
import (
"golang.org/x/sys/unix"

"github.com/EricLagergren/go-gnulib/cwd"
"github.com/EricLagergren/go-gnulib/dirent"
"github.com/marguerite/go-gnulib/cwd"
"github.com/marguerite/go-gnulib/dirent"
)

func isExpected(err error) bool {
Expand Down
2 changes: 1 addition & 1 deletion fts/declarations.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ package fts
import (
"syscall"

"github.com/EricLagergren/go-gnulib/dirent"
"github.com/marguerite/go-gnulib/dirent"
rb "github.com/EricLagergren/ringbuffer"
)

Expand Down
4 changes: 2 additions & 2 deletions fts/fts.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ import (
"sort"
"syscall"

"github.com/EricLagergren/go-gnulib/dirent"
"github.com/EricLagergren/go-gnulib/fd"
"github.com/marguerite/go-gnulib/dirent"
"github.com/marguerite/go-gnulib/fd"

"golang.org/x/sys/unix"

Expand Down
2 changes: 1 addition & 1 deletion fts/fts_cycle.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package fts

import (
"github.com/EricLagergren/go-gnulib/cycle"
"github.com/marguerite/go-gnulib/cycle"
)

type ActiveDir struct {
Expand Down
6 changes: 3 additions & 3 deletions login/getlogin.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package login
import (
"os"

"github.com/EricLagergren/go-gnulib/ttyname"
"github.com/EricLagergren/go-gnulib/utmp"
"github.com/marguerite/go-gnulib/ttyname"
"github.com/marguerite/go-gnulib/utmp"
)

func GetLogin() (string, error) {
Expand All @@ -20,7 +20,7 @@ func GetLogin() (string, error) {
u := new(utmp.Utmp)
_ = copy(u.Line[:], []byte(name[5:]))

file, err := os.Open(utmp.UtmpFile)
file, err := utmp.Open(utmp.UtmpxFile, utmp.Reading)
if err != nil {
return "", err
}
Expand Down
4 changes: 2 additions & 2 deletions ttyname/ttyname_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"os"
"path/filepath"

"github.com/EricLagergren/go-gnulib/dirent"
"github.com/EricLagergren/go-gnulib/util"
"github.com/marguerite/go-gnulib/dirent"
"github.com/marguerite/go-gnulib/util"

"golang.org/x/sys/unix"
)
Expand Down
2 changes: 1 addition & 1 deletion ttyname/ttyname_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"bytes"
"syscall"

k32 "github.com/EricLagergren/go-gnulib/windows"
k32 "github.com/marguerite/go-gnulib/windows"
)

func count(s []byte) int64 {
Expand Down
2 changes: 1 addition & 1 deletion utmp/getutent_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ func (u *Utmp) GetUtLine(file *File) (*Utmp, error) {
var nu Utmp
for {

err := binary.Read(file, binary.LittleEndian, nu)
err := binary.Read(file, binary.LittleEndian, &nu)
if err != nil {
if err == io.EOF {
break
Expand Down
2 changes: 1 addition & 1 deletion utmp/readutmp_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ package utmp
import (
"syscall"

"github.com/EricLagergren/go-gnulib/util"
"github.com/marguerite/go-gnulib/util"
)

// IsDesirable determines whether the Utmp entry is desired by the user who
Expand Down
2 changes: 1 addition & 1 deletion utmp/utmp_freebsd.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
"time"
"unsafe"

"github.com/EricLagergren/go-gnulib/endian"
"github.com/marguerite/go-gnulib/endian"
)

// Order is the current endianness for a system
Expand Down