From a4712b905411aebcc0c9b999c7e61826bfe4c11d Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Fri, 29 Aug 2025 15:31:57 +0200 Subject: [PATCH] plan9: drop go version tags for unsupported versions go.mod specifies go 1.24. Drop code for older, unsupported versions. Change-Id: I8a1ecd9e5634c1cf9619fbb89b2ecd0bda7eaf21 Reviewed-on: https://go-review.googlesource.com/c/sys/+/579515 LUCI-TryBot-Result: Go LUCI Auto-Submit: Tobias Klauser Reviewed-by: Sean Liao Reviewed-by: Cherry Mui Reviewed-by: Michael Pratt --- plan9/pwd_go15_plan9.go | 21 --------------------- plan9/pwd_plan9.go | 14 +++++--------- 2 files changed, 5 insertions(+), 30 deletions(-) delete mode 100644 plan9/pwd_go15_plan9.go diff --git a/plan9/pwd_go15_plan9.go b/plan9/pwd_go15_plan9.go deleted file mode 100644 index 73687de7..00000000 --- a/plan9/pwd_go15_plan9.go +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright 2015 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:build go1.5 - -package plan9 - -import "syscall" - -func fixwd() { - syscall.Fixwd() -} - -func Getwd() (wd string, err error) { - return syscall.Getwd() -} - -func Chdir(path string) error { - return syscall.Chdir(path) -} diff --git a/plan9/pwd_plan9.go b/plan9/pwd_plan9.go index fb945821..7a76489d 100644 --- a/plan9/pwd_plan9.go +++ b/plan9/pwd_plan9.go @@ -2,22 +2,18 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -//go:build !go1.5 - package plan9 +import "syscall" + func fixwd() { + syscall.Fixwd() } func Getwd() (wd string, err error) { - fd, err := open(".", O_RDONLY) - if err != nil { - return "", err - } - defer Close(fd) - return Fd2path(fd) + return syscall.Getwd() } func Chdir(path string) error { - return chdir(path) + return syscall.Chdir(path) }