All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jerry Van Baren <gerald.vanbaren@comcast.net>
To: linuxppc-dev@ozlabs.org
Subject: [PATCH] Define the default version
Date: Thu, 15 Mar 2007 19:46:52 -0400	[thread overview]
Message-ID: <45F9DAEC.30005@comcast.net> (raw)

[-- Attachment #1: Type: text/plain, Size: 169 bytes --]

Jon, David:

Thanks for updating dtc to v17.  This is a trivial patch to fix the 
usage (permanently) to show the correct version number in the usage help.

Thanks,
gvb

[-- Attachment #2: 0001-Define-the-default-version.txt --]
[-- Type: text/plain, Size: 1556 bytes --]

The default version is used in two places (someday maybe more).  Create
a #define to set the default version in one place.

Signed-off-by: vanbaren@cideas.com <vanbaren@cideas.com>
---
 dtc.c     |    4 ++--
 flat_dt.h |    2 ++
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/dtc.c b/dtc.c
index f15d90f..61956f1 100644
--- a/dtc.c
+++ b/dtc.c
@@ -92,7 +92,7 @@ static void usage(void)
 	fprintf(stderr, "\t\t\tdtb - device tree blob\n");
 	fprintf(stderr, "\t\t\tasm - assembler source\n");
 	fprintf(stderr, "\t-V <output version>\n");
-	fprintf(stderr, "\t\tBlob version to produce, defaults to 16 (relevant for dtb\n\t\tand asm output only)\n");
+	fprintf(stderr, "\t\tBlob version to produce, defaults to %d (relevant for dtb\n\t\tand asm output only)\n", OF_DEFAULT_VERSION);
 	fprintf(stderr, "\t-R <number>\n");
 	fprintf(stderr, "\t\tMake space for <number> reserve map entries (relevant for \n\t\tdtb and asm output only)\n");
 	fprintf(stderr, "\t-b <number>\n");
@@ -113,7 +113,7 @@ int main(int argc, char *argv[])
 	int opt;
 	FILE *inf = NULL;
 	FILE *outf = NULL;
-	int outversion = 17;
+	int outversion = OF_DEFAULT_VERSION;
 	int reservenum = 1;
 	int boot_cpuid_phys = 0xfeedbeef;
 
diff --git a/flat_dt.h b/flat_dt.h
index d5abd80..a8482b4 100644
--- a/flat_dt.h
+++ b/flat_dt.h
@@ -2,6 +2,8 @@
 #define _FLAT_DT_H_
 
 
+#define OF_DEFAULT_VERSION	17
+
 #define OF_DT_HEADER            0xd00dfeed      /* 4: version, 4: total size */
 
 #define OF_DT_BEGIN_NODE	0x1             /* Start node: full name */
-- 
1.4.4.4


                 reply	other threads:[~2007-03-15 23:46 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=45F9DAEC.30005@comcast.net \
    --to=gerald.vanbaren@comcast.net \
    --cc=linuxppc-dev@ozlabs.org \
    /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.