fix bugfix when exec lsmd help attach daemon
This commit is contained in:
parent
6b4d35fa95
commit
762cdada49
51
0002-fix-bugfix-when-exec-lsmd-help-attach-daemon.patch
Normal file
51
0002-fix-bugfix-when-exec-lsmd-help-attach-daemon.patch
Normal file
@ -0,0 +1,51 @@
|
||||
From 53593fddd4a243c6eb38794d1a4416db11bd5ec2 Mon Sep 17 00:00:00 2001
|
||||
From: Wu Bo <wubo40@huawei.com>
|
||||
Date: Tue, 2 Jun 2020 11:49:10 +0800
|
||||
Subject: [PATCH] fix bugfix when exec lsmd help attach daemon
|
||||
|
||||
$ lsmd --help
|
||||
libStorageMgmt plug-in daemon.
|
||||
lsmd [--plugindir <directory>] [--socketdir <dir>] [-v] [-d]
|
||||
--plugindir = The directory where the plugins are located
|
||||
--socketdir = The directory where the Unix domain sockets will be created
|
||||
--confdir = The directory where the config files are located
|
||||
-v = Verbose logging
|
||||
-d = New style daemon (systemd)
|
||||
$ ps -ef | grep lsmd
|
||||
libstor+ 1366 1 0 Sep23 ? 00:00:00 /usr/bin/lsmd -d
|
||||
|
||||
Signed-off-by: Wu Bo <wubo40@huawei.com>
|
||||
---
|
||||
daemon/lsm_daemon.c | 9 +++++----
|
||||
1 file changed, 5 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/daemon/lsm_daemon.c b/daemon/lsm_daemon.c
|
||||
index dc4df3b..65e337d 100644
|
||||
--- a/daemon/lsm_daemon.c
|
||||
+++ b/daemon/lsm_daemon.c
|
||||
@@ -829,6 +829,11 @@ int main(int argc, char *argv[])
|
||||
break;
|
||||
}
|
||||
|
||||
+ if (c == 'h') {
|
||||
+ usage();
|
||||
+ return EXIT_SUCCESS;
|
||||
+ }
|
||||
+
|
||||
switch (c) {
|
||||
case 0:
|
||||
switch (option_index) {
|
||||
@@ -844,10 +849,6 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
break;
|
||||
|
||||
- case 'h':
|
||||
- usage();
|
||||
- break;
|
||||
-
|
||||
case 'v':
|
||||
verbose_flag = 1;
|
||||
break;
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
@ -2,13 +2,14 @@
|
||||
%define with_python2 0
|
||||
Name: libstoragemgmt
|
||||
Version: 1.8.0
|
||||
Release: 5
|
||||
Release: 6
|
||||
Summary: Storage array management library
|
||||
License: LGPLv2+
|
||||
URL: https://github.com/libstorage/libstoragemgmt
|
||||
Source0: https://github.com/libstorage/libstoragemgmt/releases/download/%{version}/%{name}-%{version}.tar.gz
|
||||
|
||||
Patch1: 0001-change-run-dir.patch
|
||||
Patch2: 0002-fix-bugfix-when-exec-lsmd-help-attach-daemon.patch
|
||||
|
||||
BuildRequires: gcc gcc-c++ autoconf automake libtool libxml2-devel check-devel perl-interpreter
|
||||
BuildRequires: openssl-devel glib2-devel systemd bash-completion libconfig-devel systemd-devel
|
||||
@ -370,6 +371,9 @@ fi
|
||||
%{_mandir}/man*/*
|
||||
|
||||
%changelog
|
||||
* Tue Jul 27 2021 yannglongkang <yanglongkang@huawei.com> - 1.8.0-6
|
||||
- fix bugfix when exec lsmd help attach daemon
|
||||
|
||||
* Tue Sep 29 2020 baizhonggui <baizhonggui@huawei.com> - 1.8.0-5
|
||||
- Modify source0
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user