public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: "Brian Norris" <computersforpeace@gmail.com>
To: "Artem Bityutskiy" <dedekind1@gmail.com>
Cc: brian.foster@maxim-ic.com,
	Brian Norris <computersforpeace@gmail.com>,
	linux-mtd@lists.infradead.org,
	Mike Frysinger <vapier.adi@gmail.com>
Subject: [PATCH v2 2/5] mtdinfo: refactor code to remove "args.all" dependency
Date: Tue, 9 Aug 2011 14:36:43 -0700	[thread overview]
Message-ID: <1312925806-15929-3-git-send-email-computersforpeace@gmail.com> (raw)
In-Reply-To: <1312925806-15929-1-git-send-email-computersforpeace@gmail.com>

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
---
 ubi-utils/mtdinfo.c |   13 +++----------
 1 files changed, 3 insertions(+), 10 deletions(-)

diff --git a/ubi-utils/mtdinfo.c b/ubi-utils/mtdinfo.c
index b4a2f4c..0a20c76 100644
--- a/ubi-utils/mtdinfo.c
+++ b/ubi-utils/mtdinfo.c
@@ -338,8 +338,7 @@ static int print_dev_info(libmtd_t libmtd, const struct mtd_info *mtd_info, int
 	return 0;
 }
 
-static int print_general_info(libmtd_t libmtd, const struct mtd_info *mtd_info,
-			      int all)
+static int print_general_info(libmtd_t libmtd, const struct mtd_info *mtd_info)
 {
 	int i, err, first = 1;
 	struct mtd_dev_info mtd;
@@ -366,15 +365,9 @@ static int print_general_info(libmtd_t libmtd, const struct mtd_info *mtd_info,
 		}
 	}
 	printf("\n");
-	printf("Sysfs interface supported:      %s\n",
+	printf("Sysfs interface supported:      %s\n\n",
 	       mtd_info->sysfs_supported ? "yes" : "no");
 
-	if (!all)
-		return 0;
-
-	first = 1;
-	printf("\n");
-
 	for (i = mtd_info->lowest_mtd_num;
 	     i <= mtd_info->highest_mtd_num; i++) {
 		err = print_dev_info(libmtd, mtd_info, i);
@@ -421,7 +414,7 @@ int main(int argc, char * const argv[])
 			goto out_libmtd;
 		err = print_dev_info(libmtd, &mtd_info, mtdn);
 	} else
-		err = print_general_info(libmtd, &mtd_info, args.all);
+		err = print_general_info(libmtd, &mtd_info);
 	if (err)
 		goto out_libmtd;
 
-- 
1.7.0.4

  parent reply	other threads:[~2011-08-09 21:37 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-09 21:36 [PATCH v2 0/5] bugfix, cleanup for mtdinfo Brian Norris
2011-08-09 21:36 ` [PATCH v2 1/5] mtdinfo: don't open NULL pointer when getting region_info with `-a' Brian Norris
2011-08-11  4:31   ` Mike Frysinger
2011-08-09 21:36 ` Brian Norris [this message]
2011-08-11  4:33   ` [PATCH v2 2/5] mtdinfo: refactor code to remove "args.all" dependency Mike Frysinger
2011-08-09 21:36 ` [PATCH v2 3/5] mtdinfo: restructure help message Brian Norris
2011-08-11  4:33   ` Mike Frysinger
2011-08-09 21:36 ` [PATCH v2 4/5] mtdinfo: fixup "example usage" help section Brian Norris
2011-08-11  4:33   ` Mike Frysinger
2011-08-09 21:36 ` [PATCH v2 5/5] mtdinfo: consolidate help as display_help() Brian Norris
2011-08-11  4:33   ` Mike Frysinger
2011-08-11 16:19     ` [PATCH v3 " Brian Norris
2011-08-11 17:15       ` Mike Frysinger
2011-08-12  7:06       ` Brian Foster
2011-08-12 16:37         ` Brian Norris
2011-08-13 18:10           ` Mike Frysinger
2011-08-15 17:27             ` Brian Norris
2011-08-16  4:00               ` Mike Frysinger
2011-08-16  7:18                 ` Brian Foster
2011-08-16 17:12                   ` Brian Norris
2011-08-17  8:02                     ` Brian Foster
2011-08-15 20:17       ` [PATCH v4 " Brian Norris
2011-08-16 14:15 ` [PATCH v2 0/5] bugfix, cleanup for mtdinfo Artem Bityutskiy

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=1312925806-15929-3-git-send-email-computersforpeace@gmail.com \
    --to=computersforpeace@gmail.com \
    --cc=brian.foster@maxim-ic.com \
    --cc=dedekind1@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