Lines Matching refs:fname
47 static int state_read_file(struct sandbox_state *state, const char *fname) in state_read_file() argument
53 ret = os_get_filesize(fname, &size); in state_read_file()
55 printf("Cannot find sandbox state file '%s'\n", fname); in state_read_file()
63 fd = os_open(fname, OS_O_RDONLY); in state_read_file()
65 printf("Cannot open sandbox state file '%s'\n", fname); in state_read_file()
70 printf("Cannot read sandbox state file '%s'\n", fname); in state_read_file()
143 int sandbox_read_state(struct sandbox_state *state, const char *fname) in sandbox_read_state() argument
150 if (state->read_state && fname) { in sandbox_read_state()
151 ret = state_read_file(state, fname); in sandbox_read_state()
168 if (state->read_state && fname) { in sandbox_read_state()
169 debug("Read sandbox state from '%s'%s\n", fname, in sandbox_read_state()
236 int sandbox_write_state(struct sandbox_state *state, const char *fname) in sandbox_write_state() argument
285 fd = os_open(fname, OS_O_WRONLY | OS_O_CREAT); in sandbox_write_state()
287 printf("Cannot open sandbox state file '%s'\n", fname); in sandbox_write_state()
292 printf("Cannot write sandbox state file '%s'\n", fname); in sandbox_write_state()
298 debug("Wrote sandbox state to '%s'%s\n", fname, in sandbox_write_state()