diff --git a/mkllfs/main.c b/mkllfs/main.c index 6c21641..fd11f8c 100644 --- a/mkllfs/main.c +++ b/mkllfs/main.c @@ -1,7 +1,7 @@ /** * @file main.c * @brief Converts files to a C file that can be used by llfs (linked list file system). - * @version 0.2.0 + * @version 0.2.1 * @author Lorenz C. */ @@ -10,7 +10,7 @@ #include #include "tinydir.h" -#define VERSION "0.2.0" +#define VERSION "0.2.1" #define LLFS_VERSION "0.1.1" #define MAX_PATH_LEN 256 @@ -125,7 +125,7 @@ int main(int argc, char** argv) { // Make the last file the root file of the llfs fprintf(out_file, "\n"); - fprintf(out_file, "const struct llfs_data_file *llfs_root = &%s;\n", prev_llfs_name); + fprintf(out_file, "const struct llfs_data_file *llfs_root =%s%s;\n", (strcmp(prev_llfs_name, "NULL") == 0 ? " " : " &"), prev_llfs_name); // Print the number of files printf("Successfully converted %d files.\r\n", file_count);