Use scnprintf() instead of snprintf(). See http://linux.bkbits.net:8080/linux-2.5/cset@xxxxxxxxxxx for more details. --- diff/drivers/md/dm-mpath.c 2004-02-25 13:31:36.000000000 -0600 +++ source/drivers/md/dm-mpath.c 2004-02-25 13:31:07.000000000 -0600 @@ -612,7 +612,7 @@ char buffer[32]; #define EMIT(x...) sz += ((sz >= maxlen) ? \ - 0 : snprintf(result + sz, maxlen - sz, x)) + 0 : scnprintf(result + sz, maxlen - sz, x)) switch (type) { case STATUSTYPE_INFO: --- diff/drivers/md/dm-raid1.c 2004-02-25 13:31:36.000000000 -0600 +++ source/drivers/md/dm-raid1.c 2004-02-25 13:30:53.000000000 -0600 @@ -1192,28 +1192,28 @@ switch (type) { case STATUSTYPE_INFO: - sz += snprintf(result + sz, maxlen - sz, "%d ", ms->nr_mirrors); + sz += scnprintf(result + sz, maxlen - sz, "%d ", ms->nr_mirrors); for (m = 0; m < ms->nr_mirrors; m++) { format_dev_t(buffer, ms->mirror[m].dev->bdev->bd_dev); - sz += snprintf(result + sz, maxlen - sz, "%s ", buffer); + sz += scnprintf(result + sz, maxlen - sz, "%s ", buffer); } - sz += snprintf(result + sz, maxlen - sz, + sz += scnprintf(result + sz, maxlen - sz, SECTOR_FORMAT "/" SECTOR_FORMAT, ms->rh.log->type->get_sync_count(ms->rh.log), ms->nr_regions); break; case STATUSTYPE_TABLE: - sz += snprintf(result + sz, maxlen - sz, + sz += scnprintf(result + sz, maxlen - sz, "%s 1 " SECTOR_FORMAT " %d ", ms->rh.log->type->name, ms->rh.region_size, ms->nr_mirrors); for (m = 0; m < ms->nr_mirrors; m++) { format_dev_t(buffer, ms->mirror[m].dev->bdev->bd_dev); - sz += snprintf(result + sz, maxlen - sz, + sz += scnprintf(result + sz, maxlen - sz, "%s " SECTOR_FORMAT " ", buffer, ms->mirror[m].offset); }