func (d *Char) new() Device {
	return &Char{}
}
New creates a new empty device
package device  
import "fmt"
const (
	CharType = "unix-char"
)
type Char struct {
	KeyName string
	Path    string
	Source  string
}
func (d *Char) getName() string {
	var name string
	switch {
	case d.KeyName != "":
		name = d.KeyName
	case d.Path == "":
		name = fmt.Sprintf("%s-%s", CharType, d.Source)
	default:
		name = fmt.Sprintf("%s-%s", CharType, d.Path)
	}
	return name
}
func (d *Char) ToMap() (string, map[string]string) {
	return d.getName(), map[string]string{
		"type":   CharType,
		"source": d.Source,
		"path":   d.Path,
	}
}
func (d *Char) FromMap(name string, options map[string]string) error {
	d.KeyName = name
	d.Path = options["path"]
	d.Source = options["source"]
	return nil
}