All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] nfsrootfs: disable warning message if bootargs root parameter have not been defined
@ 2025-06-16  7:43 Jimmy Ho
  0 siblings, 0 replies; 4+ messages in thread
From: Jimmy Ho @ 2025-06-16  7:43 UTC (permalink / raw)
  To: openembedded-core; +Cc: Jimmy Ho

Signed-off-by: Jimmy Ho <jimmy.ho@sifive.com>
---
 meta/recipes-core/initrdscripts/initramfs-framework/nfsrootfs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-core/initrdscripts/initramfs-framework/nfsrootfs b/meta/recipes-core/initrdscripts/initramfs-framework/nfsrootfs
index e67ee4c25d..1e76258ce1 100644
--- a/meta/recipes-core/initrdscripts/initramfs-framework/nfsrootfs
+++ b/meta/recipes-core/initrdscripts/initramfs-framework/nfsrootfs
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 nfsrootfs_enabled() {
-	if [ ${bootparam_root} != "/dev/nfs" ] || [ -z ${bootparam_nfsroot} ]; then
+	if [ -z ${bootparam_root} ] || [ ${bootparam_root} != "/dev/nfs" ] || [ -z ${bootparam_nfsroot} ]; then
 		return 1
 	fi
 	return 0
-- 
2.39.3



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

* [PATCH] nfsrootfs: disable warning message if bootargs root parameter have not been defined
@ 2025-06-19  8:29 Jimmy Ho
  0 siblings, 0 replies; 4+ messages in thread
From: Jimmy Ho @ 2025-06-19  8:29 UTC (permalink / raw)
  To: openembedded-core; +Cc: Alexander Kanavin, Jimmy Ho

we have case that don't define root in bootargs,
if [ ${bootparam_root} != "/dev/nfs" ] will output warning "/init.d/85-nfsrootfs: line 4: [: !=: unary operator expected"
by checking  whether bootparam_root is defined can clear this warning message 

Signed-off-by: Jimmy Ho <jimmy.ho@sifive.com>
---
 meta/recipes-core/initrdscripts/initramfs-framework/nfsrootfs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-core/initrdscripts/initramfs-framework/nfsrootfs b/meta/recipes-core/initrdscripts/initramfs-framework/nfsrootfs
index e67ee4c25d..1e76258ce1 100644
--- a/meta/recipes-core/initrdscripts/initramfs-framework/nfsrootfs
+++ b/meta/recipes-core/initrdscripts/initramfs-framework/nfsrootfs
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 nfsrootfs_enabled() {
-	if [ ${bootparam_root} != "/dev/nfs" ] || [ -z ${bootparam_nfsroot} ]; then
+	if [ -z ${bootparam_root} ] || [ ${bootparam_root} != "/dev/nfs" ] || [ -z ${bootparam_nfsroot} ]; then
 		return 1
 	fi
 	return 0
-- 
2.39.3



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

* [PATCH] nfsrootfs: disable warning message if bootargs root parameter have not been defined
@ 2025-06-24  0:14 Jimmy Ho
  2025-06-24  6:54 ` Antonin Godard
  0 siblings, 1 reply; 4+ messages in thread
From: Jimmy Ho @ 2025-06-24  0:14 UTC (permalink / raw)
  To: openembedded-core; +Cc: Alexander Kanavin, Antonin Godard, Jimmy Ho

we have case that don't define root in bootargs,
if [ ${bootparam_root} != "/dev/nfs" ] will output warning "/init.d/85-nfsrootfs: line 4: [: !=: unary operator expected"
let variable expension result become string to solve this problem

Signed-off-by: Jimmy Ho <jimmy.ho@sifive.com>
Reviewed-by: Antonin Godard <antonin.godard@bootlin.com>
---
 meta/recipes-core/initrdscripts/initramfs-framework/nfsrootfs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-core/initrdscripts/initramfs-framework/nfsrootfs b/meta/recipes-core/initrdscripts/initramfs-framework/nfsrootfs
index e67ee4c25d..30555aef55 100644
--- a/meta/recipes-core/initrdscripts/initramfs-framework/nfsrootfs
+++ b/meta/recipes-core/initrdscripts/initramfs-framework/nfsrootfs
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 nfsrootfs_enabled() {
-	if [ ${bootparam_root} != "/dev/nfs" ] || [ -z ${bootparam_nfsroot} ]; then
+	if [ "${bootparam_root}" != "/dev/nfs" ] || [ -z ${bootparam_nfsroot} ]; then
 		return 1
 	fi
 	return 0
-- 
2.39.3



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

* Re: [PATCH] nfsrootfs: disable warning message if bootargs root parameter have not been defined
  2025-06-24  0:14 [PATCH] nfsrootfs: disable warning message if bootargs root parameter have not been defined Jimmy Ho
@ 2025-06-24  6:54 ` Antonin Godard
  0 siblings, 0 replies; 4+ messages in thread
From: Antonin Godard @ 2025-06-24  6:54 UTC (permalink / raw)
  To: Jimmy Ho, openembedded-core; +Cc: Alexander Kanavin

Hi,

On Tue Jun 24, 2025 at 2:14 AM CEST, Jimmy Ho wrote:
> we have case that don't define root in bootargs,
> if [ ${bootparam_root} != "/dev/nfs" ] will output warning "/init.d/85-nfsrootfs: line 4: [: !=: unary operator expected"
> let variable expension result become string to solve this problem
>
> Signed-off-by: Jimmy Ho <jimmy.ho@sifive.com>
> Reviewed-by: Antonin Godard <antonin.godard@bootlin.com>

Please don't include Reviewed-by if the person has not explicitely given their
Reviewed-by in response to the previous version of the patch.

> ---
>  meta/recipes-core/initrdscripts/initramfs-framework/nfsrootfs | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/meta/recipes-core/initrdscripts/initramfs-framework/nfsrootfs b/meta/recipes-core/initrdscripts/initramfs-framework/nfsrootfs
> index e67ee4c25d..30555aef55 100644
> --- a/meta/recipes-core/initrdscripts/initramfs-framework/nfsrootfs
> +++ b/meta/recipes-core/initrdscripts/initramfs-framework/nfsrootfs
> @@ -1,7 +1,7 @@
>  #!/bin/sh
>  
>  nfsrootfs_enabled() {
> -	if [ ${bootparam_root} != "/dev/nfs" ] || [ -z ${bootparam_nfsroot} ]; then
> +	if [ "${bootparam_root}" != "/dev/nfs" ] || [ -z ${bootparam_nfsroot} ]; then
>  		return 1
>  	fi
>  	return 0

Please make sure to include vX (version number) in the patch subject when
sending a new version of the patch.

See https://docs.yoctoproject.org/contributor-guide/submit-changes.html.

Antonin

-- 
Antonin Godard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com



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

end of thread, other threads:[~2025-06-24 12:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-24  0:14 [PATCH] nfsrootfs: disable warning message if bootargs root parameter have not been defined Jimmy Ho
2025-06-24  6:54 ` Antonin Godard
  -- strict thread matches above, loose matches on Subject: below --
2025-06-19  8:29 Jimmy Ho
2025-06-16  7:43 Jimmy Ho

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.