Hello community,

here is the log from the commit of package ledmon for openSUSE:Factory checked 
in at 2018-10-25 09:12:57
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ledmon (Old)
 and      /work/SRC/openSUSE:Factory/.ledmon.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ledmon"

Thu Oct 25 09:12:57 2018 rev:15 rq:644403 version:0.90

Changes:
--------
--- /work/SRC/openSUSE:Factory/ledmon/ledmon.changes    2018-03-16 
10:44:55.581065615 +0100
+++ /work/SRC/openSUSE:Factory/.ledmon.new/ledmon.changes       2018-10-25 
09:12:58.946266811 +0200
@@ -1,0 +2,6 @@
+Tue Oct 23 02:18:22 UTC 2018 - [email protected]
+
+- Add a patch to fix bsc#1112539
+  + 0001-Recognize-RAID-volume-under-reshape-as-DEVICE_TYPE_V.patch
+
+-------------------------------------------------------------------

New:
----
  0001-Recognize-RAID-volume-under-reshape-as-DEVICE_TYPE_V.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ ledmon.spec ++++++
--- /var/tmp/diff_new_pack.EFf6eY/_old  2018-10-25 09:12:59.650266390 +0200
+++ /var/tmp/diff_new_pack.EFf6eY/_new  2018-10-25 09:12:59.654266388 +0200
@@ -24,6 +24,7 @@
 Group:          Hardware/Other
 Url:            https://github.com/intel/ledmon/
 Source0:        https://github.com/intel/ledmon/archive/v%{version}.tar.gz
+Patch1:         0001-Recognize-RAID-volume-under-reshape-as-DEVICE_TYPE_V.patch
 BuildRequires:  libsgutils-devel
 BuildRequires:  libudev-devel
 Provides:       sgpio:/sbin/ledmon
@@ -37,6 +38,7 @@
 
 %prep
 %setup -q
+%patch1 -p1
 
 %build
 make -j1 CXFLAGS="%{optflags} -lsgutils2 -std=c99"

++++++ 0001-Recognize-RAID-volume-under-reshape-as-DEVICE_TYPE_V.patch ++++++
>From c57e7d6d2dabe9e9d17d2e3aa4a2e77f7dc70acd Mon Sep 17 00:00:00 2001
From: Michal Zylowski <[email protected]>
Date: Tue, 27 Mar 2018 20:27:19 +0200
Subject: [PATCH] Recognize RAID volume under reshape as DEVICE_TYPE_VOLUME

Ledmon detects RAID device type by parsing value of sysfs file
"metadata_version" (/sys/block/mdXXX/md/metadata_version). When IMSM
RAID volume is under reshape, metadata_version file has value
"external:-md127/0". In current ledmon version this md device will be
wrongly recognized as container.

Recognize volumes under reshape as DEVICE_TYPE_VOLUME not
DEVICE_TYPE_CONTAINER.

This patch also fixes problem with blinking during reshape on some
environments.

Signed-off-by: Michal Zylowski <[email protected]>
---
 src/sysfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/sysfs.c b/src/sysfs.c
index 1a18a8b36bf8..f42be09a9cd9 100644
--- a/src/sysfs.c
+++ b/src/sysfs.c
@@ -125,7 +125,7 @@ static enum device_type _get_device_type(const char *path)
        if (p != NULL) {
                if (strlen(p) > 0) {
                        if (strncmp(p, "external:", 9) == 0) {
-                               if (p[9] == '/')
+                               if (p[9] == '/' || p[9] == '-')
                                        result = DEVICE_TYPE_VOLUME;
                                else
                                        result = DEVICE_TYPE_CONTAINER;
-- 
2.12.3


Reply via email to