diff options
author | David Gibson <david@gibson.dropbear.id.au> | 2008-08-06 22:24:17 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2008-08-20 02:34:58 -0400 |
commit | ed95d7450dcbfeb45ffc9d39b1747aee82b49a51 (patch) | |
tree | faca7d89e2907e1407161f967477ed2ae21d46bb /arch/powerpc/boot/dtc-src/srcpos.h | |
parent | 0ec27c049d80535f77901654a310b090106b046c (diff) |
powerpc: Update in-kernel dtc and libfdt to version 1.2.0
Some time ago, a copies of the upstream dtc and libfdt sources were
included in the kernel tree to avoid having these as external
dependencies for building the kernel. Since then development on the
upstream dtc and libfdt has continued. This updates the in-kernel
versions to match the recently released upstream dtc version 1.2.0.
This includes a number of bugfixes, many cleanups and a few new
features.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/boot/dtc-src/srcpos.h')
-rw-r--r-- | arch/powerpc/boot/dtc-src/srcpos.h | 30 |
1 files changed, 20 insertions, 10 deletions
diff --git a/arch/powerpc/boot/dtc-src/srcpos.h b/arch/powerpc/boot/dtc-src/srcpos.h index ce7ab5ba5b46..e17c7c04db8e 100644 --- a/arch/powerpc/boot/dtc-src/srcpos.h +++ b/arch/powerpc/boot/dtc-src/srcpos.h | |||
@@ -22,13 +22,21 @@ | |||
22 | * array of all opened filenames. | 22 | * array of all opened filenames. |
23 | */ | 23 | */ |
24 | 24 | ||
25 | #include <stdio.h> | ||
26 | |||
27 | struct dtc_file { | ||
28 | char *dir; | ||
29 | const char *name; | ||
30 | FILE *file; | ||
31 | }; | ||
32 | |||
25 | #if ! defined(YYLTYPE) && ! defined(YYLTYPE_IS_DECLARED) | 33 | #if ! defined(YYLTYPE) && ! defined(YYLTYPE_IS_DECLARED) |
26 | typedef struct YYLTYPE { | 34 | typedef struct YYLTYPE { |
27 | int first_line; | 35 | int first_line; |
28 | int first_column; | 36 | int first_column; |
29 | int last_line; | 37 | int last_line; |
30 | int last_column; | 38 | int last_column; |
31 | int filenum; | 39 | struct dtc_file *file; |
32 | } YYLTYPE; | 40 | } YYLTYPE; |
33 | 41 | ||
34 | #define YYLTYPE_IS_DECLARED 1 | 42 | #define YYLTYPE_IS_DECLARED 1 |
@@ -48,7 +56,7 @@ typedef struct YYLTYPE { | |||
48 | (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ | 56 | (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ |
49 | (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ | 57 | (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ |
50 | (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ | 58 | (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ |
51 | (Current).filenum = YYRHSLOC (Rhs, N).filenum; \ | 59 | (Current).file = YYRHSLOC (Rhs, N).file; \ |
52 | } \ | 60 | } \ |
53 | else \ | 61 | else \ |
54 | { \ | 62 | { \ |
@@ -56,20 +64,22 @@ typedef struct YYLTYPE { | |||
56 | YYRHSLOC (Rhs, 0).last_line; \ | 64 | YYRHSLOC (Rhs, 0).last_line; \ |
57 | (Current).first_column = (Current).last_column = \ | 65 | (Current).first_column = (Current).last_column = \ |
58 | YYRHSLOC (Rhs, 0).last_column; \ | 66 | YYRHSLOC (Rhs, 0).last_column; \ |
59 | (Current).filenum = YYRHSLOC (Rhs, 0).filenum; \ | 67 | (Current).file = YYRHSLOC (Rhs, 0).file; \ |
60 | } \ | 68 | } \ |
61 | while (YYID (0)) | 69 | while (YYID (0)) |
62 | 70 | ||
63 | 71 | ||
64 | 72 | ||
65 | extern void yyerror(char const *); | 73 | extern void yyerror(char const *); |
74 | extern void yyerrorf(char const *, ...) __attribute__((format(printf, 1, 2))); | ||
66 | 75 | ||
67 | extern int srcpos_filenum; | 76 | extern struct dtc_file *srcpos_file; |
68 | 77 | ||
69 | extern int push_input_file(const char *filename); | 78 | struct search_path { |
70 | extern int pop_input_file(void); | 79 | const char *dir; /* NULL for current directory */ |
80 | struct search_path *prev, *next; | ||
81 | }; | ||
71 | 82 | ||
72 | extern FILE *dtc_open_file(const char *fname); | 83 | extern struct dtc_file *dtc_open_file(const char *fname, |
73 | extern int lookup_file_name(const char *fname, int add_it); | 84 | const struct search_path *search); |
74 | extern const char *srcpos_filename_for_num(int filenum); | 85 | extern void dtc_close_file(struct dtc_file *file); |
75 | const char *srcpos_get_filename(void); | ||