Lines Matching refs:s
57 static void fix_stat(const char *path, struct stat *s) in fix_stat() argument
71 s->st_uid = p->uid; in fix_stat()
72 s->st_gid = p->gid; in fix_stat()
73 s->st_mode = p->mode | (s->st_mode & ~07777); in fix_stat()
77 s->st_uid = empty_path_config->uid; in fix_stat()
78 s->st_gid = empty_path_config->gid; in fix_stat()
79 s->st_mode = empty_path_config->mode | (s->st_mode & ~07777); in fix_stat()
82 unsigned st_mode = s->st_mode; in fix_stat()
83 fs_config(path, S_ISDIR(s->st_mode), target_out_path, in fix_stat()
84 &s->st_uid, &s->st_gid, &st_mode, &capabilities); in fix_stat()
85 s->st_mode = (typeof(s->st_mode)) st_mode; in fix_stat()
89 static void _eject(struct stat *s, char *out, int olen, char *data, unsigned datasize) in _eject() argument
101 fix_stat(out, s); in _eject()
108 s->st_mode, in _eject()
141 struct stat s; in _eject_trailer() local
142 memset(&s, 0, sizeof(s)); in _eject_trailer()
143 _eject(&s, "TRAILER!!!", 10, 0, 0); in _eject_trailer()
232 struct stat s; in _archive() local
239 if(lstat(in, &s)) die("could not stat '%s'\n", in); in _archive()
241 if(S_ISREG(s.st_mode)){ in _archive()
248 tmp = (char*) malloc(s.st_size); in _archive()
249 if(tmp == 0) die("cannot allocate %d bytes", s.st_size); in _archive()
251 if(read(fd, tmp, s.st_size) != s.st_size) { in _archive()
252 die("cannot read %d bytes", s.st_size); in _archive()
255 _eject(&s, out, olen, tmp, s.st_size); in _archive()
259 } else if(S_ISDIR(s.st_mode)) { in _archive()
260 _eject(&s, out, olen, 0, 0); in _archive()
262 } else if(S_ISLNK(s.st_mode)) { in _archive()
267 _eject(&s, out, olen, buf, size); in _archive()
269 die("Unknown '%s' (mode %d)?\n", in, s.st_mode); in _archive()