If I #include file jffs2.h from a .cpp (C++) file, I get a compilation error. The reason is that union jffs2_device_node has a "jint32_t new" field, but "new" is a reserved keyword in C++. Could you please rename that field?
I suppose we could.... do I want to know why you're including jffs2.h from a C++ file? It's only really exported to userspace for the benefit of mtd-utils.
(In reply to comment #1) > I suppose we could.... do I want to know why you're including jffs2.h from a > C++ file? It's only really exported to userspace for the benefit of > mtd-utils. Unfortunately mtd-utils is only a collection of executables and not a library for providing a API for user space access, e.g. from a C++ program. JFFS2 must be pointed to an erased Flash area. For handling and checking this case, we are missing some structures and defines within mtd-abi.h, so we are also including jffs2.h from a C++ file. For the first, it would be very helpfully if you rename the "jint32_t new". The ideal solution would be to provide a interface or function within "mtd-user.h" to check for a valid JFFS2 partition before the decision for erasing the flash sectors. Thank you in advance
Changing the field names would break the API and existing users