int
login_utmp_only(struct logininfo *li)
{
- li->type = LTYPE_LOGIN;
+ li->type = LTYPE_LOGIN;
login_set_current_time(li);
# ifdef USE_UTMP
utmp_write_entry(li);
}
(void)lseek(fd, (off_t)(tty * sizeof(struct utmp)), SEEK_SET);
- if (atomicio(write, fd, ut, sizeof(*ut)) != sizeof(*ut))
+ if (atomicio(vwrite, fd, ut, sizeof(*ut)) != sizeof(*ut))
logit("utmp_write_direct: error writing %s: %s",
UTMP_FILE, strerror(errno));
return 0;
}
if (fstat(fd, &buf) == 0)
- if (atomicio(write, fd, ut, sizeof(*ut)) != sizeof(*ut)) {
+ if (atomicio(vwrite, fd, ut, sizeof(*ut)) != sizeof(*ut)) {
ftruncate(fd, buf.st_size);
logit("wtmp_write: problem writing %s: %s",
WTMP_FILE, strerror(errno));
}
if (fstat(fd, &buf) == 0)
- if (atomicio(write, fd, utx, sizeof(*utx)) != sizeof(*utx)) {
+ if (atomicio(vwrite, fd, utx, sizeof(*utx)) != sizeof(*utx)) {
ftruncate(fd, buf.st_size);
logit("wtmpx_write: problem writing %s: %s",
WTMPX_FILE, strerror(errno));
return(0);
/* write the entry */
- if (atomicio(write, fd, &last, sizeof(last)) != sizeof(last)) {
+ if (atomicio(vwrite, fd, &last, sizeof(last)) != sizeof(last)) {
close(fd);
logit("lastlog_write_filemode: Error writing to %s: %s",
LASTLOG_FILE, strerror(errno));
lastlog_populate_entry(li, &last);
return (1);
case -1:
- error("%s: Error reading from %s: %s", __func__,
+ error("%s: Error reading from %s: %s", __func__,
LASTLOG_FILE, strerror(errno));
return (0);
default: