diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-12-20 17:15:53 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-12-20 17:15:53 -0500 |
commit | 810a4855513b9cb1a191301eb5e4e28b276cc318 (patch) | |
tree | ba9d7020e321c0736f04eb1c064e0561655004ac /scripts | |
parent | 6f8c9d2130893eda35ad9105e6e2a08db7f0da13 (diff) | |
parent | bd1ee804af8bdf2fd5131234330615f8aecbd9ed (diff) |
Merge branch 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild
Pull kbuild changes from Michal Marek:
"The kbuild changes are minimal this time:
- scripts/pnmlogo fix for some newer format
- minor top-level Makefile cleanup
- fix for a v3.5 regression with make clean M=<directory>"
* 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
kbuild: Do not remove vmlinux when cleaning external module
scripts/pnmtologo: fix for plain PBM
kbuild: Remove reference to uninitialised variable
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/pnmtologo.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/scripts/pnmtologo.c b/scripts/pnmtologo.c index 5c113123ed9f..68bb4efc5af4 100644 --- a/scripts/pnmtologo.c +++ b/scripts/pnmtologo.c | |||
@@ -74,6 +74,7 @@ static unsigned int logo_height; | |||
74 | static struct color **logo_data; | 74 | static struct color **logo_data; |
75 | static struct color logo_clut[MAX_LINUX_LOGO_COLORS]; | 75 | static struct color logo_clut[MAX_LINUX_LOGO_COLORS]; |
76 | static unsigned int logo_clutsize; | 76 | static unsigned int logo_clutsize; |
77 | static int is_plain_pbm = 0; | ||
77 | 78 | ||
78 | static void die(const char *fmt, ...) | 79 | static void die(const char *fmt, ...) |
79 | __attribute__ ((noreturn)) __attribute ((format (printf, 1, 2))); | 80 | __attribute__ ((noreturn)) __attribute ((format (printf, 1, 2))); |
@@ -103,6 +104,11 @@ static unsigned int get_number(FILE *fp) | |||
103 | val = 0; | 104 | val = 0; |
104 | while (isdigit(c)) { | 105 | while (isdigit(c)) { |
105 | val = 10*val+c-'0'; | 106 | val = 10*val+c-'0'; |
107 | /* some PBM are 'broken'; GiMP for example exports a PBM without space | ||
108 | * between the digits. This is Ok cause we know a PBM can only have a '1' | ||
109 | * or a '0' for the digit. */ | ||
110 | if (is_plain_pbm) | ||
111 | break; | ||
106 | c = fgetc(fp); | 112 | c = fgetc(fp); |
107 | if (c == EOF) | 113 | if (c == EOF) |
108 | die("%s: end of file\n", filename); | 114 | die("%s: end of file\n", filename); |
@@ -167,6 +173,7 @@ static void read_image(void) | |||
167 | switch (magic) { | 173 | switch (magic) { |
168 | case '1': | 174 | case '1': |
169 | /* Plain PBM */ | 175 | /* Plain PBM */ |
176 | is_plain_pbm = 1; | ||
170 | for (i = 0; i < logo_height; i++) | 177 | for (i = 0; i < logo_height; i++) |
171 | for (j = 0; j < logo_width; j++) | 178 | for (j = 0; j < logo_width; j++) |
172 | logo_data[i][j].red = logo_data[i][j].green = | 179 | logo_data[i][j].red = logo_data[i][j].green = |