StoragedLinuxDevice

StoragedLinuxDevice — Low-level devices on Linux

Functions

Types and Values

Object Hierarchy

    GObject
    ╰── StoragedLinuxDevice

Description

Types and functions used to record information obtained from the udev database as well as by probing the device.

Functions

storaged_linux_device_new_sync ()

StoragedLinuxDevice *
storaged_linux_device_new_sync (GUdevDevice *udev_device);

Creates a new StoragedLinuxDevice from udev_device which includes probing the device for more information, if applicable.

The calling thread may be blocked for a non-trivial amount of time while the probing is underway.

Parameters

udev_device

A GUdevDevice.

 

Returns

A StoragedLinuxDevice.


storaged_linux_device_reprobe_sync ()

gboolean
storaged_linux_device_reprobe_sync (StoragedLinuxDevice *device,
                                    GCancellable *cancellable,
                                    GError **error);

Forcibly reprobe information on device . The calling thread may be blocked for a non-trivial amount of time while the probing is underway.

Parameters

device

A StoragedLinuxDevice.

 

cancellable

A GCancellable or NULL.

[allow-none]

error

Return location for error or NULL.

 

Returns

TRUE if reprobing succeeded, FALSE otherwise.

Types and Values

StoragedLinuxDevice

typedef struct {
  GUdevDevice *udev_device;
  guchar *ata_identify_device_data;
  guchar *ata_identify_packet_device_data;
} StoragedLinuxDevice;

Object containing information about a device on Linux. This is essentially an instance of GUdevDevice plus additional data - such as ATA IDENTIFY data - obtained via probing the device at discovery and uevent "change" time.

Members

GUdevDevice *udev_device;

A GUdevDevice.

 

guchar *ata_identify_device_data;

512-byte array containing the result of the IDENTIY DEVICE command or NULL.

 

guchar *ata_identify_packet_device_data;

512-byte array containing the result of the IDENTIY PACKET DEVICE command or NULL.