Search code examples
u-boot

what does the fatls output on uboot terminal show


I am using a iMX8 processor. I am stopping the Uboot to check what files are present in the fat32 system. it shows the output of the name of the file present but what does the number preceding it mean?


Solution

  • If we trace through the code a bit we get down to fs/fs.c and fs_ls_generic, with:

            while ((dent = fs_readdir(dirs))) {
                    if (dent->type == FS_DT_DIR) {
                            printf("            %s/\n", dent->name);
                            ndirs++;
                    } else if (dent->type == FS_DT_LNK) {
                            printf("    <SYM>   %s\n", dent->name);
                            nfiles++;
                    } else {
                            printf(" %8lld   %s\n", dent->size, dent->name);
                            nfiles++;
                    }
            }
    

    So the number before the name is the filesize.