* [PATCH] tools/xenstored: Wire properly the command line option -M/--path-max
@ 2021-04-21 14:02 Julien Grall
2021-04-21 14:10 ` Luca Fancellu
2021-04-21 15:07 ` Juergen Gross
0 siblings, 2 replies; 4+ messages in thread
From: Julien Grall @ 2021-04-21 14:02 UTC (permalink / raw)
To: xen-devel; +Cc: julien, Julien Grall, Ian Jackson, Wei Liu, Juergen Gross
From: Julien Grall <jgrall@amazon.com>
The command line option -M/--path-max was meant to be added by
commit 924bf8c793cb "tools/xenstore: rework path length check" but this
wasn't wired through properly.
Fix it by adding the missing "case 'M':".
Fixes: 924bf8c793cb ("tools/xenstore: rework path length check")
Signed-off-by: Julien Grall <jgrall@amazon.com>
---
tools/xenstore/xenstored_core.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/xenstore/xenstored_core.c b/tools/xenstore/xenstored_core.c
index 591b28e4552f..c638e46221eb 100644
--- a/tools/xenstore/xenstored_core.c
+++ b/tools/xenstore/xenstored_core.c
@@ -2148,6 +2148,7 @@ int main(int argc, char *argv[])
case 'A':
quota_nb_perms_per_node = strtol(optarg, NULL, 10);
break;
+ case 'M':
quota_max_path_len = strtol(optarg, NULL, 10);
quota_max_path_len = min(XENSTORE_REL_PATH_MAX,
quota_max_path_len);
--
2.17.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] tools/xenstored: Wire properly the command line option -M/--path-max
2021-04-21 14:02 [PATCH] tools/xenstored: Wire properly the command line option -M/--path-max Julien Grall
@ 2021-04-21 14:10 ` Luca Fancellu
2021-04-21 15:07 ` Juergen Gross
1 sibling, 0 replies; 4+ messages in thread
From: Luca Fancellu @ 2021-04-21 14:10 UTC (permalink / raw)
To: Julien Grall; +Cc: xen-devel, Julien Grall, Ian Jackson, Wei Liu, Juergen Gross
> On 21 Apr 2021, at 15:02, Julien Grall <julien@xen.org> wrote:
>
> From: Julien Grall <jgrall@amazon.com>
>
> The command line option -M/--path-max was meant to be added by
> commit 924bf8c793cb "tools/xenstore: rework path length check" but this
> wasn't wired through properly.
>
> Fix it by adding the missing "case 'M':".
>
> Fixes: 924bf8c793cb ("tools/xenstore: rework path length check")
> Signed-off-by: Julien Grall <jgrall@amazon.com>
> ---
> tools/xenstore/xenstored_core.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/tools/xenstore/xenstored_core.c b/tools/xenstore/xenstored_core.c
> index 591b28e4552f..c638e46221eb 100644
> --- a/tools/xenstore/xenstored_core.c
> +++ b/tools/xenstore/xenstored_core.c
> @@ -2148,6 +2148,7 @@ int main(int argc, char *argv[])
> case 'A':
> quota_nb_perms_per_node = strtol(optarg, NULL, 10);
> break;
> + case 'M':
> quota_max_path_len = strtol(optarg, NULL, 10);
> quota_max_path_len = min(XENSTORE_REL_PATH_MAX,
> quota_max_path_len);
> —
> 2.17.1
>
>
Reviewed-by: Luca Fancellu <luca.fancellu@arm.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] tools/xenstored: Wire properly the command line option -M/--path-max
2021-04-21 14:02 [PATCH] tools/xenstored: Wire properly the command line option -M/--path-max Julien Grall
2021-04-21 14:10 ` Luca Fancellu
@ 2021-04-21 15:07 ` Juergen Gross
2021-04-25 12:56 ` Julien Grall
1 sibling, 1 reply; 4+ messages in thread
From: Juergen Gross @ 2021-04-21 15:07 UTC (permalink / raw)
To: Julien Grall, xen-devel; +Cc: Julien Grall, Ian Jackson, Wei Liu
[-- Attachment #1.1.1: Type: text/plain, Size: 561 bytes --]
On 21.04.21 16:02, Julien Grall wrote:
> From: Julien Grall <jgrall@amazon.com>
>
> The command line option -M/--path-max was meant to be added by
> commit 924bf8c793cb "tools/xenstore: rework path length check" but this
> wasn't wired through properly.
>
> Fix it by adding the missing "case 'M':".
>
> Fixes: 924bf8c793cb ("tools/xenstore: rework path length check")
> Signed-off-by: Julien Grall <jgrall@amazon.com>
Reviewed-by: Juergen Gross <jgross@suse.com>
I wonder why no compiler cared about the obviously dead coding.
Juergen
[-- Attachment #1.1.2: OpenPGP_0xB0DE9DD628BF132F.asc --]
[-- Type: application/pgp-keys, Size: 3135 bytes --]
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 495 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] tools/xenstored: Wire properly the command line option -M/--path-max
2021-04-21 15:07 ` Juergen Gross
@ 2021-04-25 12:56 ` Julien Grall
0 siblings, 0 replies; 4+ messages in thread
From: Julien Grall @ 2021-04-25 12:56 UTC (permalink / raw)
To: Juergen Gross, xen-devel; +Cc: Julien Grall, Ian Jackson, Wei Liu
Hi Juergen,
On 21/04/2021 16:07, Juergen Gross wrote:
> On 21.04.21 16:02, Julien Grall wrote:
>> From: Julien Grall <jgrall@amazon.com>
>>
>> The command line option -M/--path-max was meant to be added by
>> commit 924bf8c793cb "tools/xenstore: rework path length check" but this
>> wasn't wired through properly.
>>
>> Fix it by adding the missing "case 'M':".
>>
>> Fixes: 924bf8c793cb ("tools/xenstore: rework path length check")
>> Signed-off-by: Julien Grall <jgrall@amazon.com>
>
> Reviewed-by: Juergen Gross <jgross@suse.com>
Thanks! I have committed it.
> I wonder why no compiler cared about the obviously dead coding.
Coverity actually spotted it (see CID-1470790) back in December 2020.
Although, I wasn't aware of it because I just check coverity now.
Cheers,
--
Julien Grall
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-04-25 12:57 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-21 14:02 [PATCH] tools/xenstored: Wire properly the command line option -M/--path-max Julien Grall
2021-04-21 14:10 ` Luca Fancellu
2021-04-21 15:07 ` Juergen Gross
2021-04-25 12:56 ` Julien Grall
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).