@@ -477,24 +477,6 @@
}
static int
-sysfs_get_driver (char *sysfs_path, char * dev, char *driver)
-{
- char path[FILE_NAME_SIZE];
- char buff[SYSFS_NAME_LEN];
-
- if (safe_sprintf(path, "%s/block/%s/device/driver", sysfs_path, dev)) {
- condlog(0, "driver path too small");
- return 1;
- }
- if (sysfs_get_link(path, buff, SYSFS_NAME_LEN) < 0) {
- condlog(0, "can't get driver link: %s", strerror(errno));
- return 1;
- }
- basename(buff, driver);
- return 0;
-}
-
-static int
sysfs_get_bus (char * sysfs_path, struct path * pp)
{
struct sysfs_device *sdev;
@@ -536,9 +518,8 @@
while (loop--) {
sdev = sysfs_open_device_path(attr_buff);
- if(!strncmp(pp->dev,"cciss",5))
- sysfs_get_driver(sysfs_path, pp->dev,
- sdev->bus);
+ if(!strncmp(pp->dev,"cciss",5))
+ strcpy(sdev->bus, "cciss");
if (strlen(sdev->bus))
break;
@@ -549,8 +530,7 @@
#else
sdev = sysfs_open_device_path(attr_buff);
if(!strncmp(pp->dev,"cciss",5))
- sysfs_get_driver(sysfs_path, pp->dev,
- sdev->bus);
+ strcpy(sdev->bus, "cciss");
#endif
if (!strncmp(sdev->bus, "scsi", 4))
@@ -36,7 +36,7 @@
enabled_paths++;
}
}
- if (conf->pg_prio_calc == PG_PRIO_CALC_AVG)
+ if (conf->pg_prio_calc == PG_PRIO_CALC_AVG && enabled_paths)
pgp->priority = priority / enabled_paths;
else
pgp->priority = priority;