Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ dm_settime(3C) — Reliant UNIX 5.44c4

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

stat(2)

utime(2)

types(5)

dm_settime(3C)                                               dm_settime(3C)

NAME
     dmsettime, dmfsettime - set all file times

SYNOPSIS
     #include <sys/types.h>

     int dmsettime(file, atp, mtp, ctp)
     char *file;
     struct timeval *atp, *mtp, *ctp;

     int dmfsettime(fd, atp, mtp, ctp)
     int fd;
     struct timeval *atp, *mtp, *ctp;

DESCRIPTION
     dmsettime() and dmfsettime() allow the access, modification, and
     change times of a file [as returned by stat(2)] to be set indepen-
     dently. These calls are intended for use by data management applica-
     tions performing services such as file backup, recovery, and migra-
     tion. Use of these calls is restricted to the super-user.

     In the case where the named file is a symbolic link, dmsettime()
     operates on the symbolic link itself. dmfsettime() is like
     dmsettime() but works with an open file referenced by the argument
     descriptor, such as would be obtained by an open(2) call.

     If any of atp, mtp, or ctp is NULL, then the file's access, modified,
     or change time respectively will not be changed. If atp is not NULL,
     the file's access time is set to the specified value. If mtp is not
     NULL, the file's modification time is set to the specified value. If
     ctp is not NULL, the file's change time is set to the specified value.
     Unlike utime(2), the file access or modification time can be set
     without altering the file's change time.

RETURN VALUES
     dmsettime() and dmfsettime() returns:

     0   on success.

     -1  on failure and sets errno to indicate the error.

DIAGNOSTICS
     EPERM          The effective user ID of the process is not super-user.

     EINVAL         The file system containing the file does not support
                    independent setting of file times.

     EROFS          The file system containing the file is mounted read-
                    only.

     EIO            An I/O error occurred while reading from or writing to
                    the file system.



Page 1                       Reliant UNIX 5.44                Printed 11/98

dm_settime(3C)                                               dm_settime(3C)

     In addition, dmsettime() will fail if one or more of the following
     are true:

     ELOOP          Too many symbolic links were encountered in translating
                    file.

     ENOENT         The file referred to by file does not exist.

     ENOTDIR        A component of the path prefix of file is not a direc-
                    tory.

     EACCES         Search permission is denied for a component of the path
                    prefix of file.

     EFAULT         file, atp, mtp, or ctp points outside the process'
                    allocated address space.

     In addition, dmfsettime() will fail if one or more of the following
     are true:

     EBADF          fd is not a valid open file descriptor.

     EFAULT         atp, mtp, or ctp points outside the process' allocated
                    address space.

SEE ALSO
     stat(2), utime(2), types(5).



























Page 2                       Reliant UNIX 5.44                Printed 11/98

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026