Skip to content

examples: Update ftl_initialize usage in code and Kconfig after kernel side change. #3147

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions examples/media/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ config EXAMPLES_MEDIA
MTD drivers need an additional wrapper layer, the FTL wrapper must
first be used to convert the MTD driver to a block device:

int ret = ftl_initialize(<N>, mtd);
int ret = ftl_initialize(/dev/mtdblock<N>, mtd);
ret = bchdev_register(/dev/mtdblock<N>, <path-to-character-driver>,
false);

Expand All @@ -45,7 +45,7 @@ config EXAMPLES_MEDIA_DEVPATH
MTD drivers need an additional wrapper layer, the FTL wrapper must
first be used to convert the MTD driver to a block device:

int ret = ftl_initialize(<N>, mtd);
int ret = ftl_initialize(/dev/mtdblock<N>, mtd);
ret = bchdev_register(/dev/mtdblock<N>, <path-to-character-driver>,
false);

Expand Down
2 changes: 1 addition & 1 deletion examples/mtdrwb/mtdrwb_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@
* interesting.
*/

ret = ftl_initialize(0, mtdrwb);
ret = ftl_initialize("/dev/mtdblock0", mtdrwb, 0);

Check failure on line 183 in examples/mtdrwb/mtdrwb_main.c

View workflow job for this annotation

GitHub Actions / Linux (sim-02)

too many arguments to function 'ftl_initialize'

Check warning on line 183 in examples/mtdrwb/mtdrwb_main.c

View workflow job for this annotation

GitHub Actions / Linux (sim-02)

passing argument 1 of 'ftl_initialize' makes integer from pointer without a cast [-Wint-conversion]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should build fine after apache/nuttx#16793 is merged :-)

if (ret < 0)
{
printf("ERROR: ftl_initialize /dev/mtdblock0 failed: %d\n", ret);
Expand Down
Loading