Lines Matching refs:s
40 static void fix_stat(const char *path, struct stat *s) in fix_stat() argument
42 fs_config(path, S_ISDIR(s->st_mode), &s->st_uid, &s->st_gid, &s->st_mode); in fix_stat()
45 static void _eject(struct stat *s, char *out, int olen, char *data, unsigned datasize) in _eject() argument
57 fix_stat(out, s); in _eject()
64 s->st_mode, in _eject()
97 struct stat s; in _eject_trailer() local
98 memset(&s, 0, sizeof(s)); in _eject_trailer()
99 _eject(&s, "TRAILER!!!", 10, 0, 0); in _eject_trailer()
186 struct stat s; in _archive() local
193 if(lstat(in, &s)) die("could not stat '%s'\n", in); in _archive()
195 if(S_ISREG(s.st_mode)){ in _archive()
202 tmp = (char*) malloc(s.st_size); in _archive()
203 if(tmp == 0) die("cannot allocate %d bytes", s.st_size); in _archive()
205 if(read(fd, tmp, s.st_size) != s.st_size) { in _archive()
206 die("cannot read %d bytes", s.st_size); in _archive()
209 _eject(&s, out, olen, tmp, s.st_size); in _archive()
213 } else if(S_ISDIR(s.st_mode)) { in _archive()
214 _eject(&s, out, olen, 0, 0); in _archive()
216 } else if(S_ISLNK(s.st_mode)) { in _archive()
221 _eject(&s, out, olen, buf, size); in _archive()
223 die("Unknown '%s' (mode %d)?\n", in, s.st_mode); in _archive()