| Storaged Reference Manual | ||||
|---|---|---|---|---|
| Top | Description | ||||
enum StoragedAtaCommandProtocol; StoragedAtaCommandInput; StoragedAtaCommandOutput; gboolean storaged_ata_send_command_sync (gint fd,gint timeout_msec,StoragedAtaCommandProtocol protocol,StoragedAtaCommandInput *input,StoragedAtaCommandOutput *output,GError **error);
typedef enum {
STORAGED_ATA_COMMAND_PROTOCOL_NONE,
STORAGED_ATA_COMMAND_PROTOCOL_DRIVE_TO_HOST,
STORAGED_ATA_COMMAND_PROTOCOL_HOST_TO_DRIVE
} StoragedAtaCommandProtocol;
Enumeration used to specify the protocol of an ATA command
typedef struct {
guint8 command;
guint8 feature;
guint8 count;
guint8 device;
guint32 lba;
gsize buffer_size;
guchar *buffer;
} StoragedAtaCommandInput;
Struct used for input data when sending ATA commands.
typedef struct {
guint8 error;
guint8 count;
guint8 device;
guint8 status;
guint32 lba;
gsize buffer_size;
guchar *buffer;
} StoragedAtaCommandOutput;
Struct used for output data when sending ATA commands.
gboolean storaged_ata_send_command_sync (gint fd,gint timeout_msec,StoragedAtaCommandProtocol protocol,StoragedAtaCommandInput *input,StoragedAtaCommandOutput *output,GError **error);
Sends a command to an ATA device. Blocks the calling thread while the command is pending.
|
A file descriptor for a ATA device. |
|
Timeout in milli-seconds for the command. Use -1 for the default (5 seconds) timeout and G_MAXINT for no timeout. |
|
The direction of the command. |
|
The input for the command. |
|
The output for the command. |
|
Return location for error or NULL. |
Returns : |
TRUE if the command succeded, FALSE if error is set. |