summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2011-12-17 14:01:15 -0500
committerTheodore Ts'o <tytso@mit.edu>2011-12-18 01:12:44 -0500
commit4a61d17c7c4c09ce3bb5f77bdb9b90eb9f10e8c3 (patch)
tree891a752e87dc1dae3d42ddb0bf21bfdc5d12a16c
parent830b44f4385eb255d08fe0c8b200f8d8e3e97a8d (diff)
downloade2fsprogs-4a61d17c7c4c09ce3bb5f77bdb9b90eb9f10e8c3.tar.gz
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" <tytso@mit.edu>
-rw-r--r--lib/ext2fs/gen_bitmap64.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/ext2fs/gen_bitmap64.c b/lib/ext2fs/gen_bitmap64.c
index 7b066a2e..9dcca03a 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;
}