jingfei195887 commented on code in PR #16642: URL: https://github.com/apache/nuttx/pull/16642#discussion_r2190272205
########## drivers/mtd/ftl.c: ########## @@ -914,5 +1010,5 @@ int ftl_initialize(int minor, FAR struct mtd_dev_s *mtd) /* Do the real work by ftl_initialize_by_path */ snprintf(path, DEV_NAME_MAX, "/dev/mtdblock%d", minor); - return ftl_initialize_by_path(path, mtd); + return ftl_initialize_by_path(path, mtd, O_RDWR); Review Comment: As I described before, in order to pass oflags to the FTL during the open process, we had to modify `ftl_initialize_by_path`. However, there's no need to do this for `ftl_initialize`, because when we use this interface to register MTD devices, we assume that users want to determine the FTL's behavior at the time of registration, which aligns with the logic in previous applications. When an application requires direct write mode, it should use `register_mtddriver` for device registration and open the device with the O_DIRECT oflag or just use `ftl_initialize_by_path` -- 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: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org