mkfs.cramfs: properly copy disk name

Signed-off-by: Karel Zak <kzak@redhat.com>
This commit is contained in:
Karel Zak 2018-10-03 17:07:37 +02:00
parent 22fbfdb8f5
commit 561472a40d
1 changed files with 2 additions and 2 deletions

View File

@ -418,9 +418,9 @@ static unsigned int write_superblock(struct entry *root, char *base, int size)
memset(super->name, 0x00, sizeof(super->name));
if (opt_name)
strncpy((char *)super->name, opt_name, sizeof(super->name));
str2memcpy((char *)super->name, opt_name, sizeof(super->name));
else
strncpy((char *)super->name, "Compressed", sizeof(super->name));
str2memcpy((char *)super->name, "Compressed", sizeof(super->name));
super->root.mode = root->mode;
super->root.uid = root->uid;