Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/plugins/s390.c
Original file line number Diff line number Diff line change
Expand Up @@ -812,6 +812,7 @@ gboolean bd_s390_zfcp_scsi_offline (const gchar *devno, const gchar *wwpn, const
g_propagate_error (error, l_error);
return FALSE;
}
g_strchomp (fcphbasysfs);
fclose (fd);
g_free (hba_path);

Expand Down Expand Up @@ -843,6 +844,7 @@ gboolean bd_s390_zfcp_scsi_offline (const gchar *devno, const gchar *wwpn, const
g_propagate_error (error, l_error);
return FALSE;
}
g_strchomp (fcpwwpnsysfs);
fclose (fd);
g_free (wwpn_path);

Expand Down Expand Up @@ -876,14 +878,15 @@ gboolean bd_s390_zfcp_scsi_offline (const gchar *devno, const gchar *wwpn, const
g_propagate_error (error, l_error);
return FALSE;
}
g_strchomp (fcplunsysfs);
fclose (fd);
g_free (lun_path);
g_free (fcpsysfs);

/* make sure read values align with expected values */
scsidel = g_strdup_printf ("%s/%s/delete", scsidevsysfs, scsidev);
scsidel = g_strchomp (scsidel);
if ((fcphbasysfs == devno) && (fcpwwpnsysfs == wwpn) && (fcplunsysfs == lun)) {
if (g_strcmp0 (fcphbasysfs, devno) == 0 && g_strcmp0 (fcpwwpnsysfs, wwpn) == 0 && g_strcmp0 (fcplunsysfs, lun) == 0) {
fd = fopen (scsidel, "w");
if (!fd) {
g_set_error (&l_error, BD_S390_ERROR, BD_S390_ERROR_DEVICE,
Expand Down