github.com/oweisse/u-root@v0.0.0-20181109060735-d005ad25fef1/cmds/console/port_linux.go (about)

     1  // Copyright 2012-2017 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  // This file contains common variables for port IO devices for Linux
     6  package main
     7  
     8  import (
     9  	"os"
    10  )
    11  
    12  var portFile *os.File
    13  
    14  func openPort() (err error) {
    15  	portFile, err = os.OpenFile("/dev/port", os.O_RDWR, 0)
    16  	return err
    17  }