public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Stephen Warren <swarren@wwwdotorg.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2] fs: make it possible to read the filesystem UUID
Date: Tue, 11 Nov 2014 10:09:03 -0700	[thread overview]
Message-ID: <546242AF.80507@wwwdotorg.org> (raw)
In-Reply-To: <1415710543-2606-1-git-send-email-christian.gmeiner@gmail.com>

On 11/11/2014 05:55 AM, Christian Gmeiner wrote:
> Some filesystems have a UUID stored in its superblock. To
> allow using root=UUID=... for the kernel command line we
> need a way to read-out the filesystem UUID.

Just one more nit below, otherwise,

Acked-by: Stephen Warren <swarren@nvidia.com>

(feel free to add that the patch description for any repost)

> diff --git a/fs/ext4/ext4fs.c b/fs/ext4/ext4fs.c

> +int ext4fs_uuid(char *uuid_str)
> +{
> +	if (ext4fs_root == NULL)
> +		return -1;
> +
> +#ifdef CONFIG_LIB_UUID
> +	uuid_bin_to_str((unsigned char *)ext4fs_root->sblock.unique_id,
> +			uuid_str, UUID_STR_FORMAT_STD);
> +
> +	return 0;
> +#endif
> +
> +	return -ENOSYS;
> +}

If CONFIG_LIB_UUID is defined, doesn't that generate an unreachable code 
warning for the second return statement? I think you want a #if ... 
#else ... #endif to avoid that.

  reply	other threads:[~2014-11-11 17:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-11 12:55 [U-Boot] [PATCH v2] fs: make it possible to read the filesystem UUID Christian Gmeiner
2014-11-11 17:09 ` Stephen Warren [this message]
  -- strict thread matches above, loose matches on Subject: below --
2014-11-12 13:35 [U-Boot] [PATCH v3] " Christian Gmeiner
2014-11-12 13:35 ` [U-Boot] [PATCH v2] " Christian Gmeiner
2014-11-13  2:37   ` Simon Glass

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=546242AF.80507@wwwdotorg.org \
    --to=swarren@wwwdotorg.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