And use 'pathname' in the descriptions.
'pathname' is the POSIXly correct term, and 'path' is a reasonable
abbreviation for it in parameter names.
Cc: "G. Branden Robinson" <branden@debian.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
.nf
.B #include <unistd.h>
.P
-.BI "int acct(const char *_Nullable " filename );
+.BI "int acct(const char *_Nullable " path );
.fi
.P
.RS -4
The
.BR acct ()
system call enables or disables process accounting.
-If called with the name of an existing file as its argument,
+If called with the pathname of an existing file as its argument,
accounting is turned on,
-and records for each terminating process are appended to
-.I filename
+and records for each terminating process
+are appended to the file
as it terminates.
An argument of NULL causes accounting to be turned off.
.SH RETURN VALUE
Write permission is denied for the specified file,
or search permission is denied for one of the directories
in the path prefix of
-.I filename
+.I path
(see also
.BR path_resolution (7)),
or
-.I filename
+.I path
is not a regular file.
.TP
.B EFAULT
-.I filename
+.I path
points outside your accessible address space.
.TP
.B EIO
Error writing to the file
-.IR filename .
+.IR path .
.TP
.B EISDIR
-.I filename
+.I path
is a directory.
.TP
.B ELOOP
Too many symbolic links were encountered in resolving
-.IR filename .
+.IR path .
.TP
.B ENAMETOOLONG
-.I filename
+.I path
was too long.
.TP
.B ENFILE
The system-wide limit on the total number of open files has been reached.
.TP
.B ENOENT
-The specified file does not exist.
+The specified
+.I path
+does not exist.
.TP
.B ENOMEM
Out of memory.
.TP
.B ENOTDIR
A component used as a directory in
-.I filename
+.I path
is not in fact a directory.
.TP
.B EPERM
capability is required.
.TP
.B EROFS
-.I filename
+.I path
refers to a file on a read-only filesystem.
.TP
.B EUSERS
.nf
.B #include <utime.h>
.P
-.BI "int utime(const char *" filename ,
+.BI "int utime(const char *" path ,
.BI " const struct utimbuf *_Nullable " times );
.P
.B #include <sys/time.h>
.P
-.BI "int utimes(const char *" filename ,
+.BI "int utimes(const char *" path ,
.BI " const struct timeval " times "[_Nullable 2]);"
.fi
.SH DESCRIPTION
.BR utime ()
system call
changes the access and modification times of the inode specified by
-.I filename
+.I path
to the
.IR actime " and " modtime
fields of
capability).
.TP
.B EFAULT
-.I filename
+.I path
points to an invalid address.
.TP
.B ENOENT
-.I filename
+.I path
does not exist.
.TP
.B EPERM
.B #include <db.h>
.B #include <fcntl.h>
.P
-.BI "DB *dbopen(const char *" file ", int " flags ", int " mode \
+.BI "DB *dbopen(const char *" path ", int " flags ", int " mode \
", DBTYPE " type ,
.BI " const void *" openinfo );
.fi
.P
.BR dbopen ()
opens
-.I file
+.I path
for reading and/or writing.
Files never intended to be preserved on disk may be created by setting
the
-.I file
+.I path
argument to NULL.
.P
The
processes which call
.BR dbopen ()
with the same
-.I file
+.I path
name.
This file descriptor may be safely used as an argument to the
.BR fcntl (2)
.nf
.B #include <dlfcn.h>
.P
-.BI "void *dlopen(const char *" filename ", int " flags );
+.BI "void *dlopen(const char *" path ", int " flags );
.BI "int dlclose(void *" handle );
.P
.B #define _GNU_SOURCE
.br
.B #include <dlfcn.h>
.P
-.BI "void *dlmopen(Lmid_t " lmid ", const char *" filename ", int " flags );
+.BI "void *dlmopen(Lmid_t " lmid ", const char *" path ", int " flags );
.fi
.SH DESCRIPTION
.SS dlopen()
loads the dynamic shared object (shared library)
file named by the null-terminated
string
-.I filename
+.I path
and returns an opaque "handle" for the loaded object.
This handle is employed with other functions in the dlopen API, such as
.BR dlsym (3),
.BR dlclose ().
.P
If
-.I filename
+.I path
.\" FIXME On Solaris, when handle is NULL, we seem to get back
.\" a handle for (something like) the root of the namespace.
.\" The point here is that if we do a dlmopen(LM_ID_NEWLM), then
-.\" the filename==NULL case returns a different handle than
+.\" the path==NULL case returns a different handle than
.\" in the initial namespace. But, on glibc, the same handle is
.\" returned. This is probably a bug in glibc.
.\"
is NULL, then the returned handle is for the main program.
If
-.I filename
+.I path
contains a slash ("/"), then it is interpreted as a (relative
or absolute) pathname.
Otherwise, the dynamic linker searches for the object as follows
(maintained by
.BR ldconfig (8))
is checked to see whether it contains an entry for
-.IR filename .
+.IR path .
.IP \[bu]
The directories
.I /lib
are searched (in that order).
.P
If the object specified by
-.I filename
+.I path
has dependencies on other shared objects,
then these are also automatically loaded by the dynamic linker
using the same rules.
contained in objects that have already been loaded.
.P
If
-.I filename
+.I path
is NULL, then the returned handle is for the main program.
When given to
.BR dlsym (3),
.SS dlmopen()
This function performs the same task as
.BR dlopen ()\[em]the
-.I filename
+.I path
and
.I flags
arguments, as well as the return value, are the same,
since the new namespace is initially empty.
.P
If
-.I filename
+.I path
is NULL, then the only permitted value for
.I lmid
is
.B #include <sys/time.h>
.P
.BI "int futimes(int " fd ", const struct timeval " tv [2]);
-.BI "int lutimes(const char *" filename ", const struct timeval " tv [2]);
+.BI "int lutimes(const char *" path ", const struct timeval " tv [2]);
.fi
.P
.RS -4
changes the access and modification times of a file in the same way as
.BR utimes (2),
with the difference that if
-.I filename
+.I path
refers to a symbolic link, then the link is not dereferenced:
instead, the timestamps of the symbolic link are changed.
.SH RETURN VALUE
.B #include <stdio.h>
.B #include <mntent.h>
.P
-.BI "FILE *setmntent(const char *" filename ", const char *" type );
+.BI "FILE *setmntent(const char *" path ", const char *" type );
.P
.BI "struct mntent *getmntent(FILE *" stream );
.P
The
.BR setmntent ()
function opens the filesystem description file
-.I filename
+.I path
and returns a file pointer which can be used by
.BR getmntent ().
The argument
.B void setutent(void);
.B void endutent(void);
.P
-.BI "int utmpname(const char *" file );
+.BI "int utmpname(const char *" path );
.fi
.SH DESCRIPTION
New applications should use the POSIX.1-specified "utmpx" versions of
these functions; see STANDARDS.
.P
.BR utmpname ()
-sets the name of the utmp-format file for the other utmp
+sets the pathname of the utmp-format file for the other utmp
functions to access.
If
.BR utmpname ()
-is not used to set the filename
+is not used to set the pathname
before the other functions are used, they assume
.BR _PATH_UTMP ,
as defined in
.nf
.B #include <utmp.h>
.P
-.BI "void updwtmp(const char *" wtmp_file ", const struct utmp *" ut );
+.BI "void updwtmp(const char *" wtmp_path ", const struct utmp *" ut );
.BI "void logwtmp(const char *" line ", const char *" name \
", const char *" host );
.fi
.EX
.BR "#define _GNU_SOURCE " "/* See feature_test_macros(7) */"
.B #include <utmpx.h>
-.BI "void updwtmpx (const char *" wtmpx_file ", const struct utmpx *" utx );
+.BI "void updwtmpx (const char *" wtmpx_path ", const struct utmpx *" utx );
.EE
.in
.P