summaryrefslogtreecommitdiff
path: root/dtc.c
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2007-12-04 14:26:15 +1100
committerJon Loeliger <jdl@freescale.com>2007-12-04 07:54:03 -0600
commit92cb9a25b1a9117f4dacb0bce8c16b90b73b8698 (patch)
treefee6764026b45208e0f11e5066930b002b307e14 /dtc.c
parent2d72816ccfdcfd8039ab0b8883f9eeac895984bb (diff)
downloaddtc-92cb9a25b1a9117f4dacb0bce8c16b90b73b8698.tar.gz
dtc: Add many const qualifications
This adds 'const' qualifiers to many variables and functions. In particular it's now used for passing names to the tree accesor functions. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'dtc.c')
-rw-r--r--dtc.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/dtc.c b/dtc.c
index 179c303..01131d7 100644
--- a/dtc.c
+++ b/dtc.c
@@ -31,7 +31,7 @@ int reservenum; /* Number of memory reservation slots */
int minsize; /* Minimum blob size */
int padsize; /* Additional padding to blob */
-char *join_path(char *path, char *name)
+char *join_path(const char *path, const char *name)
{
int lenp = strlen(path);
int lenn = strlen(name);
@@ -55,10 +55,10 @@ char *join_path(char *path, char *name)
return str;
}
-void fill_fullpaths(struct node *tree, char *prefix)
+void fill_fullpaths(struct node *tree, const char *prefix)
{
struct node *child;
- char *unit;
+ const char *unit;
tree->fullpath = join_path(prefix, tree->name);
@@ -112,11 +112,11 @@ static void __attribute__ ((noreturn)) usage(void)
int main(int argc, char *argv[])
{
struct boot_info *bi;
- char *inform = "dts";
- char *outform = "dts";
- char *outname = "-";
+ const char *inform = "dts";
+ const char *outform = "dts";
+ const char *outname = "-";
int force = 0, check = 0;
- char *arg;
+ const char *arg;
int opt;
FILE *inf = NULL;
FILE *outf = NULL;