From: Cyril Hrubis <chrubis@suse.cz>
To: Jan Stancek <jstancek@redhat.com>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH v2] tst_find_backing_dev: match mount point if major/minor can't be found
Date: Tue, 17 May 2022 17:33:04 +0200 [thread overview]
Message-ID: <YoPAMBxU5zuQ5xDk@yuki> (raw)
In-Reply-To: <65a82dbc6ea54c5d02a1238f5fa26d19388c5d2a.1652789936.git.jstancek@redhat.com>
Hi!
> + len = count_match_len(path, mnt_point);
> + if (len > best_match_len) {
I wonder if we should also check for minimal len to avoid trival prefix
matches such as "/". Maybe we should set the best_match_len to 1 to
begin with.
> + strcpy(dev, pre);
> + best_match_len = len;
> + }
> }
>
> SAFE_FCLOSE(NULL, file);
> --
> 2.27.0
>
>
> --
> Mailing list info: https://lists.linux.it/listinfo/ltp
--
Cyril Hrubis
chrubis@suse.cz
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2022-05-17 15:31 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-27 12:08 [LTP] [PATCH] tst_find_backing_dev: match mount point if major/minor can't be found Jan Stancek
2022-05-13 15:07 ` Cyril Hrubis
2022-05-17 12:19 ` [LTP] [PATCH v2] " Jan Stancek
2022-05-17 15:33 ` Cyril Hrubis [this message]
2022-05-19 9:56 ` Jan Stancek
2022-05-19 10:01 ` Cyril Hrubis
2022-05-19 10:13 ` Jan Stancek
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=YoPAMBxU5zuQ5xDk@yuki \
--to=chrubis@suse.cz \
--cc=jstancek@redhat.com \
--cc=ltp@lists.linux.it \
/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