Compare commits

...

1 Commits

Author SHA1 Message Date
Christopher Haster
3f99e73841 Fixed some issues in lfs_migrate
- Bad size used for writing out softtail tag
- Use of sizeof address instead of intended target
2019-11-14 14:34:49 -06:00

4
lfs.c
View File

@@ -4614,7 +4614,7 @@ int lfs_migrate(lfs_t *lfs, const struct lfs_config *cfg) {
id, entry1.d.nlen), name},
{LFS_MKTAG(
isdir ? LFS_TYPE_DIRSTRUCT : LFS_TYPE_CTZSTRUCT,
id, sizeof(&entry1.d.u)), &entry1.d.u}));
id, sizeof(entry1.d.u)), &entry1.d.u}));
lfs1_entry_fromle32(&entry1.d);
if (err) {
goto cleanup;
@@ -4637,7 +4637,7 @@ int lfs_migrate(lfs_t *lfs, const struct lfs_config *cfg) {
lfs_pair_tole32(dir2.pair);
err = lfs_dir_commit(lfs, &dir2, LFS_MKATTRS(
{LFS_MKTAG(LFS_TYPE_SOFTTAIL, 0x3ff, 0),
{LFS_MKTAG(LFS_TYPE_SOFTTAIL, 0x3ff, 8),
dir1.d.tail}));
lfs_pair_fromle32(dir2.pair);
if (err) {