From: Karel Zak <kzak@redhat.com>
To: Andreas Henriksson <andreas@fatal.se>
Cc: util-linux@vger.kernel.org
Subject: Re: [PATCH] libmount: special treatment for auto in fstype pattern
Date: Mon, 23 Jun 2014 12:47:50 +0200 [thread overview]
Message-ID: <20140623104750.GI25885@x2.net.home> (raw)
In-Reply-To: <1403466290-12880-1-git-send-email-andreas@fatal.se>
On Sun, Jun 22, 2014 at 09:44:50PM +0200, Andreas Henriksson wrote:
> However, merging `auto' with other types doesn't work as expected:
> mount -t ext2,auto /dev/sde /media/stick
> does not mount /dev/sde but returns:
> mount: unknown filesystem type 'auto'
Interesting use case.
> Trying multiple fstypes before allowing mount to guess makes sense in
> different scenarios, for example to prefer specific fstypes (ext2
> instead of ext3) or to try fstypes that mount doesn't guess (minix).
I hope libblkid is able to detect minix ;-)
> diff --git a/libmount/src/context_mount.c b/libmount/src/context_mount.c
> index dcfdabf..d07fa02 100644
> --- a/libmount/src/context_mount.c
> +++ b/libmount/src/context_mount.c
> @@ -782,6 +782,8 @@ static int do_mount_by_pattern(struct libmnt_context *cxt, const char *pattern)
> char *end = strchr(p, ',');
> if (end)
> *end = '\0';
> + if (strcmp(p, "auto") == 0)
> + p = NULL;
> rc = do_mount(cxt, p);
This is insufficient solution, the code has to call an FS detection
code. I have applied a little different solution.
Thanks!
Karel
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
prev parent reply other threads:[~2014-06-23 10:47 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-22 19:44 [PATCH] libmount: special treatment for auto in fstype pattern Andreas Henriksson
2014-06-23 10:47 ` Karel Zak [this message]
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=20140623104750.GI25885@x2.net.home \
--to=kzak@redhat.com \
--cc=andreas@fatal.se \
--cc=util-linux@vger.kernel.org \
/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