fix unnecessary error message print
Signed-off-by: haozi007 <liuhao27@huawei.com>
This commit is contained in:
parent
7d1956c6e4
commit
0ab6071049
30
0038-just-print-error-when-new-lock-failed.patch
Normal file
30
0038-just-print-error-when-new-lock-failed.patch
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
From 456d154a6e0a34ac8e4474408ea02f2e0ec6e194 Mon Sep 17 00:00:00 2001
|
||||||
|
From: haozi007 <liuhao27@huawei.com>
|
||||||
|
Date: Thu, 17 Mar 2022 02:39:46 +0000
|
||||||
|
Subject: [PATCH] just print error when new lock failed
|
||||||
|
|
||||||
|
Signed-off-by: haozi007 <liuhao27@huawei.com>
|
||||||
|
---
|
||||||
|
src/lxc/lxclock.c | 4 ++--
|
||||||
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/lxc/lxclock.c b/src/lxc/lxclock.c
|
||||||
|
index 9c9b57c..7114fc5 100644
|
||||||
|
--- a/src/lxc/lxclock.c
|
||||||
|
+++ b/src/lxc/lxclock.c
|
||||||
|
@@ -177,10 +177,10 @@ struct lxc_lock *lxc_newlock(const char *lxcpath, const char *name)
|
||||||
|
}
|
||||||
|
|
||||||
|
l->u.f.fd = -1;
|
||||||
|
- return l;
|
||||||
|
|
||||||
|
on_error:
|
||||||
|
- fprintf(stderr, "Failed to create lock for %s, path %s\n", name, lxcpath);
|
||||||
|
+ if (l == NULL)
|
||||||
|
+ fprintf(stderr, "Failed to create lock for %s, path %s\n", name, lxcpath);
|
||||||
|
return l;
|
||||||
|
}
|
||||||
|
|
||||||
|
--
|
||||||
|
2.20.1
|
||||||
|
|
||||||
9
lxc.spec
9
lxc.spec
@ -1,4 +1,4 @@
|
|||||||
%global _release 2022022101
|
%global _release 2022031701
|
||||||
|
|
||||||
Name: lxc
|
Name: lxc
|
||||||
Version: 4.0.3
|
Version: 4.0.3
|
||||||
@ -45,6 +45,7 @@ Patch0034: 0034-cgfsng-fix-cgroup-attach-cgroup-creation.patch
|
|||||||
Patch0035: 0035-adapt-upstream-compiler-settings.patch
|
Patch0035: 0035-adapt-upstream-compiler-settings.patch
|
||||||
Patch0036: 0036-compile-in-android-env.patch
|
Patch0036: 0036-compile-in-android-env.patch
|
||||||
Patch0037: 0037-fix-always-print-and-temp-len.patch
|
Patch0037: 0037-fix-always-print-and-temp-len.patch
|
||||||
|
Patch0038: 0038-just-print-error-when-new-lock-failed.patch
|
||||||
|
|
||||||
BuildRequires: systemd-units git libtool graphviz docbook2X doxygen chrpath
|
BuildRequires: systemd-units git libtool graphviz docbook2X doxygen chrpath
|
||||||
BuildRequires: pkgconfig(libseccomp)
|
BuildRequires: pkgconfig(libseccomp)
|
||||||
@ -216,6 +217,12 @@ make check
|
|||||||
%{_mandir}/*/man7/%{name}*
|
%{_mandir}/*/man7/%{name}*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Mar 17 2022 haozi007<liuhao27@huawei.com> - 4.0.3-2022031701
|
||||||
|
- Type:improv
|
||||||
|
- ID:NA
|
||||||
|
- SUG:NA
|
||||||
|
- DESC: fix unnecessary print error message
|
||||||
|
|
||||||
* Mon Feb 21 2022 chegJH <hejunjie10@huawei.com> - 4.0.3-2022022101
|
* Mon Feb 21 2022 chegJH <hejunjie10@huawei.com> - 4.0.3-2022022101
|
||||||
- Type:improv
|
- Type:improv
|
||||||
- ID:NA
|
- ID:NA
|
||||||
|
|||||||
@ -35,3 +35,4 @@
|
|||||||
0035-adapt-upstream-compiler-settings.patch
|
0035-adapt-upstream-compiler-settings.patch
|
||||||
0036-compile-in-android-env.patch
|
0036-compile-in-android-env.patch
|
||||||
0037-fix-always-print-and-temp-len.patch
|
0037-fix-always-print-and-temp-len.patch
|
||||||
|
0038-just-print-error-when-new-lock-failed.patch
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user