> In my sh4 arch I got the following results: > # gcc -Wall -o test test.c > # ./test > name: '.' > name: '..' > name: '..' > result: Invalid argument It seems good. I see now that the exit condition is incorrect, that's why the entry '..' is doubled. At least the return value seems correct. Which version do you have?