summaryrefslogtreecommitdiffstats
path: root/vendor
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2021-10-24 10:43:48 +1100
committerJesse Duffield <jessedduffield@gmail.com>2021-10-30 18:26:06 +1100
commitf704707d291387b2c1d7432c7700fb5398432f18 (patch)
tree4d9a54fbfb789af24f49e215f70b7bfe664f1616 /vendor
parent01d82749b17cd7a048d69c8386044d79548f7893 (diff)
stream output from certain git commands in command log panel
Diffstat (limited to 'vendor')
-rw-r--r--vendor/github.com/jesseduffield/gocui/escape.go39
-rw-r--r--vendor/github.com/jesseduffield/gocui/gui.go1
-rw-r--r--vendor/github.com/jesseduffield/gocui/view.go109
-rw-r--r--vendor/golang.org/x/sys/unix/sockcmsg_linux.go22
-rw-r--r--vendor/golang.org/x/sys/windows/aliases.go4
-rw-r--r--vendor/golang.org/x/sys/windows/eventlog.go1
-rw-r--r--vendor/golang.org/x/sys/windows/mksyscall.go1
-rw-r--r--vendor/golang.org/x/sys/windows/race.go1
-rw-r--r--vendor/golang.org/x/sys/windows/race0.go1
-rw-r--r--vendor/golang.org/x/sys/windows/service.go2
-rw-r--r--vendor/golang.org/x/sys/windows/str.go1
-rw-r--r--vendor/golang.org/x/sys/windows/syscall.go1
-rw-r--r--vendor/golang.org/x/sys/windows/syscall_windows.go10
-rw-r--r--vendor/golang.org/x/sys/windows/types_windows.go273
-rw-r--r--vendor/golang.org/x/sys/windows/zsyscall_windows.go107
-rw-r--r--vendor/modules.txt4
16 files changed, 519 insertions, 58 deletions
diff --git a/vendor/github.com/jesseduffield/gocui/escape.go b/vendor/github.com/jesseduffield/gocui/escape.go
index a6c9d5769..a9739f641 100644
--- a/vendor/github.com/jesseduffield/gocui/escape.go
+++ b/vendor/github.com/jesseduffield/gocui/escape.go
@@ -29,12 +29,15 @@ type (
fontEffect int
)
-type instruction struct {
- kind int
- param1 int
- param2 int
- toWrite []rune
-}
+type instruction interface{ isInstruction() }
+
+type eraseInLineFromCursor struct{}
+
+func (self eraseInLineFromCursor) isInstruction() {}
+
+type noInstruction struct{}
+
+func (self noInstruction) isInstruction() {}
const (
stateNone escapeState = iota
@@ -87,7 +90,7 @@ func newEscapeInterpreter(mode OutputMode) *escapeInterpreter {
curFgColor: ColorDefault,
curBgColor: ColorDefault,
mode: mode,
- instruction: instruction{kind: NONE},
+ instruction: noInstruction{},
}
return ei
}
@@ -101,7 +104,7 @@ func (ei *escapeInterpreter) reset() {
}
func (ei *escapeInterpreter) instructionRead() {
- ei.instruction.kind = NONE
+ ei.instruction = noInstruction{}
}
// parseOne parses a rune. If isEscape is true, it means that the rune is part
@@ -137,6 +140,8 @@ func (ei *escapeInterpreter) parseOne(ch rune) (isEscape bool, err error) {
ei.csiParam = append(ei.csiParam, "")
case ch == 'm':
ei.csiParam = append(ei.csiParam, "0")
+ case ch == 'K':
+ // fall through
default:
return false, errCSIParseError
}
@@ -168,12 +173,20 @@ func (ei *escapeInterpreter) parseOne(ch rune) (isEscape bool, err error) {
ei.csiParam = nil
return true, nil
case ch == 'K':
- p, err := strconv.Atoi(ei.csiParam[0])
- if err != nil {
- return false, errCSIParseError
+ p := 0
+ if len(ei.csiParam) != 0 && ei.csiParam[0] != "" {
+ p, err = strconv.Atoi(ei.csiParam[0])
+ if err != nil {
+ return false, errCSIParseError
+ }
+ }
+
+ if p == 0 {
+ ei.instruction = eraseInLineFromCursor{}
+ } else {
+ // non-zero values of P not supported
+ ei.instruction = noInstruction{}
}
- ei.instruction.kind = ERASE_IN_LINE
- ei.instruction.param1 = p
ei.state = stateNone
ei.csiParam = nil
diff --git a/vendor/github.com/jesseduffield/gocui/gui.go b/vendor/github.com/jesseduffield/gocui/gui.go
index 957a9fe62..3bc701299 100644
--- a/vendor/github.com/jesseduffield/gocui/gui.go
+++ b/vendor/github.com/jesseduffield/gocui/gui.go
@@ -1041,7 +1041,6 @@ func (g *Gui) draw(v *View) error {
Screen.HideCursor()
}
- v.clearRunes()
if err := v.draw(); err != nil {
return err
}
diff --git a/vendor/github.com/jesseduffield/gocui/view.go b/vendor/github.com/jesseduffield/gocui/view.go
index 11e0e6d70..0ebd6e4a2 100644
--- a/vendor/github.com/jesseduffield/gocui/view.go
+++ b/vendor/github.com/jesseduffield/gocui/view.go
@@ -359,7 +359,32 @@ func (v *View) Dimensions() (int, int, int, int) {
// Size returns the number of visible columns and rows in the View.
func (v *View) Size() (x, y int) {
- return v.x1 - v.x0 - 1, v.y1 - v.y0 - 1
+ return v.Width(), v.Height()
+}
+
+func (v *View) Width() int {
+ return v.x1 - v.x0 - 1
+}
+
+func (v *View) Height() int {
+ return v.y1 - v.y0 - 1
+}
+
+// if a view has a frame, that leaves less space for its writeable area
+func (v *View) InnerWidth() int {
+ return v.Width() - v.frameOffset()
+}
+
+func (v *View) InnerHeight() int {
+ return v.Height() - v.frameOffset()
+}
+
+func (v *View) frameOffset() int {
+ if v.Frame {
+ return 1
+ } else {
+ return 0
+ }
}
// Name returns the name of the view.
@@ -576,12 +601,14 @@ func (v *View) writeRunes(p []rune) {
case '\r':
v.wx = 0
default:
- cells := v.parseInput(r)
+ moveCursor, cells := v.parseInput(r)
if cells == nil {
continue
}
v.writeCells(v.wx, v.wy, cells)
- v.wx += len(cells)
+ if moveCursor {
+ v.wx += len(cells)
+ }
}
}
}
@@ -589,8 +616,9 @@ func (v *View) writeRunes(p []rune) {
// parseInput parses char by char the input written to the View. It returns nil
// while processing ESC sequences. Otherwise, it returns a cell slice that
// contains the processed data.
-func (v *View) parseInput(ch rune) []cell {
+func (v *View) parseInput(ch rune) (bool, []cell) {
cells := []cell{}
+ moveCursor := true
isEscape, err := v.ei.parseOne(ch)
if err != nil {
@@ -604,25 +632,32 @@ func (v *View) parseInput(ch rune) []cell {
}
v.ei.reset()
} else {
- if isEscape {
- return nil
- }
repeatCount := 1
- if ch == '\t' {
+ if _, ok := v.ei.instruction.(eraseInLineFromCursor); ok {
+ // fill rest of line
+ v.ei.instructionRead()
+ repeatCount = v.InnerWidth() - v.wx
+ ch = ' '
+ moveCursor = false
+ } else if isEscape {
+ // do not output anything
+ return moveCursor, nil
+ } else if ch == '\t' {
+ // fill tab-sized space
ch = ' '
repeatCount = 4
}
+ c := cell{
+ fgColor: v.ei.curFgColor,
+ bgColor: v.ei.curBgColor,
+ chr: ch,
+ }
for i := 0; i < repeatCount; i++ {
- c := cell{
- fgColor: v.ei.curFgColor,
- bgColor: v.ei.curBgColor,
- chr: ch,
- }
cells = append(cells, c)
}
}
- return cells
+ return moveCursor, cells
}
// Read reads data into p from the current reading position set by SetReadPos.
@@ -767,6 +802,8 @@ func (v *View) IsTainted() bool {
// draw re-draws the view's contents.
func (v *View) draw() error {
+ v.clearRunes()
+
if !v.Visible {
return nil
}
@@ -809,8 +846,9 @@ func (v *View) draw() error {
}
}
- if v.Autoscroll && len(v.viewLines) > maxY {
- v.oy = len(v.viewLines) - maxY
+ visibleViewLinesHeight := v.viewLineLengthIgnoringTrailingBlankLines()
+ if v.Autoscroll && visibleViewLinesHeight > maxY {
+ v.oy = visibleViewLinesHeight - maxY
}
y := 0
for i, vline := range v.viewLines {
@@ -858,6 +896,18 @@ func (v *View) draw() error {
return nil
}
+// if autoscroll is enabled but we only have a single row of cells shown to the
+// user, we don't want to scroll to the final line if it contains no text. So
+// this tells us the view lines height when we ignore any trailing blank lines
+func (v *View) viewLineLengthIgnoringTrailingBlankLines() int {
+ for i := len(v.viewLines) - 1; i >= 0; i-- {
+ if len(v.viewLines[i].line) > 0 {
+ return i + 1
+ }
+ }
+ return 0
+}
+
func (v *View) isPatternMatchedRune(x, y int) (bool, bool) {
searchStringLength := len(v.searcher.searchString)
for i, pos := range v.searcher.searchPositions {
@@ -1008,23 +1058,6 @@ func indexFunc(r rune) bool {
return r == ' ' || r == 0
}
-// SetLine changes the contents of an existing line.
-func (v *View) SetLine(y int, text string) error {
- if y < 0 || y >= len(v.lines) {
- err := ErrInvalidPoint
- return err
- }
-
- v.tainted = true
- line := make([]cell, 0)
- for _, r := range text {
- c := v.parseInput(r)
- line = append(line, c...)
- }
- v.lines[y] = line
- return nil
-}
-
// SetHighlight toggles highlighting of separate lines, for custom lists
// or multiple selection in views.
func (v *View) SetHighlight(y int, on bool) error {
@@ -1129,14 +1162,10 @@ func (v *View) RenderTextArea() {
fmt.Fprint(v, v.TextArea.GetContent())
cursorX, cursorY := v.TextArea.GetCursorXY()
prevOriginX, prevOriginY := v.Origin()
- width, height := v.Size()
+ width, height := v.InnerWidth(), v.InnerHeight()
- frameAdjustment := 0
- if v.Frame {
- frameAdjustment = -1
- }
- newViewCursorX, newOriginX := updatedCursorAndOrigin(prevOriginX, width+frameAdjustment, cursorX)
- newViewCursorY, newOriginY := updatedCursorAndOrigin(prevOriginY, height+frameAdjustment, cursorY)
+ newViewCursorX, newOriginX := updatedCursorAndOrigin(prevOriginX, width, cursorX)
+ newViewCursorY, newOriginY := updatedCursorAndOrigin(prevOriginY, height, cursorY)
_ = v.SetCursor(newViewCursorX, newViewCursorY)
_ = v.SetOrigin(newOriginX, newOriginY)
diff --git a/vendor/golang.org/x/sys/unix/sockcmsg_linux.go b/vendor/golang.org/x/sys/unix/sockcmsg_linux.go
index 8bf457059..e86d543b9 100644
--- a/vendor/golang.org/x/sys/unix/sockcmsg_linux.go
+++ b/vendor/golang.org/x/sys/unix/sockcmsg_linux.go
@@ -34,3 +34,25 @@ func ParseUnixCredentials(m *SocketControlMessage) (*Ucred, error) {
ucred := *(*Ucred)(unsafe.Pointer(&m.Data[0]))
return &ucred, nil
}
+
+// PktInfo4 encodes Inet4Pktinfo into a socket control message of type IP_PKTINFO.
+func PktInfo4(info *Inet4Pktinfo) []byte {
+ b := make([]byte, CmsgSpace(SizeofInet4Pktinfo))
+ h := (*Cmsghdr)(unsafe.Pointer(&b[0]))
+ h.Level = SOL_IP
+ h.Type = IP_PKTINFO
+ h.SetLen(CmsgLen(SizeofInet4Pktinfo))
+ *(*Inet4Pktinfo)(h.data(0)) = *info
+ return b
+}
+
+// PktInfo6 encodes Inet6Pktinfo into a socket control message of type IPV6_PKTINFO.
+func PktInfo6(info *Inet6Pktinfo) []byte {
+ b := make([]byte, CmsgSpace(SizeofInet6Pktinfo))
+ h := (*Cmsghdr)(unsafe.Pointer(&b[0]))
+ h.Level = SOL_IPV6
+ h.Type = IPV6_PKTINFO
+ h.SetLen(CmsgLen(SizeofInet6Pktinfo))
+ *(*Inet6Pktinfo)(h.data(0)) = *info
+ return b
+}
diff --git a/vendor/golang.org/x/sys/windows/aliases.go b/vendor/golang.org/x/sys/windows/aliases.go
index af3af60db..a20ebea63 100644
--- a/vendor/golang.org/x/sys/windows/aliases.go
+++ b/vendor/golang.org/x/sys/windows/aliases.go
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build windows
-// +build go1.9
+//go:build windows && go1.9
+// +build windows,go1.9
package windows
diff --git a/vendor/golang.org/x/sys/windows/eventlog.go b/vendor/golang.org/x/sys/windows/eventlog.go
index 40af946e1..2cd60645e 100644
--- a/vendor/golang.org/x/sys/windows/eventlog.go
+++ b/vendor/golang.org/x/sys/windows/eventlog.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build windows
// +build windows
package windows
diff --git a/vendor/golang.org/x/sys/windows/mksyscall.go b/vendor/golang.org/x/sys/windows/mksyscall.go
index 328e3b2ac..610291098 100644
--- a/vendor/golang.org/x/sys/windows/mksyscall.go
+++ b/vendor/golang.org/x/sys/windows/mksyscall.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build generate
// +build generate
package windows
diff --git a/vendor/golang.org/x/sys/windows/race.go b/vendor/golang.org/x/sys/windows/race.go
index a74e3e24b..9196b089c 100644
--- a/vendor/golang.org/x/sys/windows/race.go
+++ b/vendor/golang.org/x/sys/windows/race.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build windows && race
// +build windows,race
package windows
diff --git a/vendor/golang.org/x/sys/windows/race0.go b/vendor/golang.org/x/sys/windows/race0.go
index e44a3cbf6..7bae4817a 100644
--- a/vendor/golang.org/x/sys/windows/race0.go
+++ b/vendor/golang.org/x/sys/windows/race0.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build windows && !race
// +build windows,!race
package windows
diff --git a/vendor/golang.org/x/sys/windows/service.go b/vendor/golang.org/x/sys/windows/service.go
index b269850d0..5b28ae168 100644
--- a/vendor/golang.org/x/sys/windows/service.go
+++ b/vendor/golang.org/x/sys/windows/service.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build windows
// +build windows
package windows
@@ -235,3 +236,4 @@ type QUERY_SERVICE_LOCK_STATUS struct {
//sys NotifyServiceStatusChange(service Handle, notifyMask uint32, notifier *SERVICE_NOTIFY) (ret error) = advapi32.NotifyServiceStatusChangeW
//sys SubscribeServiceChangeNotifications(service Handle, eventType uint32, callback uintptr, callbackCtx uintptr, subscription *uintptr) (ret error) = sechost.SubscribeServiceChangeNotifications?
//sys UnsubscribeServiceChangeNotifications(subscription uintptr) = sechost.UnsubscribeServiceChangeNotifications?
+//sys RegisterServiceCtrlHandlerEx(serviceName *uint16, handlerProc uintptr, context uintptr) (handle Handle, err error) = advapi32.RegisterServiceCtrlHandlerExW
diff --git a/vendor/golang.org/x/sys/windows/str.go b/vendor/golang.org/x/sys/windows/str.go
index 917cc2aae..4fc01434e 100644
--- a/vendor/golang.org/x/sys/windows/str.go
+++ b/vendor/golang.org/x/sys/windows/str.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build windows
// +build windows
package windows
diff --git a/vendor/golang.org/x/sys/windows/syscall.go b/vendor/golang.org/x/sys/windows/syscall.go
index 6122f557a..72074d582 100644
--- a/vendor/golang.org/x/sys/windows/syscall.go
+++ b/vendor/golang.org/x/sys/windows/syscall.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build windows
// +build windows
// Package windows contains an interface to the low-level operating system
diff --git a/vendor/golang.org/x/sys/windows/syscall_windows.go b/vendor/golang.org/x/sys/windows/syscall_windows.go
index d3b59ae69..53ee74e08 100644
--- a/vendor/golang.org/x/sys/windows/syscall_windows.go
+++ b/vendor/golang.org/x/sys/windows/syscall_windows.go
@@ -401,6 +401,11 @@ func NewCallbackCDecl(fn interface{}) uintptr {
//sys LoadResource(module Handle, resInfo Handle) (resData Handle, err error) = kernel32.LoadResource
//sys LockResource(resData Handle) (addr uintptr, err error) = kernel32.LockResource
+// Version APIs
+//sys GetFileVersionInfoSize(filename string, zeroHandle *Handle) (bufSize uint32, err error) = version.GetFileVersionInfoSizeW
+//sys GetFileVersionInfo(filename string, handle uint32, bufSize uint32, buffer unsafe.Pointer) (err error) = version.GetFileVersionInfoW
+//sys VerQueryValue(block unsafe.Pointer, subBlock string, pointerToBufferPointer unsafe.Pointer, bufSize *uint32) (err error) = version.VerQueryValueW
+
// Process Status API (PSAPI)
//sys EnumProcesses(processIds []uint32, bytesReturned *uint32) (err error) = psapi.EnumProcesses
//sys EnumProcessModules(process Handle, module *Handle, cb uint32, cbNeeded *uint32) (err error) = psapi.EnumProcessModules
@@ -418,11 +423,16 @@ func NewCallbackCDecl(fn interface{}) uintptr {
//sys RtlInitString(destinationString *NTString, sourceString *byte) = ntdll.RtlInitString
//sys NtCreateFile(handle *Handle, access uint32, oa *OBJECT_ATTRIBUTES, iosb *IO_STATUS_BLOCK, allocationSize *int64, attributes uint32, share uint32, disposition uint32, options uint32, eabuffer uintptr, ealength uint32) (ntstatus error) = ntdll.NtCreateFile
//sys NtCreateNamedPipeFile(pipe *Handle, access uint32, oa *OBJECT_ATTRIBUTES, iosb *IO_STATUS_BLOCK, share uint32, disposition uint32, options uint32, typ uint32, readMode uint32, completionMode uint32, maxInstances uint32, inboundQuota uint32, outputQuota uint32, timeout *int64) (ntstatus error) = ntdll.NtCreateNamedPipeFile
+//sys NtSetInformationFile(handle Handle, iosb *IO_STATUS_BLOCK, inBuffer *byte, inBufferLen uint32, class uint32) (ntstatus error) = ntdll.NtSetInformationFile
//sys RtlDosPathNameToNtPathName(dosName *uint16, ntName *NTUnicodeString, ntFileNamePart *uint16, relativeName *RTL_RELATIVE_NAME) (ntstatus error) = ntdll.RtlDosPathNameToNtPathName_U_WithStatus
//sys RtlDosPathNameToRelativeNtPathName(dosName *uint16, ntName *NTUnicodeString, ntFileNamePart *uint16, relativeName *RTL_RELATIVE_NAME) (ntstatus error) = ntdll.RtlDosPathNameToRelativeNtPathName_U_WithStatus
//sys RtlDefaultNpAcl(acl **ACL) (ntstatus error) = ntdll.RtlDefaultNpAcl
//sys NtQueryInformationProcess(proc Handle, procInfoClass int32, procInfo unsafe.Pointer, procInfoLen uint32, retLen *uint32) (ntstatus error) = ntdll.NtQueryInformationProcess
//sys NtSetInformationProcess(proc Handle, procInfoClass int32, procInfo unsafe.Pointer, procInfoLen uint32) (ntstatus error) = ntdll.NtSetInformationProcess
+//sys NtQuerySystemInformation(sysInfoClass int32, sysInfo unsafe.Pointer, sysInfoLen uint32, retLen *uint32) (ntstatus error) = ntdll.NtQuerySystemInformation
+//sys NtSetSystemInformation(sysInfoClass int32, sysInfo unsafe.Pointer, sysInfoLen uint32) (ntstatus error) = ntdll.NtSetSystemInformation
+//sys RtlAddFunctionTable(functionTable *RUNTIME_FUNCTION, entryCount uint32, baseAddress uintptr) (ret bool) = ntdll.RtlAddFunctionTable
+//sys RtlDeleteFunctionTable(functionTable *RUNTIME_FUNCTION) (ret bool) = ntdll.RtlDeleteFunctionTable
// syscall interface implementation for other packages
diff --git a/vendor/golang.org/x/sys/windows/types_windows.go b/vendor/golang.org/x/sys/windows/types_windows.go
index 02db2ee5e..286dd1eab 100644
--- a/vendor/golang.org/x/sys/windows/types_windows.go
+++ b/vendor/golang.org/x/sys/windows/types_windows.go
@@ -2366,6 +2366,12 @@ type LIST_ENTRY struct {
Blink *LIST_ENTRY
}
+type RUNTIME_FUNCTION struct {
+ BeginAddress uint32
+ EndAddress uint32
+ UnwindData uint32
+}
+
type LDR_DATA_TABLE_ENTRY struct {
reserved1 [2]uintptr
InMemoryOrderLinks LIST_ENTRY
@@ -2556,6 +2562,60 @@ const (
FILE_PIPE_SERVER_END = 0x00000001
)
+const (
+ // FileInformationClass for NtSetInformationFile
+ FileBasicInformation = 4
+ FileRenameInformation = 10
+ FileDispositionInformation = 13
+ FilePositionInformation = 14
+ FileEndOfFileInformation = 20
+ FileValidDataLengthInformation = 39
+ FileShortNameInformation = 40
+ FileIoPriorityHintInformation = 43
+ FileReplaceCompletionInformation = 61
+ FileDispositionInformationEx = 64
+ FileCaseSensitiveInformation = 71
+ FileLinkInformation = 72
+ FileCaseSensitiveInformationForceAccessCheck = 75
+ FileKnownFolderInformation = 76
+
+ // Flags for FILE_RENAME_INFORMATION
+ FILE_RENAME_REPLACE_IF_EXISTS = 0x00000001
+ FILE_RENAME_POSIX_SEMANTICS = 0x00000002
+ FILE_RENAME_SUPPRESS_PIN_STATE_INHERITANCE = 0x00000004
+ FILE_RENAME_SUPPRESS_STORAGE_RESERVE_INHERITANCE = 0x00000008
+ FILE_RENAME_NO_INCREASE_AVAILABLE_SPACE = 0x00000010
+ FILE_RENAME_NO_DECREASE_AVAILABLE_SPACE = 0x00000020
+ FILE_RENAME_PRESERVE_AVAILABLE_SPACE = 0x00000030
+ FILE_RENAME_IGNORE_READONLY_ATTRIBUTE = 0x00000040
+ FILE_RENAME_FORCE_RESIZE_TARGET_SR = 0x00000080
+ FILE_RENAME_FORCE_RESIZE_SOURCE_SR = 0x00000100
+ FILE_RENAME_FORCE_RESIZE_SR = 0x00000180
+
+ // Flags for FILE_DISPOSITION_INFORMATION_EX
+ FILE_DISPOSITION_DO_NOT_DELETE = 0x00000000
+ FILE_DISPOSITION_DELETE = 0x00000001
+ FILE_DISPOSITION_POSIX_SEMANTICS = 0x00000002
+ FILE_DISPOSITION_FORCE_IMAGE_SECTION_CHECK = 0x00000004
+ FILE_DISPOSITION_ON_CLOSE = 0x00000008
+ FILE_DISPOSITION_IGNORE_READONLY_ATTRIBUTE = 0x00000010
+
+ // Flags for FILE_CASE_SENSITIVE_INFORMATION
+ FILE_CS_FLAG_CASE_SENSITIVE_DIR = 0x00000001
+
+ // Flags for FILE_LINK_INFORMATION
+ FILE_LINK_REPLACE_IF_EXISTS = 0x00000001
+ FILE_LINK_POSIX_SEMANTICS = 0x00000002
+ FILE_LINK_SUPPRESS_STORAGE_RESERVE_INHERITANCE = 0x00000008
+ FILE_LINK_NO_INCREASE_AVAILABLE_SPACE = 0x00000010
+ FILE_LINK_NO_DECREASE_AVAILABLE_SPACE = 0x00000020
+ FILE_LINK_PRESERVE_AVAILABLE_SPACE = 0x00000030
+ FILE_LINK_IGNORE_READONLY_ATTRIBUTE = 0x00000040
+ FILE_LINK_FORCE_RESIZE_TARGET_SR = 0x00000080
+ FILE_LINK_FORCE_RESIZE_SOURCE_SR = 0x00000100
+ FILE_LINK_FORCE_RESIZE_SR = 0x00000180
+)
+
// ProcessInformationClasses for NtQueryInformationProcess and NtSetInformationProcess.
const (
ProcessBasicInformation = iota
@@ -2672,6 +2732,203 @@ type PROCESS_BASIC_INFORMATION struct {
InheritedFromUniqueProcessId uintptr
}
+// SystemInformationClasses for NtQuerySystemInformation and NtSetSystemInformation
+const (
+ SystemBasicInformation = iota
+ SystemProcessorInformation
+ SystemPerformanceInformation
+ SystemTimeOfDayInformation
+ SystemPathInformation
+ SystemProcessInformation
+ SystemCallCountInformation
+ SystemDeviceInformation
+ SystemProcessorPerformanceInformation
+ SystemFlagsInformation
+ SystemCallTimeInformation
+ SystemModuleInformation
+ SystemLocksInformation
+ SystemStackTraceInformation
+ SystemPagedPoolInformation
+ SystemNonPagedPoolInformation
+ SystemHandleInformation
+ SystemObjectInformation
+ SystemPageFileInformation
+ SystemVdmInstemulInformation
+ SystemVdmBopInformation
+ SystemFileCacheInformation
+ SystemPoolTagInformation
+ SystemInterruptInformation
+ SystemDpcBehaviorInformation
+ SystemFullMemoryInformation
+ SystemLoadGdiDriverInformation
+ SystemUnloadGdiDriverInformation
+ SystemTimeAdjustmentInformation
+ SystemSummaryMemoryInformation
+ SystemMirrorMemoryInformation
+ SystemPerformanceTraceInformation
+ systemObsolete0
+ SystemExceptionInformation
+ SystemCrashDumpStateInformation
+ SystemKernelDebuggerInformation
+ SystemContextSwitchInformation
+ SystemRegistryQuotaInformation
+ SystemExtendServiceTableInformation
+ SystemPrioritySeperation
+ SystemVerifierAddDriverInformation
+ SystemVerifierRemoveDriverInformation
+ SystemProcessorIdleInformation
+ SystemLegacyDriverInformation
+ SystemCurrentTimeZoneInformation
+ SystemLookasideInformation
+ SystemTimeSlipNotification
+ SystemSessionCreate
+ SystemSessionDetach
+ SystemSessionInformation
+ SystemRangeStartInformation
+ SystemVerifierInformation
+ SystemVerifierThunkExtend
+ SystemSessionProcessInformation
+ SystemLoadGdiDriverInSystemSpace
+ SystemNumaProcessorMap
+ SystemPrefetcherInformation
+ SystemExtendedProcessInformation
+ SystemRecommendedSharedDataAlignment
+ SystemComPlusPackage
+ SystemNumaAvailableMemory
+ SystemProcessorPowerInformation
+ SystemEmulationBasicInformation
+ SystemEmulationProcessorInformation
+ SystemExtendedHandleInformation
+ SystemLostDelayedWriteInformation
+ SystemBigPoolInformation
+ SystemSessionPoolTagInformation
+ SystemSessionMappedViewInformation
+ SystemHotpatchInformation
+ SystemObjectSecurityMode
+ SystemWatchdogTimerHandler
+ SystemWatchdogTimerInformation
+ SystemLogicalProcessorInformation
+ SystemWow64SharedInformationObsolete
+ SystemRegisterFirmwareTableInformationHandler
+ SystemFirmwareTableInformation
+ SystemModuleInformationEx
+ SystemVerifierTriageInformation
+ SystemSuperfetchInformation
+ SystemMemoryListInformation
+ SystemFileCacheInformationEx
+ SystemThreadPriorityClientIdInformation
+ SystemProcessorIdleCycleTimeInformation
+ SystemVerifierCancellationInformation
+ SystemProcessorPowerInformationEx
+ SystemRefTraceInformation
+ SystemSpecialPoolInformation
+ SystemProcessIdInformation
+ SystemErrorPortInformation
+ SystemBootEnvironmentInformation
+ SystemHypervisorInformation
+ SystemVerifierInformationEx
+ SystemTimeZoneInformation
+ SystemImageFileExecutionOptionsInformation
+ SystemCoverageInformation
+ SystemPrefetchPatchInformation
+ SystemVerifierFaultsInformation
+ SystemSystemPartitionInformation
+ SystemSystemDiskInformation
+ SystemProcessorPerformanceDistribution
+ SystemNumaProximityNodeInformation
+ SystemDynamicTimeZoneInformation
+ SystemCodeIntegrityInformation
+ SystemProcessorMicrocodeUpdateInformation
+ SystemProcessorBrandString
+ SystemVirtualAddressInformation
+ SystemLogicalProcessorAndGroupInformation
+ SystemProcessorCycleTimeInformation
+ SystemStoreInformation
+ SystemRegistryAppendString
+ SystemAitSamplingValue
+ SystemVhdBootInformation
+ SystemCpuQuotaInformation
+ SystemNativeBasicInformation
+ systemSpare1
+ SystemLowPriorityIoInformation
+ SystemTpmBootEntropyInformation
+ SystemVerifierCountersInformation
+ SystemPagedPoolInformationEx
+ SystemSystemPtesInformationEx
+ SystemNodeDistanceInformation
+ SystemAcpiAuditInformation
+ SystemBasicPerformanceInformation
+ SystemQueryPerformanceCounterInformation
+ SystemSessionBigPoolInformation
+ SystemBootGraphicsInformation
+ SystemScrubPhysicalMemoryInformation
+ SystemBadPageInformation
+ SystemProcessorProfileControlArea
+ SystemCombinePhysicalMemoryInformation
+ SystemEntropyInterruptTimingCallback
+ SystemConsoleInformation
+ SystemPlatformBinaryInformation
+ SystemThrottleNotificationInformation
+ SystemHypervisorProcessorCountInformation
+ SystemDeviceDataInformation
+ SystemDeviceDataEnumerationInformation
+ SystemMemoryTopologyInformation
+ SystemMemoryChannelInformation
+ SystemBootLogoInformation
+ SystemProcessorPerformanceInformationEx
+ systemSpare0
+ SystemSecureBootPolicyInformation
+ SystemPageFileInformationEx
+ SystemSecureBootInformation
+ SystemEntropyInterruptTimingRawInformation
+ SystemPortableWorkspaceEfiLauncherInformation
+ SystemFullProcessInformation
+ SystemKernelDebuggerInformationEx
+ SystemBootMetadataInformation
+ SystemSoftRebootInformation
+ SystemElamCertificateInformation
+ SystemOfflineDumpConfigInformation
+ SystemProcessorFeaturesInformation
+ SystemRegistryReconciliationInformation
+ SystemEdidInformation
+ SystemManufacturingInformation
+ SystemEnergyEstimationConfigInformation
+ SystemHypervisorDetailInformation
+ SystemProcessorCycleStatsInformation
+ SystemVmGenerationCountInformation
+ SystemTrustedPlatformModuleInformation
+ SystemKernelDebuggerFlags
+ SystemCodeIntegrityPolicyInformation
+ SystemIsolatedUserModeInformation
+ SystemHardwareSecurityTestInterfaceResultsInformation
+ SystemSingleModuleInformation
+ SystemAllowedCpuSetsInformation
+ SystemDmaProtectionInformation
+ SystemInterruptCpuSetsInformation
+ SystemSecureBootPolicyFullInformation
+ SystemCodeIntegrityPolicyFullInformation
+ SystemAffinitizedInterruptProcessorInformation
+ SystemRootSiloInformation
+)
+
+type RTL_PROCESS_MODULE_INFORMATION struct {
+ Section Handle
+ MappedBase uintptr
+ ImageBase uintptr
+ ImageSize uint32
+ Flags uint32
+ LoadOrderIndex uint16
+ InitOrderIndex uint16
+ LoadCount uint16
+ OffsetToFileName uint16
+ FullPathName [256]byte
+}
+
+type RTL_PROCESS_MODULES struct {
+ NumberOfModules uint32
+ Modules [1]RTL_PROCESS_MODULE_INFORMATION
+}
+
// Constants for LocalAlloc flags.
const (
LMEM_FIXED = 0x0
@@ -2766,6 +3023,22 @@ var (
RT_MANIFEST ResourceID = 24
)
+type VS_FIXEDFILEINFO struct {
+ Signature uint32
+ StrucVersion uint32
+ FileVersionMS uint32
+ FileVersionLS uint32
+ ProductVersionMS uint32
+ ProductVersionLS uint32
+ FileFlagsMask uint32
+ FileFlags uint32
+ FileOS uint32
+ FileType uint32
+ FileSubtype uint32
+ FileDateMS uint32
+ FileDateLS uint32
+}
+
type COAUTHIDENTITY struct {
User *uint16
UserLength uint32
diff --git a/vendor/golang.org/x/sys/windows/zsyscall_windows.go b/vendor/golang.org/x/sys/windows/zsyscall_windows.go
index 4ea788e4c..ef3cfcfb2 100644
--- a/vendor/golang.org/x/sys/windows/zsyscall_windows.go
+++ b/vendor/golang.org/x/sys/windows/zsyscall_windows.go
@@ -51,6 +51,7 @@ var (