This patch reverts
a0abe1e
(super-intel: Make print_found_intel_controllers() return void)
and make this function "return int" again.
Also, interpreting the return value is added.
Signed-off-by: Pawel Baldysiak <pawel.baldysiak@intel.com>
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
-static void print_vmd_attached_devs(struct sys_dev *hba)
+static int print_vmd_attached_devs(struct sys_dev *hba)
{
struct dirent *ent;
DIR *dir;
{
struct dirent *ent;
DIR *dir;
char *c, *rp;
if (hba->type != SYS_DEV_VMD)
char *c, *rp;
if (hba->type != SYS_DEV_VMD)
/* scroll through /sys/dev/block looking for devices attached to
* this hba
*/
dir = opendir("/sys/bus/pci/drivers/nvme");
if (!dir)
/* scroll through /sys/dev/block looking for devices attached to
* this hba
*/
dir = opendir("/sys/bus/pci/drivers/nvme");
if (!dir)
for (ent = readdir(dir); ent; ent = readdir(dir)) {
int n;
for (ent = readdir(dir); ent; ent = readdir(dir)) {
int n;
}
static void print_found_intel_controllers(struct sys_dev *elem)
}
static void print_found_intel_controllers(struct sys_dev *elem)
print_imsm_capability(&entry->orom);
printf(" I/O Controller : %s (%s)\n",
vmd_domain_to_controller(hba, buf), get_sys_dev_type(hba->type));
print_imsm_capability(&entry->orom);
printf(" I/O Controller : %s (%s)\n",
vmd_domain_to_controller(hba, buf), get_sys_dev_type(hba->type));
- print_vmd_attached_devs(hba);
+ if (print_vmd_attached_devs(hba)) {
+ if (verbose > 0)
+ pr_err("failed to get devices attached to VMD domain.\n");
+ result |= 2;
+ }