* 11:0 -> ../../devices/pci0000:00/0000:00:11.5/ata3/host2/target2:0:0/2:0:0:0/block/sr0
*/
static ssize_t
-parse_ata(struct device *dev, const char *current)
+parse_ata(struct device *dev, const char *current, const char *root UNUSED)
{
uint32_t scsi_host, scsi_bus, scsi_device, scsi_target;
uint64_t scsi_lun;
* ... probably doesn't work.
*/
static ssize_t
-parse_i2o(struct device *dev, const char *current UNUSED)
+parse_i2o(struct device *dev, const char *current UNUSED, const char *root UNUSED)
{
debug(DEBUG, "entry");
/* I2O disks can have up to 16 partitions, or 4 bits worth. */
*/
static ssize_t
-parse_nvme(struct device *dev, const char *current)
+parse_nvme(struct device *dev, const char *current, const char *root UNUSED)
{
int rc;
int32_t tosser0, tosser1, tosser2, ctrl_id, ns_id, partition;
*
*/
static ssize_t
-parse_pci(struct device *dev, const char *current)
+parse_pci(struct device *dev, const char *current, const char *root UNUSED)
{
int rc;
int pos;
*/
static ssize_t
-parse_pmem(struct device *dev, const char *current)
+parse_pmem(struct device *dev, const char *current, const char *root UNUSED)
{
uint8_t *filebuf = NULL;
uint8_t system, sysbus, acpi_id;
* I'm not sure at the moment if they're the same or not.
*/
static ssize_t
-parse_sas(struct device *dev, const char *current)
+parse_sas(struct device *dev, const char *current, const char *root UNUSED)
{
struct stat statbuf = { 0, };
int rc;
}
static ssize_t
-parse_sata(struct device *dev, const char *devlink)
+parse_sata(struct device *dev, const char *devlink, const char *root UNUSED)
{
const char *current = devlink;
uint32_t print_id;
}
static ssize_t
-parse_scsi(struct device *dev, const char *current)
+parse_scsi(struct device *dev, const char *current, const char *root UNUSED)
{
uint32_t scsi_host, scsi_bus, scsi_device, scsi_target;
uint64_t scsi_lun;
* But usually we just write the HD() entry, of course.
*/
static ssize_t
-parse_virtblk(struct device *dev, const char *current)
+parse_virtblk(struct device *dev, const char *current, const char *root UNUSED)
{
uint32_t tosser;
int pos;
efi_error("strdup(\"%s\") failed", linkbuf);
goto err;
}
- debug(DEBUG, "dev->link: %s\n", dev->link);
+ debug(DEBUG, "dev->link: %s", dev->link);
if (dev->part == -1) {
rc = read_sysfs_file(&tmpbuf, "dev/block/%s/partition", dev->link);
}
debug(DEBUG, "trying %s", probe->name);
- pos = probe->parse(dev, current);
+ pos = probe->parse(dev, current, dev->link);
if (pos < 0) {
efi_error("parsing %s failed", probe->name);
goto err;
char *name;
enum interface_type *iftypes;
uint32_t flags;
- ssize_t (*parse)(struct device *dev, const char * const current);
+ ssize_t (*parse)(struct device *dev,
+ const char * const current, const char * const root);
ssize_t (*create)(struct device *dev,
uint8_t *buf, ssize_t size, ssize_t off);
char *(*make_part_name)(struct device *dev);