- if ((ret = lseek(fd, pos, SEEK_SET)) == -1) {
- logit("%s: llseek: %s", __func__, strerror(errno));
- return (0);
- }
- if (ret != pos) {
- logit("%s: Couldn't seek to tty %s slot in %s",
- __func__, tty, UTMP_FILE);
- return (0);
- }
- if (atomicio(vwrite, fd, ut, sizeof(*ut)) != sizeof(*ut))
- logit("%s: error writing %s: %s", __func__,
+ (void)lseek(fd, (off_t)(tty * sizeof(struct utmp)), SEEK_SET);
+ if (atomicio(write, fd, ut, sizeof(*ut)) != sizeof(*ut))
+ log("utmp_write_direct: error writing %s: %s",