I use for all testing commands a data structure:
Code: Select all
struct devel {
const char cmd_testname[CMD_LEN];
void (*func)(void);
}
So that array has 11 elements, and everithing working fine. But now i adde a new command, and something goes wrong.
In fact now, when i try to log-in my os (with a very basic login method based on a username a simply file passwd) the function called for user checking is called (and i'm sure of it) but two strange thing happens:
1. printf doesn't work
2. when i call:
Code: Select all
fd=open("/passwd", O_RDONLY, 0);
if i force the user_check function to success (so every username inserted is accepted) the rest of the operatiing system works fine.
I don't have any idea why it happen, probably a memory problem, but where to start?
Any help?
P.s. sorry for my bad english