From: "Sascha Hauer" <s.hauer@pengutronix.de>
To: "Tobias Waldekranz" <tobias@waldekranz.com>
Cc: barebox@lists.infradead.org
Subject: Re: [RFC next 1/2] dm: lvm: Initial Logical Volume Management support
Date: Fri, 28 Aug 2026 14:19:26 +0000 [thread overview]
Message-ID: <466724b2-2de6-4e41-b546-724dc2bd3d9a@pengutronix.de> (raw)
In-Reply-To: <20260824183203.3759144-2-tobias@waldekranz.com>
On 2026-08-24 18:31, Tobias Waldekranz wrote:
> +
> +const lvm_tok_t *lvm_md_vgsect(const struct lvm_md *md, const lvm_tok_t **keyp)
> +{
> + const lvm_tok_t *key, *val;
> +
> + lvm_md_for_each(md, key, &md->tokens[0]) {
> + val = key + 1;
Should you check against num_tokens here?
> + if (val->type == LVM_TOK_SECTION) {
> + if (keyp)
> + *keyp = key;
> + return val;
> + }
> + }
> +
> + return NULL;
> +}
> +
> +const lvm_tok_t *lvm_md_find(const struct lvm_md *md, const lvm_tok_t *sec,
> + const char *key)
> +{
> + const lvm_tok_t *k;
> +
> + if (sec->type != LVM_TOK_SECTION)
> + return NULL;
> +
> + lvm_md_for_each(md, k, sec) {
> + if (lvm_md_tok_eq(md, k, key))
> + return k + 1;
Here as well. Fuzzing might indeed be useful ;)
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
next prev parent reply other threads:[~2026-08-28 14:20 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-24 18:31 [RFC next 0/2] " Tobias Waldekranz
2026-08-24 18:31 ` [RFC next 1/2] " Tobias Waldekranz
2026-08-28 14:19 ` Sascha Hauer [this message]
2026-08-31 8:39 ` Tobias Waldekranz
2026-08-24 18:31 ` [RFC next 2/2] commands: lvm: inspect VGs, activate LVs Tobias Waldekranz
2026-08-28 14:20 ` Sascha Hauer
2026-08-31 8:40 ` Tobias Waldekranz
2026-08-28 14:10 ` [RFC next 0/2] dm: lvm: Initial Logical Volume Management support Sascha Hauer
2026-08-31 8:37 ` Tobias Waldekranz
2026-08-31 9:11 ` Sascha Hauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=466724b2-2de6-4e41-b546-724dc2bd3d9a@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=tobias@waldekranz.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox