Lines Matching refs:new
72 char new[128];
90 stat(new, &sb);
115 sprintf(new, "test.log.%05d", i);
116 if ((fd = open(new, O_RDWR | O_CREAT | O_TRUNC, 0644)) == -1)
117 err(1, "creat(%s)", new);
120 if ((r3 = stat(new, &sb3)) == -1)
121 err(1, "stat(%s)", new);
123 if (rename(logfile, new) == -1)
124 warn("rename(%s, %s)", logfile, new);
127 if (link(logfile, new) == -1)
128 err(1, "link(%s, %s)", logfile, new);
133 * stat() for logfile and new will be identical sometimes,
137 r2 = stat(new, &sb2);
145 "size = %jd\n", new , (uintmax_t)sb2.st_ino,
162 "size = %jd\n", new, (uintmax_t)sb2.st_ino,
167 "size = %jd\n", new, (uintmax_t)sb3.st_ino,
171 unlink(new);