/* Check for valid initial mode character */
if (!strchr("rwa", *mode)) {
/* Check for valid initial mode character */
if (!strchr("rwa", *mode)) {
if (*mode != 'r') flags |= O_CREAT;
if (*mode == 'w') flags |= O_TRUNC;
if (*mode == 'a') flags |= O_APPEND;
if (*mode != 'r') flags |= O_CREAT;
if (*mode == 'w') flags |= O_TRUNC;
if (*mode == 'a') flags |= O_APPEND;
- fd = syscall(SYS_open, filename, flags|O_LARGEFILE, 0666);
+ fd = syscall_cp(SYS_open, filename, flags|O_LARGEFILE, 0666);