From: Theodore Ts'o Date: Sat, 17 Dec 2011 19:01:15 +0000 (-0500) Subject: libext2fs: adjust the description when copying a bitmap X-Git-Tag: v1.42.1~31 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=4a61d17c7c4c09ce3bb5f77bdb9b90eb9f10e8c3;p=tools%2Fe2fsprogs.git libext2fs: adjust the description when copying a bitmap Label the copy of a bitmap as "copy of ..." so that the bitmap's description is more descriptive. Signed-off-by: "Theodore Ts'o" --- diff --git a/lib/ext2fs/gen_bitmap64.c b/lib/ext2fs/gen_bitmap64.c index 7b066a2..9dcca03 100644 --- a/lib/ext2fs/gen_bitmap64.c +++ b/lib/ext2fs/gen_bitmap64.c @@ -212,12 +212,12 @@ errcode_t ext2fs_copy_generic_bmap(ext2fs_generic_bitmap src, descr = src->description; if (descr) { - retval = ext2fs_get_mem(strlen(descr)+1, &new_descr); + retval = ext2fs_get_mem(strlen(descr)+10, &new_descr); if (retval) { ext2fs_free_mem(&new_bmap); return retval; } - strcpy(new_descr, descr); + sprintf(new_descr, "copy of %s", descr); new_bmap->description = new_descr; }