github.com/system-transparency/u-root@v6.0.1-0.20190919065413-ed07a650de4c+incompatible/pkg/acpi/tables_linux.go (about) 1 // Copyright 2019 the u-root Authors. All rights reserved 2 // Use of this source code is governed by a BSD-style 3 // license that can be found in the LICENSE file. 4 5 // +build linux 6 7 package acpi 8 9 import ( 10 "path/filepath" 11 ) 12 13 // RawTables returns an array of Raw, for all ACPI tables 14 // available in /sys 15 func RawTables() ([]Tabler, error) { 16 n, err := filepath.Glob("/sys/firmware/acpi/tables/[A-Z]*") 17 if err != nil { 18 return nil, err 19 } 20 21 var tabs []Tabler 22 for _, t := range n { 23 r, err := RawFromFile(t) 24 if err != nil { 25 return nil, err 26 } 27 tabs = append(tabs, r) 28 } 29 return tabs, nil 30 }