1
0
mirror of https://github.com/taigrr/gopher-os synced 2025-01-18 04:43:13 -08:00

Update the Driver.DriverInit method signature to accept an io.Writer

Drivers can use the writer as an argument to kfmt.Fprintf to log
additional output during their initialization.
This commit is contained in:
Achilleas Anagnostopoulos
2017-07-08 20:19:28 +01:00
parent da279cf3ff
commit 3485523cdc
5 changed files with 13 additions and 7 deletions

View File

@@ -258,7 +258,7 @@ func (t *VT) DriverVersion() (uint16, uint16, uint16) {
}
// DriverInit initializes this driver.
func (t *VT) DriverInit() *kernel.Error { return nil }
func (t *VT) DriverInit(_ io.Writer) *kernel.Error { return nil }
func probeForVT() device.Driver {
return NewVT(DefaultTabWidth, DefaultScrollback)

View File

@@ -324,7 +324,7 @@ func TestVtSetState(t *testing.T) {
func TestVTDriverInterface(t *testing.T) {
var dev device.Driver = NewVT(0, 0)
if err := dev.DriverInit(); err != nil {
if err := dev.DriverInit(nil); err != nil {
t.Fatal(err)
}