Lines 1352-1359
Link Here
|
1352 |
static int |
1352 |
static int |
1353 |
before_syscall_open_char(const char *func, const char *file, const char *mode) |
1353 |
before_syscall_open_char(const char *func, const char *file, const char *mode) |
1354 |
{ |
1354 |
{ |
1355 |
if ((strcmp(mode, "r") == 0) || (strcmp(mode, "rb") == 0) |
1355 |
if (*mode == 'r' && ((strcmp(mode, "r") == 0) || |
1356 |
|| (strcmp(mode, "rm") == 0)) { |
1356 |
/* The strspn accept args are known non-writable modifiers */ |
|
|
1357 |
(strlen(++mode) == strspn(mode, "xbtmc")))) { |
1357 |
return before_syscall("open_rd", file); |
1358 |
return before_syscall("open_rd", file); |
1358 |
} else { |
1359 |
} else { |
1359 |
return before_syscall("open_wr", file); |
1360 |
return before_syscall("open_wr", file); |