rpms/lsscsi/F-12 lsscsi-0.23-fc-separators.patch, NONE, 1.1 lsscsi-0.23-null.patch, NONE, 1.1 lsscsi.spec, 1.11, 1.12

Dan Horák sharkcz at fedoraproject.org
Fri May 7 06:46:32 UTC 2010


Author: sharkcz

Update of /cvs/pkgs/rpms/lsscsi/F-12
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv18752

Modified Files:
	lsscsi.spec 
Added Files:
	lsscsi-0.23-fc-separators.patch lsscsi-0.23-null.patch 
Log Message:
* 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)


lsscsi-0.23-fc-separators.patch:
 lsscsi.c |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

--- NEW FILE lsscsi-0.23-fc-separators.patch ---
>From 200225b0fe1d516171434b5bea3ec3d8e8880bf3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dan=20Hor=C3=A1k?= <dan at 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


lsscsi-0.23-null.patch:
 lsscsi.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

--- NEW FILE lsscsi-0.23-null.patch ---
>From 298058559eac4619ce938dfd38b37f9c2f37dabc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dan=20Hor=C3=A1k?= <dan at 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



Index: lsscsi.spec
===================================================================
RCS file: /cvs/pkgs/rpms/lsscsi/F-12/lsscsi.spec,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -p -r1.11 -r1.12
--- lsscsi.spec	7 Dec 2009 08:44:51 -0000	1.11
+++ lsscsi.spec	7 May 2010 06:46:32 -0000	1.12
@@ -1,10 +1,12 @@
 Summary:        List SCSI devices (or hosts) and associated information
 Name:           lsscsi
 Version:        0.23
-Release:        1%{?dist}
+Release:        2%{?dist}
 License:        GPLv2+
 Group:          Applications/System
 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
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
@@ -21,6 +23,8 @@ Author:
 
 %prep
 %setup -q
+%patch0 -p1 -b .fc-separators
+%patch1 -p1 -b .null
 
 
 %build
@@ -45,6 +49,10 @@ rm -rf %{buildroot}
 
 
 %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
 - update to 0.23
 



More information about the scm-commits mailing list