* [PATCH] Define the default version
@ 2007-03-15 23:46 Jerry Van Baren
0 siblings, 0 replies; only message in thread
From: Jerry Van Baren @ 2007-03-15 23:46 UTC (permalink / raw)
To: linuxppc-dev
[-- 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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2007-03-15 23:46 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-15 23:46 [PATCH] Define the default version Jerry Van Baren
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).