Esempio n. 1
0
func (self *Device) fromUdev(ptr *C.struct_udev_device) error {
	self.DevPath = C.GoString(C.udev_device_get_devpath(ptr))
	self.Subsystem = C.GoString(C.udev_device_get_subsystem(ptr))
	self.DevType = C.GoString(C.udev_device_get_devtype(ptr))
	self.SysPath = C.GoString(C.udev_device_get_syspath(ptr))
	self.SysName = C.GoString(C.udev_device_get_sysname(ptr))
	self.SysNum = C.GoString(C.udev_device_get_sysnum(ptr))
	self.DevNode = C.GoString(C.udev_device_get_devnode(ptr))

	return nil
}
Esempio n. 2
0
File: udev.go Progetto: jessta/udev
func (d Device) DevPath() string {
	return C.GoString(C.udev_device_get_devpath(d.ptr))

}
Esempio n. 3
0
// Devpath returns the kernel devpath value of the udev device.
// The path does not contain the sys mount point, and starts with a '/'.
func (d *Device) Devpath() string {
	d.lock()
	defer d.unlock()
	return C.GoString(C.udev_device_get_devpath(d.ptr))
}