Maximum filename??

I knew that qnx is supported to 255 filename.

so i coded “test.c” at /hdd1.

mounted /dev/hd1 /hdd1

source is…

#include <string.h>
#include <stdio.h>
#include <errno.h>

int main()
{
FILE *fp;

    fp = fopen("123456789012345678901234567890123456789012345678901234567890.txt", "wb");

    if(!fp) printf("%s\n", strerror(errno));

    return 0;

}

and compile, execute test program.
#make test
#./test

then printed that “Filename too long”.

so… i tried to “dinit -h /dev/hd1”

and retried to “mount /dev/hd1 /hdd1”

and again compile, execute test program.
#make test
#./test

then created file “1234567890…txt”

what is this?

so i reboot and retried…

then printed that “Filename too long”.

wow… qnx was kidding me?? T.T

I want to create long filename.

so… what can i do?? please help.

Best Regards.

Oh!! I got it!!

The reason is… authority of /hdd1.

#chmod 777 /hdd1

If hdd1 got authority(777), can’t create long filename.

I don’t know exactly why…

Anyone know that?

I thought that the QNX4 filesystem was limited to 31 characters, or was it 40 something characters? QNX 6.3.2 still uses the QNX4 filesystem I believe.

from limits.h

PATH_MAX 255
NAME_MAX 48

hence path name can be 255 characters
base file name can only be 48 characters

hence fp = fopen(“123456789012345678901234567890123456789012345678901234567890.txt”, “wb”); is not possible

the b in “wb” is redundant. No such thing as text and binary files in QNX

openqnx.com/index.php?name=FAQ&id_cat=1