From: Stefan Bruens <stefan.bruens@rwth-aachen.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 8/8] fs/fat: fix case for FAT shortnames
Date: Sun, 13 Aug 2017 13:25:41 +0200 [thread overview]
Message-ID: <1682378.JdXeNk0VVD@pebbles.site> (raw)
In-Reply-To: <20170813104531.16407-9-robdclark@gmail.com>
On Sonntag, 13. August 2017 12:45:28 CEST Rob Clark wrote:
> Noticed when comparing our output to linux. There are some lcase bits
> which control whether filename and/or extension should be downcase'd.
>
> Signed-off-by: Rob Clark <robdclark@gmail.com>
> ---
> fs/fat/fat.c | 11 ++++++++---
> fs/fat/fat_write.c | 4 ++--
> include/fat.h | 3 +++
> 3 files changed, 13 insertions(+), 5 deletions(-)
>
> diff --git a/fs/fat/fat.c b/fs/fat/fat.c
> index 08a066d80d..8e1790a590 100644
> --- a/fs/fat/fat.c
> +++ b/fs/fat/fat.c
> @@ -31,7 +31,7 @@ static const int vfat_enabled = 0;
> /*
> * Convert a string to lowercase.
> */
> -static void downcase(char *str)
> +static void downcase(char *str, unsigned num)
> {
> while (*str != '\0') {
> *str = tolower(*str);
> @@ -131,10 +131,16 @@ static void get_name(dir_entry *dirent, char *s_name)
> ptr = s_name;
This change obviously lacks the actual code to handle num, and it would be
nice to have:
- a parameter description
- a mention that the len may be larger than strlen(str) if str is NULL
terminated.
And probably, "size_t len" instead of "unsigned num".
Regards,
Stefan
--
Stefan Brüns / Bergstraße 21 / 52062 Aachen
home: +49 241 53809034 mobile: +49 151 50412019
next prev parent reply other threads:[~2017-08-13 11:25 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-13 10:45 [U-Boot] [PATCH 0/8] fs/fat: cleanups + readdir implementation Rob Clark
2017-08-13 10:45 ` [U-Boot] [PATCH 1/8] fs/fat: split out helper to init fsdata Rob Clark
2017-08-13 10:45 ` [U-Boot] [PATCH 2/8] fs/fat: introduce new director iterators Rob Clark
2017-08-13 10:45 ` [U-Boot] [PATCH 3/8] fat/fs: convert to directory iterators Rob Clark
2017-08-13 10:45 ` [U-Boot] [PATCH 4/8] fs: add fs_readdir() Rob Clark
2017-08-13 10:45 ` [U-Boot] [PATCH 5/8] fs/fat: implement opendir/readdir/closedir Rob Clark
2017-08-13 10:45 ` [U-Boot] [PATCH 6/8] fat/fs: remove a bunch of dead code Rob Clark
2017-08-13 11:11 ` Stefan Bruens
2017-08-13 10:45 ` [U-Boot] [PATCH 7/8] fat/fs: move ls to generic implementation Rob Clark
2017-08-13 10:45 ` [U-Boot] [PATCH 8/8] fs/fat: fix case for FAT shortnames Rob Clark
2017-08-13 11:25 ` Stefan Bruens [this message]
2017-08-13 12:14 ` Rob Clark
2017-08-13 18:09 ` [U-Boot] [PATCH v2 " Rob Clark
2017-08-13 11:28 ` [U-Boot] [PATCH 0/8] fs/fat: cleanups + readdir implementation Heinrich Schuchardt
2017-08-13 12:13 ` Rob Clark
2017-08-13 21:13 ` Tom Rini
2017-08-13 21:50 ` Rob Clark
2017-08-13 21:59 ` Tom Rini
2017-08-14 12:48 ` Rob Clark
2017-08-14 13:05 ` Tom Rini
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=1682378.JdXeNk0VVD@pebbles.site \
--to=stefan.bruens@rwth-aachen.de \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.