| Top |
| FuUdevDevice * | fu_udev_device_new () |
| GUdevDevice * | fu_udev_device_get_dev () |
| const gchar * | fu_udev_device_get_device_file () |
| const gchar * | fu_udev_device_get_sysfs_path () |
| const gchar * | fu_udev_device_get_subsystem () |
| guint16 | fu_udev_device_get_vendor () |
| guint16 | fu_udev_device_get_model () |
| guint8 | fu_udev_device_get_revision () |
| guint | fu_udev_device_get_slot_depth () |
| gboolean | fu_udev_device_set_physical_id () |
| void | fu_udev_device_dump () |
| void | fu_udev_device_set_readonly () |
| gint | fu_udev_device_get_fd () |
| void | fu_udev_device_set_fd () |
| gboolean | fu_udev_device_ioctl () |
| gboolean | fu_udev_device_pwrite () |
| gboolean | fu_udev_device_pread () |
FuUdevDevice *
fu_udev_device_new (GUdevDevice *udev_device);
Creates a new FuUdevDevice.
Since: 1.1.2
GUdevDevice *
fu_udev_device_get_dev (FuUdevDevice *self);
Gets the GUdevDevice.
Since: 1.1.2
const gchar *
fu_udev_device_get_device_file (FuUdevDevice *self);
Gets the device node.
Since: 1.3.1
const gchar *
fu_udev_device_get_sysfs_path (FuUdevDevice *self);
Gets the device sysfs path, e.g. "/sys/devices/pci0000:00/0000:00:14.0".
Since: 1.1.2
const gchar *
fu_udev_device_get_subsystem (FuUdevDevice *self);
Gets the device subsystem, e.g. "pci".
Since: 1.1.2
guint16
fu_udev_device_get_vendor (FuUdevDevice *self);
Gets the device vendor code.
Since: 1.1.2
guint16
fu_udev_device_get_model (FuUdevDevice *self);
Gets the device device code.
Since: 1.1.2
guint8
fu_udev_device_get_revision (FuUdevDevice *self);
Gets the device revision.
Since: 1.1.2
guint fu_udev_device_get_slot_depth (FuUdevDevice *self,const gchar *subsystem);
gboolean fu_udev_device_set_physical_id (FuUdevDevice *self,const gchar *subsystem,GError **error);
Sets the physical ID from the device subsystem. Plugins should choose the subsystem that is "deepest" in the udev tree, for instance choosing 'usb' over 'pci' for a mouse device.
Since: 1.1.2
void fu_udev_device_set_readonly (FuUdevDevice *self,gboolean readonly);
Sets the open mode to O_RDONLY use when opening the device with
fu_device_open(). By default devices are opened with O_RDWR.
Since: 1.3.3
gint
fu_udev_device_get_fd (FuUdevDevice *self);
Gets the file descriptor if the device is open.
Since: 1.3.3
void fu_udev_device_set_fd (FuUdevDevice *self,gint fd);
Replace the file descriptor to use when the device has already been opened.
This object will automatically close() fd
when fu_device_close() is called.
Since: 1.3.3
gboolean fu_udev_device_ioctl (FuUdevDevice *self,gulong request,guint8 *buf,gint *rc,GError **error);
Control a device using a low-level request.
self |
||
request |
request number |
|
buf |
A buffer to use, which *must* be large enough for the request |
|
rc |
the raw return value from the ioctl. |
[out][allow-none] |
error |
A GError, or |
Since: 1.3.3
gboolean fu_udev_device_pwrite (FuUdevDevice *self,goffset port,guint8 data,GError **error);
Write to a file descriptor at a given offset.
Since: 1.3.3
gboolean fu_udev_device_pread (FuUdevDevice *self,goffset port,guint8 *data,GError **error);
Read from a file descriptor at a given offset.
Since: 1.3.3