[ Version ( since = "1.19.7" ) ]
public int32 device_index (string device) throws Error
convert device to index
This function takes a device name (eg. "/dev/sdb") and returns the index of the device in the list of devices.
Index numbers start from 0. The named device must exist, for example as a string returned from list_devices.
See also list_devices, part_to_dev.
this |
A GuestfsSession object |
the returned value, or -1 on error |