From: Artem Bityutskiy <dedekind1@gmail.com>
To: Brian Norris <computersforpeace@gmail.com>
Cc: linux-mtd@lists.infradead.org, Mike Frysinger <vapier.adi@gmail.com>
Subject: Re: [PATCH 09/10] mtdinfo: kill -m option
Date: Wed, 29 Jun 2011 09:02:25 +0300 [thread overview]
Message-ID: <1309327350.23597.96.camel@sauron> (raw)
In-Reply-To: <1309199247-19248-10-git-send-email-computersforpeace@gmail.com>
On Mon, 2011-06-27 at 11:27 -0700, Brian Norris wrote:
> According to feature-removal-schedule, we shouldn't use `-m', since
> it relies on a specific device-naming pattern.
>
> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
> ---
> feature-removal-schedule.txt | 8 --------
> ubi-utils/mtdinfo.c | 25 ++++++-------------------
> 2 files changed, 6 insertions(+), 27 deletions(-)
Pushed the series, thanks! I would also like to add the following patch
on top of your series, is ok with you?
From: Artem Bityutskiy <dedekind1@gmail.com>
Date: Wed, 29 Jun 2011 08:56:39 +0300
Subject: [PATCH] mtdinfo: remove -m leftovers
We have removed the -m option, but did not remove args.mtdn which represents
the -m parameters. Kill args.mtdn as well.
Signed-off-by: Artem Bityutskiy <dedekind1@gmail.com>
---
ubi-utils/mtdinfo.c | 22 +++++++++-------------
1 files changed, 9 insertions(+), 13 deletions(-)
diff --git a/ubi-utils/mtdinfo.c b/ubi-utils/mtdinfo.c
index dd5da53..4631f37 100644
--- a/ubi-utils/mtdinfo.c
+++ b/ubi-utils/mtdinfo.c
@@ -128,10 +128,8 @@ static int parse_opt(int argc, char * const argv[])
else if (optind < argc)
return errmsg("more then one MTD device specified (use -h for help)");
- if (args.all && (args.node || args.mtdn != -1)) {
- args.mtdn = -1;
+ if (args.all && args.node)
args.node = NULL;
- }
if (args.map && !args.node)
return errmsg("-M requires MTD device node name");
@@ -153,8 +151,7 @@ static int translate_dev(libmtd_t libmtd, const char *node)
"device \"%s\"", node);
}
- args.mtdn = mtd.mtd_num;
- return 0;
+ return mtd.mtd_num;
}
static void print_ubi_info(const struct mtd_info *mtd_info,
@@ -406,20 +403,19 @@ int main(int argc, char * const argv[])
return sys_errmsg("cannot get MTD information");
}
- if (args.node) {
+ if (!args.all) {
+ int mtdn;
+
/*
* A character device was specified, translate this to MTD
* device number.
*/
- err = translate_dev(libmtd, args.node);
- if (err)
+ mtdn = translate_dev(libmtd, args.node);
+ if (mtdn < 0)
goto out_libmtd;
- }
-
- if (args.mtdn == -1)
+ err = print_dev_info(libmtd, &mtd_info, mtdn);
+ } else
err = print_general_info(libmtd, &mtd_info, args.all);
- else
- err = print_dev_info(libmtd, &mtd_info, args.mtdn);
if (err)
goto out_libmtd;
--
1.7.5.4
--
Best Regards,
Artem Bityutskiy
next prev parent reply other threads:[~2011-06-29 6:01 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-27 18:27 [PATCH 00/10] more mtd-utils cleanup Brian Norris
2011-06-27 18:27 ` [PATCH 01/10] mtd-tests: checkfs: fix size_t related warning Brian Norris
2011-06-27 18:27 ` [PATCH 02/10] mtd-tests: io_paral: build error, "variable length strings" Brian Norris
2011-06-29 13:22 ` Josh Boyer
2011-06-29 15:45 ` Brian Norris
2011-06-27 18:27 ` [PATCH 03/10] mtd-utils: remove whitespace at end of lines Brian Norris
2011-06-27 18:27 ` [PATCH 04/10] mtd-utils: update .gitignore files Brian Norris
2011-06-27 18:27 ` [PATCH 05/10] mkfs.ubifs: use common.h Brian Norris
2011-06-27 18:27 ` [PATCH 06/10] mtd-utils: add common version printing function Brian Norris
2011-06-27 19:51 ` Mike Frysinger
2011-06-27 20:15 ` Brian Norris
2011-06-27 20:20 ` Mike Frysinger
2011-06-27 18:27 ` [PATCH 07/10] mtd-utils: switch more utils to unified versioning Brian Norris
2011-06-27 18:27 ` [PATCH 08/10] mtd-utils: kill flash_info Brian Norris
2011-06-27 18:27 ` [PATCH 09/10] mtdinfo: kill -m option Brian Norris
2011-06-29 6:02 ` Artem Bityutskiy [this message]
2011-06-29 16:09 ` [PATCH v2] mtdinfo: remove -m leftovers Brian Norris
2011-06-30 7:03 ` Artem Bityutskiy
2011-06-27 18:27 ` [PATCH 10/10] nanddump: remove unused variable Brian Norris
2011-06-27 19:52 ` [PATCH 00/10] more mtd-utils cleanup Mike Frysinger
2011-06-27 20:30 ` Brian Norris
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=1309327350.23597.96.camel@sauron \
--to=dedekind1@gmail.com \
--cc=computersforpeace@gmail.com \
--cc=linux-mtd@lists.infradead.org \
--cc=vapier.adi@gmail.com \
/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