* [PATCH] Documentation: core-api: add generic parser docbook
@ 2024-11-20 6:07 Randy Dunlap
2024-12-06 16:34 ` Jonathan Corbet
0 siblings, 1 reply; 2+ messages in thread
From: Randy Dunlap @ 2024-11-20 6:07 UTC (permalink / raw)
To: linux-kernel
Cc: Randy Dunlap, Alexander Viro, Eric Biggers, Andrew Morton,
Jonathan Corbet, linux-doc, linux-fsdevel
Add the simple generic parser to the core-api docbook.
It can be used for parsing all sorts of options throughout the kernel.
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: Eric Biggers <ebiggers@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: linux-doc@vger.kernel.org
Cc: linux-fsdevel@vger.kernel.org
---
Documentation/core-api/index.rst | 1 +
Documentation/core-api/parser.rst | 17 +++++++++++++++++
lib/parser.c | 5 +++--
3 files changed, 21 insertions(+), 2 deletions(-)
--- linux-next-20241118.orig/Documentation/core-api/index.rst
+++ linux-next-20241118/Documentation/core-api/index.rst
@@ -53,6 +53,7 @@ Library functionality that is used throu
floating-point
union_find
min_heap
+ parser
Low level entry and exit
========================
--- /dev/null
+++ linux-next-20241118/Documentation/core-api/parser.rst
@@ -0,0 +1,17 @@
+.. SPDX-License-Identifier: GPL-2.0+
+
+==============
+Generic parser
+==============
+
+Overview
+========
+
+The generic parser is a simple parser for parsing mount options,
+filesystem options, driver options, subsystem options, etc.
+
+Parser API
+==========
+
+.. kernel-doc:: lib/parser.c
+ :export:
--- linux-next-20241118.orig/lib/parser.c
+++ linux-next-20241118/lib/parser.c
@@ -275,8 +275,9 @@ EXPORT_SYMBOL(match_hex);
*
* Description: Parse the string @str to check if matches wildcard
* pattern @pattern. The pattern may contain two types of wildcards:
- * '*' - matches zero or more characters
- * '?' - matches one character
+ *
+ * * '*' - matches zero or more characters
+ * * '?' - matches one character
*
* Return: If the @str matches the @pattern, return true, else return false.
*/
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] Documentation: core-api: add generic parser docbook
2024-11-20 6:07 [PATCH] Documentation: core-api: add generic parser docbook Randy Dunlap
@ 2024-12-06 16:34 ` Jonathan Corbet
0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Corbet @ 2024-12-06 16:34 UTC (permalink / raw)
To: Randy Dunlap, linux-kernel
Cc: Randy Dunlap, Alexander Viro, Eric Biggers, Andrew Morton,
linux-doc, linux-fsdevel
Randy Dunlap <rdunlap@infradead.org> writes:
> Add the simple generic parser to the core-api docbook.
> It can be used for parsing all sorts of options throughout the kernel.
>
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Cc: Alexander Viro <viro@zeniv.linux.org.uk>
> Cc: Eric Biggers <ebiggers@kernel.org>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Cc: Jonathan Corbet <corbet@lwn.net>
> Cc: linux-doc@vger.kernel.org
> Cc: linux-fsdevel@vger.kernel.org
> ---
> Documentation/core-api/index.rst | 1 +
> Documentation/core-api/parser.rst | 17 +++++++++++++++++
> lib/parser.c | 5 +++--
> 3 files changed, 21 insertions(+), 2 deletions(-)
Applied, thanks.
jon
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-12-06 16:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-20 6:07 [PATCH] Documentation: core-api: add generic parser docbook Randy Dunlap
2024-12-06 16:34 ` Jonathan Corbet
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).