add cmu and userid patch

This commit is contained in:
刘可亮
2024-12-02 11:10:03 +08:00
parent a89bc72654
commit 08c1394167
5 changed files with 42 additions and 37 deletions

View File

@@ -37,7 +37,7 @@ static int read_userid(struct mtd_dev *mtd, size_t offset, u8 *buf, size_t size)
if (mtd->erasesize < USERID_MAX_SIZE)
remain = mtd->erasesize;
else
remain = USERID_MAX_SIZE;
remain = size;
ptr = buf;
while ((remain > 0) && (offset < end)) {

View File

@@ -42,7 +42,7 @@ static int read_userid(struct rt_mtd_nand_device *mtd, size_t offset, u8 *buf, s
if (erasesize < USERID_MAX_SIZE)
remain = erasesize;
else
remain = USERID_MAX_SIZE;
remain = size;
ptr = buf;
while ((remain > 0) && (offset < end)) {