mirror of
https://github.com/siemens-mobile-hacks/dc166-patch.git
synced 2026-11-25 19:37:24 +00:00
20 lines
426 B
C
20 lines
426 B
C
#include "dc166_fss.h"
|
|
#include <string.h>
|
|
|
|
int chdir(const char *name)
|
|
{
|
|
unsigned int length = strlen(name);
|
|
int result;
|
|
|
|
if (length >= FSS_MAXBUF) {
|
|
errno = ENAMETOOLONG;
|
|
return -1;
|
|
}
|
|
_fss_buffer.buff_size = (int)length + 5;
|
|
_fss_buffer.u1.call_id = FSS_CHDIR;
|
|
strcpy(_fss_buffer.u2.chdir.name, name);
|
|
_fss_break();
|
|
result = _fss_buffer.u1.retval;
|
|
DC166_FSS_SET_ERROR(result);
|
|
return result;
|
|
}
|