upd: It seems that OpenFastDir() calls Open(directory_name, 0, 0x124), ReadFastDir reads entries from this file... If this is true, we don't need any xxxFastDir(), we can make own

I support this idea, but it's to late to do any investigations - I need some sleep.
I'll do some tests tomorrow after work. You will certainly check if VxWorks behaves identical, I assume
update:I did some tests and successfully found out that I'm not a C programmer

This goes into include/stdlib.h
typedef struct {
char fname[8];
char fext[3];
char attr; // is there a numeric one-byte-datatype?
char reserved[10];
short time;
short date;
short start_cluster;
int fsize;
} fat_de;
typedef struct {
char seqno; // numeric
char fname_p1[10];
char attr; // numeric
char reserved;
char chksum;
char fname_p2[12];
short start_cluster; // always 0 for lfn-entries
char fname_p3[4];
} fat_lfn;
And this goes into spytask
if (cnt == 100) {
char *de_char; // one directory entry
fat_de *de; // one directory entry
fat_lfn *lfn; // long filename entry
char cur_de[50]; // text-output of current entry
char lfn_part[255];// long filename
int dh = open("A/CHDK", 0, 0444);
de_char = malloc(32);
de = (fat_de*) de_char;
lfn = (fat_lfn*) de_char;
if (dh > 0) {
int lnr = 0;
while (read(dh, de_char, 32) > 0) { // get next entry
if (lnr > 15) { continue; } // can't display more
if (de_char[0] == 0) { continue; } // empty entry
if (de_char[0] == 0xe5 ){ continue; } // deleted entry
if ((int)de->attr == 0x0f) { // lfn
char tmp[12];
// new lfn, truncate string
if ((int) lfn->seqno == 1) { lfn_part[0] = 0; }
// add pieces of filename from lfn-entry to previous entry
strncpy(tmp, lfn->fname_p1, 10);
strcat(lfn_part, tmp);
strncpy(tmp, lfn->fname_p2, 12);
strcat(lfn_part, tmp);
strncpy(tmp, lfn->fname_p3, 4);
strcat(lfn_part, tmp);
// this doesn't work (displays unusual characters)
sprintf(cur_de, "%s :%x", lfn_part, de->attr);
draw_txt_string(0, lnr++, cur_de, 0xff);
}
else { // regular filename
sprintf(cur_de, "%s :%x", de->fname, de->attr);
draw_txt_string(0, lnr++, cur_de, 0xff);
}
}
} else {
strcpy(cur_de, "dopen failed.");
draw_txt_string(4, 4, cur_de, 0xff);
}
close(dh);
free(de_char);
}
We do indeed get raw directory entries and can stitch together long filenames but my code doesn't show this very well. Someone who knows more about this computer-thingies is invited to fix my code.
Anyway, the basic idea of reading the directories ourselves does work and we get exactly what's in the FAT specs.
Cheers.