jingfei195887 commented on code in PR #3130:
URL: https://github.com/apache/nuttx-apps/pull/3130#discussion_r2234891024
##########
examples/mtdpart/mtdpart_main.c:
##########
@@ -179,22 +179,12 @@ int main(int argc, FAR char *argv[])
* interesting.
*/
- ret = ftl_initialize(0, master);
+ ret = register_mtddriver("/dev/mtd0", master, 0775, NULL);
if (ret < 0)
{
- printf("ERROR: ftl_initialize /dev/mtdblock0 failed: %d\n", ret);
- fflush(stdout);
- exit(2);
- }
-
- /* Now create a character device on the block device */
-
- ret = bchdev_register("/dev/mtdblock0", "/dev/mtd0", false);
- if (ret < 0)
- {
- printf("ERROR: bchdev_register /dev/mtd0 failed: %d\n", ret);
- fflush(stdout);
- exit(3);
+ printf("ERROR: register_mtddriver /dev/mtd0 failed: %d\n", ret);
+ status = 2;
+ goto errout;
Review Comment:
yes now we use different err lable for error handling
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]