diff options
author | Steven Whitehouse <swhiteho@redhat.com> | 2006-03-20 12:47:40 -0500 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2006-03-20 12:47:40 -0500 |
commit | 9a21247181d93fdf99255911845ecdb041d21583 (patch) | |
tree | 6d69be36f8a2bd8c76bf02ead2f0121a511c0a92 /scripts | |
parent | c752666c17f870fa8ae9f16804dd457e9e6daaec (diff) | |
parent | 7705a8792b0fc82fd7d4dd923724606bbfd9fb20 (diff) |
Merge branch 'master'
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/mod/file2alias.c | 2 | ||||
-rw-r--r-- | scripts/mod/modpost.c | 9 |
2 files changed, 3 insertions, 8 deletions
diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c index be97caf664b..c164b230ad6 100644 --- a/scripts/mod/file2alias.c +++ b/scripts/mod/file2alias.c @@ -246,7 +246,7 @@ static int do_ccw_entry(const char *filename, id->cu_model); ADD(alias, "dt", id->match_flags&CCW_DEVICE_ID_MATCH_DEVICE_TYPE, id->dev_type); - ADD(alias, "dm", id->match_flags&CCW_DEVICE_ID_MATCH_DEVICE_TYPE, + ADD(alias, "dm", id->match_flags&CCW_DEVICE_ID_MATCH_DEVICE_MODEL, id->dev_model); return 1; } diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c index f70ff13d481..b8b2a560b26 100644 --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c @@ -508,12 +508,7 @@ buf_printf(struct buffer *buf, const char *fmt, ...) va_start(ap, fmt); len = vsnprintf(tmp, SZ, fmt, ap); - if (buf->size - buf->pos < len + 1) { - buf->size += 128; - buf->p = realloc(buf->p, buf->size); - } - strncpy(buf->p + buf->pos, tmp, len + 1); - buf->pos += len; + buf_write(buf, tmp, len); va_end(ap); } @@ -521,7 +516,7 @@ void buf_write(struct buffer *buf, const char *s, int len) { if (buf->size - buf->pos < len) { - buf->size += len; + buf->size += len + SZ; buf->p = realloc(buf->p, buf->size); } strncpy(buf->p + buf->pos, s, len); |