File: files.go

package info (click to toggle)
golang-github-foxboron-go-uefi 0.0~git20250207.69fb7db-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 9,140 kB
  • sloc: makefile: 29; sh: 14
file content (31 lines) | stat: -rw-r--r-- 787 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
package efitest

import "testing/fstest"

func SecureBootOff() fstest.MapFS {
	return fstest.MapFS{
		"/sys/firmware/efi/efivars/SecureBoot-8be4df61-93ca-11d2-aa0d-00e098032b8c": {
			Data: []byte{0x6, 0x0, 0x0, 0x0, 0x0}},
	}
}

func SecureBootOn() fstest.MapFS {
	return fstest.MapFS{
		"/sys/firmware/efi/efivars/SecureBoot-8be4df61-93ca-11d2-aa0d-00e098032b8c": {
			Data: []byte{0x6, 0x0, 0x0, 0x0, 0x1}},
	}
}

func SetUpModeOn() fstest.MapFS {
	return fstest.MapFS{
		"/sys/firmware/efi/efivars/SetupMode-8be4df61-93ca-11d2-aa0d-00e098032b8c": {
			Data: []byte{0x6, 0x0, 0x0, 0x0, 0x1}},
	}
}

func SetUpModeOff() fstest.MapFS {
	return fstest.MapFS{
		"/sys/firmware/efi/efivars/SetupMode-8be4df61-93ca-11d2-aa0d-00e098032b8c": {
			Data: []byte{0x6, 0x0, 0x0, 0x0, 0x1}},
	}
}