- fix path separator for FC devices (#589327)
- fix for kernels with unified string representation of NULL (#589860)
This commit is contained in:
parent
4f8d90aef0
commit
b816540777
34
lsscsi-0.23-fc-separators.patch
Normal file
34
lsscsi-0.23-fc-separators.patch
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
From 200225b0fe1d516171434b5bea3ec3d8e8880bf3 Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?Dan=20Hor=C3=A1k?= <dan@danny.cz>
|
||||||
|
Date: Thu, 6 May 2010 11:29:47 +0200
|
||||||
|
Subject: [PATCH] fix separators for FC
|
||||||
|
|
||||||
|
---
|
||||||
|
lsscsi.c | 4 ++--
|
||||||
|
1 files changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/lsscsi.c b/lsscsi.c
|
||||||
|
index 9fa9489..1e5bb11 100644
|
||||||
|
--- a/lsscsi.c
|
||||||
|
+++ b/lsscsi.c
|
||||||
|
@@ -1027,7 +1027,7 @@ transport_init_longer(const char * path_name,
|
||||||
|
break;
|
||||||
|
case TRANSPORT_FC:
|
||||||
|
printf(" transport=fc\n");
|
||||||
|
- strcat(buff, "/device/fc_host:");
|
||||||
|
+ strcat(buff, "/device/fc_host/");
|
||||||
|
strcat(buff, cp);
|
||||||
|
if (get_value(buff, "node_name", value, NAME_LEN_MAX))
|
||||||
|
printf(" node_name=%s\n", value);
|
||||||
|
@@ -1394,7 +1394,7 @@ transport_tport_longer(const char * devname,
|
||||||
|
return;
|
||||||
|
*cp = '\0';
|
||||||
|
cp = basename(wd);
|
||||||
|
- strcpy(buff, "fc_remote_ports:");
|
||||||
|
+ strcpy(buff, "fc_remote_ports/");
|
||||||
|
strcat(buff, cp);
|
||||||
|
if (! if_directory_chdir(wd, buff))
|
||||||
|
return;
|
||||||
|
--
|
||||||
|
1.6.6.1
|
||||||
|
|
42
lsscsi-0.23-null.patch
Normal file
42
lsscsi-0.23-null.patch
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
From 298058559eac4619ce938dfd38b37f9c2f37dabc Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?Dan=20Hor=C3=A1k?= <dan@danny.cz>
|
||||||
|
Date: Thu, 6 May 2010 14:14:34 +0200
|
||||||
|
Subject: [PATCH] check for both string representation of NULL
|
||||||
|
|
||||||
|
---
|
||||||
|
lsscsi.c | 7 ++++---
|
||||||
|
1 files changed, 4 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/lsscsi.c b/lsscsi.c
|
||||||
|
index 1e5bb11..a10f3aa 100644
|
||||||
|
--- a/lsscsi.c
|
||||||
|
+++ b/lsscsi.c
|
||||||
|
@@ -2119,7 +2119,8 @@ one_host_entry(const char * dir_name, const char * devname,
|
||||||
|
{
|
||||||
|
char buff[NAME_LEN_MAX];
|
||||||
|
char value[NAME_LEN_MAX];
|
||||||
|
- char * nullname = "<NULL>";
|
||||||
|
+ char * nullname1 = "<NULL>";
|
||||||
|
+ char * nullname2 = "(null)";
|
||||||
|
unsigned int host_id;
|
||||||
|
|
||||||
|
if (opts->classic) {
|
||||||
|
@@ -2135,13 +2136,13 @@ one_host_entry(const char * dir_name, const char * devname,
|
||||||
|
strcat(buff, "/");
|
||||||
|
strcat(buff, devname);
|
||||||
|
if ((get_value(buff, "proc_name", value, NAME_LEN_MAX)) &&
|
||||||
|
- (strncmp(value, nullname, 6)))
|
||||||
|
+ (strncmp(value, nullname1, 6)) && (strncmp(value, nullname2, 6)))
|
||||||
|
printf(" %-12s ", value);
|
||||||
|
else if (if_directory_chdir(buff, "device/../driver")) {
|
||||||
|
char wd[NAME_LEN_MAX];
|
||||||
|
|
||||||
|
if (NULL == getcwd(wd, NAME_LEN_MAX))
|
||||||
|
- printf(" %-12s ", nullname);
|
||||||
|
+ printf(" %-12s ", nullname2);
|
||||||
|
else
|
||||||
|
printf(" %-12s ", basename(wd));
|
||||||
|
|
||||||
|
--
|
||||||
|
1.6.6.1
|
||||||
|
|
10
lsscsi.spec
10
lsscsi.spec
@ -1,10 +1,12 @@
|
|||||||
Summary: List SCSI devices (or hosts) and associated information
|
Summary: List SCSI devices (or hosts) and associated information
|
||||||
Name: lsscsi
|
Name: lsscsi
|
||||||
Version: 0.23
|
Version: 0.23
|
||||||
Release: 1%{?dist}
|
Release: 2%{?dist}
|
||||||
License: GPLv2+
|
License: GPLv2+
|
||||||
Group: Applications/System
|
Group: Applications/System
|
||||||
Source0: http://sg.danny.cz/scsi/%{name}-%{version}.tgz
|
Source0: http://sg.danny.cz/scsi/%{name}-%{version}.tgz
|
||||||
|
Patch0: %{name}-0.23-fc-separators.patch
|
||||||
|
Patch1: %{name}-0.23-null.patch
|
||||||
URL: http://sg.danny.cz/scsi/lsscsi.html
|
URL: http://sg.danny.cz/scsi/lsscsi.html
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||||
|
|
||||||
@ -21,6 +23,8 @@ Author:
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
|
%patch0 -p1 -b .fc-separators
|
||||||
|
%patch1 -p1 -b .null
|
||||||
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
@ -45,6 +49,10 @@ rm -rf %{buildroot}
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu May 6 2010 Dan Horák <dan[at]danny.cz> - 0.23-2
|
||||||
|
- fix path separator for FC devices (#589327)
|
||||||
|
- fix for kernels with unified string representation of NULL (#589860)
|
||||||
|
|
||||||
* Sun Dec 6 2009 Dan Horák <dan[at]danny.cz> - 0.23-1
|
* Sun Dec 6 2009 Dan Horák <dan[at]danny.cz> - 0.23-1
|
||||||
- update to 0.23
|
- update to 0.23
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user