All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] initscripts: hide the error in case swapoff does not exist
@ 2016-05-26 19:44 Ming Liu
  2016-05-26 20:11 ` Christopher Larson
  0 siblings, 1 reply; 3+ messages in thread
From: Ming Liu @ 2016-05-26 19:44 UTC (permalink / raw)
  To: openembedded-core; +Cc: yue.tao, Ming Liu

From: Ming Liu <peter.x.liu@external.atlascopco.com>

To avoid reporting errors when swapoff does not exist.

Signed-off-by: Ming Liu <peter.x.liu@external.atlascopco.com>
---
 meta/recipes-core/initscripts/initscripts-1.0/umountfs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-core/initscripts/initscripts-1.0/umountfs b/meta/recipes-core/initscripts/initscripts-1.0/umountfs
index 61324c6..d067234 100755
--- a/meta/recipes-core/initscripts/initscripts-1.0/umountfs
+++ b/meta/recipes-core/initscripts/initscripts-1.0/umountfs
@@ -12,7 +12,7 @@
 PATH=/sbin:/bin:/usr/sbin:/usr/bin
 
 echo "Deactivating swap..."
-swapoff -a
+swapoff -a 2> /dev/null
 
 # We leave /proc mounted.
 echo "Unmounting local filesystems..."
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] initscripts: hide the error in case swapoff does not exist
  2016-05-26 19:44 [PATCH] initscripts: hide the error in case swapoff does not exist Ming Liu
@ 2016-05-26 20:11 ` Christopher Larson
  2016-05-26 20:25   ` Ming Liu
  0 siblings, 1 reply; 3+ messages in thread
From: Christopher Larson @ 2016-05-26 20:11 UTC (permalink / raw)
  To: Ming Liu; +Cc: yue.tao, Ming Liu,
	Patches and discussions about the oe-core layer

[-- Attachment #1: Type: text/plain, Size: 559 bytes --]

On Thu, May 26, 2016 at 12:44 PM, Ming Liu <liu.ming50@gmail.com> wrote:

> From: Ming Liu <peter.x.liu@external.atlascopco.com>
>
> To avoid reporting errors when swapoff does not exist.
>
> Signed-off-by: Ming Liu <peter.x.liu@external.atlascopco.com>
>

This will suppress *real* errors as well. Better to just check if swapoff
exists and then run it if it does, if that's a concern.
-- 
Christopher Larson
clarson at kergoth dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Senior Software Engineer, Mentor Graphics

[-- Attachment #2: Type: text/html, Size: 1057 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] initscripts: hide the error in case swapoff does not exist
  2016-05-26 20:11 ` Christopher Larson
@ 2016-05-26 20:25   ` Ming Liu
  0 siblings, 0 replies; 3+ messages in thread
From: Ming Liu @ 2016-05-26 20:25 UTC (permalink / raw)
  To: Christopher Larson
  Cc: yue.tao, Ming Liu,
	Patches and discussions about the oe-core layer

[-- Attachment #1: Type: text/plain, Size: 975 bytes --]



On 05/26/2016 10:11 PM, Christopher Larson wrote:
>
>
> On Thu, May 26, 2016 at 12:44 PM, Ming Liu <liu.ming50@gmail.com 
> <mailto:liu.ming50@gmail.com>> wrote:
>
>     From: Ming Liu <peter.x.liu@external.atlascopco.com
>     <mailto:peter.x.liu@external.atlascopco.com>>
>
>     To avoid reporting errors when swapoff does not exist.
>
>     Signed-off-by: Ming Liu <peter.x.liu@external.atlascopco.com
>     <mailto:peter.x.liu@external.atlascopco.com>>
>
>
> This will suppress *real* errors as well. Better to just check if 
> swapoff exists and then run it if it does, if that's a concern.
Yes, checking if it exists makes more sense. And swapon is being used 
with 2> /dev/null as well in some places, better to change them also. I 
will send a V1 soon.

//Ming Liu
> -- 
> Christopher Larson
> clarson at kergoth dot com
> Founder - BitBake, OpenEmbedded, OpenZaurus
> Maintainer - Tslib
> Senior Software Engineer, Mentor Graphics


[-- Attachment #2: Type: text/html, Size: 2384 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-05-26 20:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-26 19:44 [PATCH] initscripts: hide the error in case swapoff does not exist Ming Liu
2016-05-26 20:11 ` Christopher Larson
2016-05-26 20:25   ` Ming Liu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.