Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 31592
b: refs/heads/master
c: 534b89a
h: refs/heads/master
v: v3
  • Loading branch information
Sam Ravnborg committed Jul 1, 2006
1 parent 5ceb996 commit c61de89
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 66392c4f2246641c13b5dc60d15b09a71e09276f
refs/heads/master: 534b89a9f6a86a28300cd71619112c4bbca7c0ae
9 changes: 6 additions & 3 deletions trunk/scripts/mod/modpost.c
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,8 @@ static const char *export_str(enum export ex)
static enum export export_no(const char * s)
{
int i;
if (!s)
return export_unknown;
for (i = 0; export_list[i].export != export_unknown; i++) {
if (strcmp(export_list[i].str, s) == 0)
return export_list[i].export;
Expand Down Expand Up @@ -1271,7 +1273,7 @@ static void write_if_changed(struct buffer *b, const char *fname)
}

/* parse Module.symvers file. line format:
* 0x12345678<tab>symbol<tab>module[<tab>export]
* 0x12345678<tab>symbol<tab>module[[<tab>export]<tab>something]
**/
static void read_dump(const char *fname, unsigned int kernel)
{
Expand All @@ -1284,7 +1286,7 @@ static void read_dump(const char *fname, unsigned int kernel)
return;

while ((line = get_next_line(&pos, file, size))) {
char *symname, *modname, *d, *export;
char *symname, *modname, *d, *export, *end;
unsigned int crc;
struct module *mod;
struct symbol *s;
Expand All @@ -1297,7 +1299,8 @@ static void read_dump(const char *fname, unsigned int kernel)
*modname++ = '\0';
if ((export = strchr(modname, '\t')) != NULL)
*export++ = '\0';

if (export && ((end = strchr(export, '\t')) != NULL))
*end = '\0';
crc = strtoul(line, &d, 16);
if (*symname == '\0' || *modname == '\0' || *d != '\0')
goto fail;
Expand Down

0 comments on commit c61de89

Please sign in to comment.