Lines Matching refs:s
56 static void fix_stat(const char *path, struct stat *s) in fix_stat() argument
69 s->st_uid = p->uid; in fix_stat()
70 s->st_gid = p->gid; in fix_stat()
71 s->st_mode = p->mode | (s->st_mode & ~07777); in fix_stat()
75 s->st_uid = empty_path_config->uid; in fix_stat()
76 s->st_gid = empty_path_config->gid; in fix_stat()
77 s->st_mode = empty_path_config->mode | (s->st_mode & ~07777); in fix_stat()
81 fs_config(path, S_ISDIR(s->st_mode), &s->st_uid, &s->st_gid, &s->st_mode); in fix_stat()
85 static void _eject(struct stat *s, char *out, int olen, char *data, unsigned datasize) in _eject() argument
97 fix_stat(out, s); in _eject()
104 s->st_mode, in _eject()
137 struct stat s; in _eject_trailer() local
138 memset(&s, 0, sizeof(s)); in _eject_trailer()
139 _eject(&s, "TRAILER!!!", 10, 0, 0); in _eject_trailer()
226 struct stat s; in _archive() local
233 if(lstat(in, &s)) die("could not stat '%s'\n", in); in _archive()
235 if(S_ISREG(s.st_mode)){ in _archive()
242 tmp = (char*) malloc(s.st_size); in _archive()
243 if(tmp == 0) die("cannot allocate %d bytes", s.st_size); in _archive()
245 if(read(fd, tmp, s.st_size) != s.st_size) { in _archive()
246 die("cannot read %d bytes", s.st_size); in _archive()
249 _eject(&s, out, olen, tmp, s.st_size); in _archive()
253 } else if(S_ISDIR(s.st_mode)) { in _archive()
254 _eject(&s, out, olen, 0, 0); in _archive()
256 } else if(S_ISLNK(s.st_mode)) { in _archive()
261 _eject(&s, out, olen, buf, size); in _archive()
263 die("Unknown '%s' (mode %d)?\n", in, s.st_mode); in _archive()