public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: AKASHI Takahiro <takahiro.akashi@linaro.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v3 2/4] fs: add fs_get_type() for current filesystem type
Date: Mon, 7 Oct 2019 11:13:15 +0900	[thread overview]
Message-ID: <20191007021314.GT18778@linaro.org> (raw)
In-Reply-To: <bb3d4e15-556c-e278-bd1d-7a52679af5d1@gmx.de>

On Fri, Oct 04, 2019 at 09:04:59PM +0200, Heinrich Schuchardt wrote:
> On 10/4/19 5:05 AM, AKASHI Takahiro wrote:
> > This function is a variant of fs_get_type_name() and returns a filesystem
> > type with which the current device is associated.
> > We don't want to export fs_type variable directly because we have to take
> > care of it consistently within fs.c.
> >
> > Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
> 
> Looking at fs/fs.c there seems to be a lot of inconsistency in the usage
> of FS_TYPE_ANY. Some of the file system functions set fs_type =
> FS_TYPE_ANY before calling fs_close(). Others don't. Shouldn't we move
> those assignments to fs_close() to get consistency?

Another patch.

> FS_TYPE_ANY seems to be misnomer and could be replaced by FS_TYPE_NONE.
> 
> Please, use scripts/get_maintainer in future to determine the addressees
> of patches. I have put the missing ones on CC now.

There is no dedicated maintainer for "fs" sub-system,
so Tom was included here after MAINTAINERS.

-Takahiro Akashi


> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
> 
> 
> > ---
> >  fs/fs.c      | 13 +++++++++++++
> >  include/fs.h | 10 ++++++++++
> >  2 files changed, 23 insertions(+)
> >
> > diff --git a/fs/fs.c b/fs/fs.c
> > index 64ba25fea8bf..e5307dbeaa37 100644
> > --- a/fs/fs.c
> > +++ b/fs/fs.c
> > @@ -307,6 +307,19 @@ static struct fstype_info *fs_get_info(int fstype)
> >  	return info;
> >  }
> >
> > +/**
> > + * fs_get_type() - Get type of current filesystem
> > + *
> > + * Return: filesystem type
> > + *
> > + * Returns filesystem type representing the current filesystem, or
> > + * FS_TYPE_ANY for any unrecognised filesystem.
> > + */
> > +int fs_get_type(void)
> > +{
> > +	return fs_type;
> > +}
> > +
> >  /**
> >   * fs_get_type_name() - Get type of current filesystem
> >   *
> > diff --git a/include/fs.h b/include/fs.h
> > index 5a1244d57fd2..6dfdb5c5307a 100644
> > --- a/include/fs.h
> > +++ b/include/fs.h
> > @@ -44,6 +44,16 @@ int fs_set_blk_dev_with_part(struct blk_desc *desc, int part);
> >   */
> >  void fs_close(void);
> >
> > +/**
> > + * fs_get_type() - Get type of current filesystem
> > + *
> > + * Return: filesystem type
> > + *
> > + * Returns filesystem type representing the current filesystem, or
> > + * FS_TYPE_ANY for any unrecognised filesystem.
> > + */
> > +int fs_get_type(void);
> > +
> >  /**
> >   * fs_get_type_name() - Get type of current filesystem
> >   *
> >
> 

  reply	other threads:[~2019-10-07  2:13 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-04  3:05 [U-Boot] [PATCH v3 0/4] efi_loader: disk: install FILE_SYSTEM_PROTOCOL to whole disk AKASHI Takahiro
2019-10-04  3:05 ` [U-Boot] [PATCH v3 1/4] fs: export fs_close() AKASHI Takahiro
2019-10-04 18:53   ` Heinrich Schuchardt
2019-10-07  2:08     ` AKASHI Takahiro
2019-10-04  3:05 ` [U-Boot] [PATCH v3 2/4] fs: add fs_get_type() for current filesystem type AKASHI Takahiro
2019-10-04 19:04   ` Heinrich Schuchardt
2019-10-07  2:13     ` AKASHI Takahiro [this message]
2019-10-04  3:05 ` [U-Boot] [PATCH v3 3/4] efi_loader: disk: install FILE_SYSTEM_PROTOCOL only if available AKASHI Takahiro
2019-10-04 19:13   ` Heinrich Schuchardt
2019-10-07  2:15     ` AKASHI Takahiro
2019-10-04  3:05 ` [U-Boot] [PATCH v3 4/4] efi_loader: disk: install file system protocol to a whole disk AKASHI Takahiro
2019-10-04 19:15   ` Heinrich Schuchardt
2019-10-07  2:27     ` AKASHI Takahiro

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=20191007021314.GT18778@linaro.org \
    --to=takahiro.akashi@linaro.org \
    --cc=u-boot@lists.denx.de \
    /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