[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [RFC 5/5]: Rewrite findLuns function




+	n = scandir(sysfs_path, &namelist, notdotdir, versionsort);
+	if (n <= 0) {
+		/* we didn't find any reasonable entries; return failure */
+		virStorageReportError(conn, VIR_ERR_INTERNAL_ERROR,
+							  _("Failed to find any LUNs for session %s: %s"),
+							  session, strerror(errno));
+
+		return -1;
+	}


Who told you/anyone who wrote this code before that the 0th lun cannot be a real entry? This assumption is wrong.

Stefan


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]