Lines Matching refs:stb
318 struct stat stb;
332 if ((opts & FOLLOW ? stat(target, &stb) : lstat(target, &stb)) < 0) {
341 if ((u = update(rname, opts, &stb)) == 0) {
342 if ((stb.st_mode & S_IFMT) == S_IFREG && stb.st_nlink > 1)
343 (void) savelink(&stb, opts);
347 if (pw == NULL || pw->pw_uid != stb.st_uid)
348 if ((pw = getpwuid(stb.st_uid)) == NULL) {
350 target, stb.st_uid);
352 sprintf(user, ":%d", stb.st_uid);
354 if (gr == NULL || gr->gr_gid != stb.st_gid)
355 if ((gr = getgrgid(stb.st_gid)) == NULL) {
357 target, stb.st_gid);
359 sprintf(group, ":%d", stb.st_gid);
370 switch (stb.st_mode & S_IFMT) {
377 opts, stb.st_mode & 07777, protoname(), protogroup(),
424 if (stb.st_nlink > 1) {
427 if ((lp = savelink(&stb, opts)) != NULL) {
449 opts, stb.st_mode & 07777, stb.st_size, stb.st_mtime,
456 sizerr = (readlink(target, buf, RDIST_BUFSIZ) != stb.st_size);
457 (void) deswrite(rem, buf, stb.st_size, 0);
459 printf("readlink = %.*s\n", (int)stb.st_size, buf);
478 if (stb.st_nlink > 1) {
481 if ((lp = savelink(&stb, opts)) != NULL) {
507 stb.st_mode & 07777, stb.st_size, stb.st_mtime,
520 for (i = 0; i < stb.st_size; i += RDIST_BUFSIZ) {
522 if (i + amt > stb.st_size)
523 amt = stb.st_size - i;
736 struct stat stb;
748 if (lstat(target, &stb) < 0) {
757 switch (stb.st_mode & S_IFMT) {
759 (void) sprintf(buf, "Y%ld %ld\n", stb.st_size, stb.st_mtime);
784 struct stat stb;
859 if (lstat(target, &stb) == 0) {
860 if (ISDIR(stb.st_mode)) {
861 if ((stb.st_mode & 07777) == mode) {
867 stb.st_mode & 07777, mode);
1022 * in stb. Otherwise, do it now.
1025 (void) lstat(new, &stb);
1026 tvp[0].tv_sec = stb.st_atime; /* old atime from target */
1058 struct stat stb;
1089 if (lstat(target, &stb) == 0) {
1090 int mode = stb.st_mode & S_IFMT;
1106 nstb.st_mode == stb.st_mode &&
1107 nstb.st_ino == stb.st_ino &&
1108 nstb.st_dev == stb.st_dev) {
1139 struct stat stb;
1145 if (lstat(name, &stb) < 0) {
1151 } else if (ISDIR(stb.st_mode)) {
1236 struct stat stb;
1270 else if (lstat(target, &stb) < 0)
1319 struct stat stb;
1354 if (lstat(target, &stb) < 0) {
1372 (void) recursive_remove(&stb);
1392 struct stat stb;
1432 if (lstat(target, &stb) < 0) {
1436 recursive_remove(&stb);