sinh.3, sockatmark.3, stdarg.3, stpcpy.3, syslog.3, system.3, tanh.3, termios.3, wctrans.3, wctype.3, wcwidth.3, wordexp.3, cciss.4, fuse.4, initrd.4, loop.4, acct.5, hosts.5, nss.5, operator.7, unix.7: ffix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2017-08-19 10:28:45 +02:00
parent 207050fa9e
commit a2b7a14421
21 changed files with 119 additions and 100 deletions

View File

@ -68,8 +68,8 @@ These functions return the hyperbolic sine of
.IR x , .IR x ,
which which
is defined mathematically as: is defined mathematically as:
.PP
.nf .nf
sinh(x) = (exp(x) \- exp(\-x)) / 2 sinh(x) = (exp(x) \- exp(\-x)) / 2
.fi .fi
.SH RETURN VALUE .SH RETURN VALUE

View File

@ -113,8 +113,8 @@ The following code can be used after receipt of a
.B SIGURG .B SIGURG
signal to read (and discard) all data up to the mark, signal to read (and discard) all data up to the mark,
and then read the byte of data at the mark: and then read the byte of data at the mark:
.nf .PP
.EX
char buf[BUF_LEN]; char buf[BUF_LEN];
char oobdata; char oobdata;
int atmark, s; int atmark, s;
@ -142,7 +142,7 @@ and then read the byte of data at the mark:
... ...
} }
} }
.fi .EE
.SH SEE ALSO .SH SEE ALSO
.BR fcntl (2), .BR fcntl (2),
.BR recv (2), .BR recv (2),

View File

@ -310,8 +310,8 @@ The function
.I foo .I foo
takes a string of format characters and prints out the argument associated takes a string of format characters and prints out the argument associated
with each format character based on the type. with each format character based on the type.
.nf .PP
.EX
#include <stdio.h> #include <stdio.h>
#include <stdarg.h> #include <stdarg.h>
@ -342,4 +342,4 @@ foo(char *fmt, ...)
} }
va_end(ap); va_end(ap);
} }
.fi .EE

View File

@ -102,8 +102,8 @@ and
to produce to produce
.BR foobar , .BR foobar ,
which it then prints. which it then prints.
.nf .PP
.EX
#define _GNU_SOURCE #define _GNU_SOURCE
#include <string.h> #include <string.h>
#include <stdio.h> #include <stdio.h>
@ -118,7 +118,7 @@ main(void)
to = stpcpy(to, "bar"); to = stpcpy(to, "bar");
printf("%s\\n", buffer); printf("%s\\n", buffer);
} }
.fi .EE
.SH SEE ALSO .SH SEE ALSO
.BR bcopy (3), .BR bcopy (3),
.BR memccpy (3), .BR memccpy (3),

View File

@ -350,10 +350,12 @@ Most portable is to use a string constant.
.PP .PP
Never pass a string with user-supplied data as a format, Never pass a string with user-supplied data as a format,
use the following instead: use the following instead:
.nf .PP
.in +4n
syslog(priority, "%s", string); .EX
.fi syslog(priority, "%s", string);
.EE
.in
.SH SEE ALSO .SH SEE ALSO
.BR logger (1), .BR logger (1),
.BR journalctl (1), .BR journalctl (1),

View File

@ -161,17 +161,18 @@ This may make programs that call it
from a loop uninterruptible, unless they take care themselves from a loop uninterruptible, unless they take care themselves
to check the exit status of the child. to check the exit status of the child.
For example: For example:
.br .PP
.nf .in +4n
.EX
while (something) {
int ret = system("foo");
while (something) { if (WIFSIGNALED(ret) &&
int ret = system("foo"); (WTERMSIG(ret) == SIGINT || WTERMSIG(ret) == SIGQUIT))
break;
if (WIFSIGNALED(ret) && }
(WTERMSIG(ret) == SIGINT || WTERMSIG(ret) == SIGQUIT)) .EE
break; .in
}
.fi
.PP .PP
Do not use Do not use
.BR system () .BR system ()

View File

@ -67,8 +67,8 @@ These functions return the hyperbolic tangent of
.IR x , .IR x ,
which which
is defined mathematically as: is defined mathematically as:
.PP
.nf .nf
tanh(x) = sinh(x) / cosh(x) tanh(x) = sinh(x) / cosh(x)
.fi .fi
.SH RETURN VALUE .SH RETURN VALUE

View File

@ -842,15 +842,18 @@ input is available character by character,
echoing is disabled, and all special processing of echoing is disabled, and all special processing of
terminal input and output characters is disabled. terminal input and output characters is disabled.
The terminal attributes are set as follows: The terminal attributes are set as follows:
.nf .PP
.in +4n
termios_p\->c_iflag &= ~(IGNBRK | BRKINT | PARMRK | ISTRIP .EX
| INLCR | IGNCR | ICRNL | IXON); termios_p\->c_iflag &= ~(IGNBRK | BRKINT | PARMRK | ISTRIP
termios_p\->c_oflag &= ~OPOST; | INLCR | IGNCR | ICRNL | IXON);
termios_p\->c_lflag &= ~(ECHO | ECHONL | ICANON | ISIG | IEXTEN); termios_p\->c_oflag &= ~OPOST;
termios_p\->c_cflag &= ~(CSIZE | PARENB); termios_p\->c_lflag &= ~(ECHO | ECHONL | ICANON | ISIG | IEXTEN);
termios_p\->c_cflag |= CS8; termios_p\->c_cflag &= ~(CSIZE | PARENB);
.fi termios_p\->c_cflag |= CS8;
.EE
.in
.\"
.SS Line control .SS Line control
.PP .PP
.BR tcsendbreak () .BR tcsendbreak ()
@ -926,8 +929,8 @@ pointed to by
.BR cfsetospeed () .BR cfsetospeed ()
sets the output baud rate stored in the \fItermios\fP structure pointed sets the output baud rate stored in the \fItermios\fP structure pointed
to by \fItermios_p\fP to \fIspeed\fP, which must be one of these constants: to by \fItermios_p\fP to \fIspeed\fP, which must be one of these constants:
.PP
.nf .nf
.ft B .ft B
B0 B0
B50 B50
@ -949,8 +952,8 @@ to by \fItermios_p\fP to \fIspeed\fP, which must be one of these constants:
B115200 B115200
B230400 B230400
.ft P .ft P
.fi .fi
.PP
The zero baud rate, \fBB0\fP, The zero baud rate, \fBB0\fP,
is used to terminate the connection. is used to terminate the connection.
If B0 is specified, the modem control lines shall no longer be asserted. If B0 is specified, the modem control lines shall no longer be asserted.

View File

@ -47,9 +47,10 @@ valid names depends on the
.B LC_CTYPE .B LC_CTYPE
category of the current locale, but the category of the current locale, but the
following names are valid in all locales. following names are valid in all locales.
.PP
.nf .nf
"tolower" \- realizes the \fBtolower\fP(3) mapping "tolower" \- realizes the \fBtolower\fP(3) mapping
"toupper" \- realizes the \fBtoupper\fP(3) mapping "toupper" \- realizes the \fBtoupper\fP(3) mapping
.fi .fi
.SH RETURN VALUE .SH RETURN VALUE
The The

View File

@ -48,19 +48,20 @@ valid names depends on the
.B LC_CTYPE .B LC_CTYPE
category of the current locale, but the category of the current locale, but the
following names are valid in all locales. following names are valid in all locales.
.PP
.nf .nf
"alnum" \- realizes the \fBisalnum\fP(3) classification function "alnum" \- realizes the \fBisalnum\fP(3) classification function
"alpha" \- realizes the \fBisalpha\fP(3) classification function "alpha" \- realizes the \fBisalpha\fP(3) classification function
"blank" \- realizes the \fBisblank\fP(3) classification function "blank" \- realizes the \fBisblank\fP(3) classification function
"cntrl" \- realizes the \fBiscntrl\fP(3) classification function "cntrl" \- realizes the \fBiscntrl\fP(3) classification function
"digit" \- realizes the \fBisdigit\fP(3) classification function "digit" \- realizes the \fBisdigit\fP(3) classification function
"graph" \- realizes the \fBisgraph\fP(3) classification function "graph" \- realizes the \fBisgraph\fP(3) classification function
"lower" \- realizes the \fBislower\fP(3) classification function "lower" \- realizes the \fBislower\fP(3) classification function
"print" \- realizes the \fBisprint\fP(3) classification function "print" \- realizes the \fBisprint\fP(3) classification function
"punct" \- realizes the \fBispunct\fP(3) classification function "punct" \- realizes the \fBispunct\fP(3) classification function
"space" \- realizes the \fBisspace\fP(3) classification function "space" \- realizes the \fBisspace\fP(3) classification function
"upper" \- realizes the \fBisupper\fP(3) classification function "upper" \- realizes the \fBisupper\fP(3) classification function
"xdigit" \- realizes the \fBisxdigit\fP(3) classification function "xdigit" \- realizes the \fBisxdigit\fP(3) classification function
.fi .fi
.SH RETURN VALUE .SH RETURN VALUE
The The

View File

@ -58,7 +58,7 @@ T} Thread safety MT-Safe locale
POSIX.1-2001, POSIX.1-2008. POSIX.1-2001, POSIX.1-2008.
.PP .PP
Note that glibc before 2.2.5 used the prototype Note that glibc before 2.2.5 used the prototype
.br .PP
.nf .nf
.BI "int wcwidth(wint_t " c ); .BI "int wcwidth(wint_t " c );
.fi .fi

View File

@ -224,7 +224,7 @@ POSIX.1-2001, POSIX.1-2008.
The output of the following example program The output of the following example program
is approximately that of "ls [a-c]*.c". is approximately that of "ls [a-c]*.c".
.PP .PP
.nf .EX
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <wordexp.h> #include <wordexp.h>
@ -243,7 +243,7 @@ main(int argc, char **argv)
wordfree(&p); wordfree(&p);
exit(EXIT_SUCCESS); exit(EXIT_SUCCESS);
} }
.fi .EE
.SH SEE ALSO .SH SEE ALSO
.BR fnmatch (3), .BR fnmatch (3),
.BR glob (3) .BR glob (3)

View File

@ -26,8 +26,8 @@ driver from attempting to drive any controllers that the
driver is capable of controlling, which is to say, the driver is capable of controlling, which is to say, the
.B cciss .B cciss
driver is restricted by this option to the following controllers: driver is restricted by this option to the following controllers:
.PP
.nf .nf
Smart Array 5300 Smart Array 5300
Smart Array 5i Smart Array 5i
Smart Array 532 Smart Array 532
@ -50,8 +50,8 @@ driver is restricted by this option to the following controllers:
The The
.B cciss .B cciss
driver supports the following Smart Array boards: driver supports the following Smart Array boards:
.PP
.nf .nf
Smart Array 5300 Smart Array 5300
Smart Array 5i Smart Array 5i
Smart Array 532 Smart Array 532
@ -89,10 +89,10 @@ run from the Smart Array's option ROM at boot time.
.SH FILES .SH FILES
.SS Device nodes .SS Device nodes
The device naming scheme is as follows: The device naming scheme is as follows:
.PP
.nf .nf
Major numbers: Major numbers:
.PP
104 cciss0 104 cciss0
105 cciss1 105 cciss1
106 cciss2 106 cciss2
@ -101,23 +101,23 @@ Major numbers:
109 cciss5 109 cciss5
110 cciss6 110 cciss6
111 cciss7 111 cciss7
.PP
Minor numbers: Minor numbers:
.PP
b7 b6 b5 b4 b3 b2 b1 b0 b7 b6 b5 b4 b3 b2 b1 b0
|----+----| |----+----| |----+----| |----+----|
| | | |
| +-------- Partition ID (0=wholedev, 1-15 partition) | +-------- Partition ID (0=wholedev, 1-15 partition)
| |
+-------------------- Logical Volume number +-------------------- Logical Volume number
.PP
The device naming scheme is: The device naming scheme is:
.PP
/dev/cciss/c0d0 Controller 0, disk 0, whole device /dev/cciss/c0d0 Controller 0, disk 0, whole device
/dev/cciss/c0d0p1 Controller 0, disk 0, partition 1 /dev/cciss/c0d0p1 Controller 0, disk 0, partition 1
/dev/cciss/c0d0p2 Controller 0, disk 0, partition 2 /dev/cciss/c0d0p2 Controller 0, disk 0, partition 2
/dev/cciss/c0d0p3 Controller 0, disk 0, partition 3 /dev/cciss/c0d0p3 Controller 0, disk 0, partition 3
.PP
/dev/cciss/c1d1 Controller 1, disk 1, whole device /dev/cciss/c1d1 Controller 1, disk 1, whole device
/dev/cciss/c1d1p1 Controller 1, disk 1, partition 1 /dev/cciss/c1d1p1 Controller 1, disk 1, partition 1
/dev/cciss/c1d1p2 Controller 1, disk 1, partition 2 /dev/cciss/c1d1p2 Controller 1, disk 1, partition 2
@ -244,14 +244,16 @@ This is best done via an initialization script
.IR /etc/init.d , .IR /etc/init.d ,
but could vary depending on distribution). but could vary depending on distribution).
For example: For example:
.nf .PP
.in +4n
for x in /proc/driver/cciss/cciss[0-9]* .EX
do for x in /proc/driver/cciss/cciss[0-9]*
echo "engage scsi" > $x do
done echo "engage scsi" > $x
done
.fi .EE
.in
.PP
Once the SCSI core is engaged by the driver, it cannot be disengaged Once the SCSI core is engaged by the driver, it cannot be disengaged
(except by unloading the driver, if it happens to be linked as a module.) (except by unloading the driver, if it happens to be linked as a module.)
.PP .PP

View File

@ -29,7 +29,7 @@ fuse \- Filesystem in Userspace (FUSE) device
.SH SYNOPSIS .SH SYNOPSIS
.nf .nf
.B #include <linux/fuse.h> .B #include <linux/fuse.h>
.nf .fi
.SH DESCRIPTION .SH DESCRIPTION
.PP .PP
This device is the primary interface between the FUSE filesystem driver This device is the primary interface between the FUSE filesystem driver

View File

@ -47,13 +47,13 @@ with mode 0400 (read access by root only).
If the Linux system does not have If the Linux system does not have
.I /dev/initrd .I /dev/initrd
already created, it can be created with the following commands: already created, it can be created with the following commands:
.PP
.nf .in +4n
\fB .EX
mknod \-m 400 /dev/initrd b 1 250 mknod \-m 400 /dev/initrd b 1 250
chown root:disk /dev/initrd chown root:disk /dev/initrd
\fP .EE
.fi .in
.PP .PP
Also, support for both "RAM disk" and "Initial RAM disk" Also, support for both "RAM disk" and "Initial RAM disk"
(e.g., (e.g.,
@ -281,23 +281,27 @@ and then writing 0xff (e.g., the pseudo-NFS-device number) into file
For example, the following shell command line would change For example, the following shell command line would change
the normal root device to the normal root device to
.IR /dev/hdb1 : .IR /dev/hdb1 :
.nf .PP
.in +4n
echo 0x365 >/proc/sys/kernel/real-root-dev .EX
echo 0x365 >/proc/sys/kernel/real-root-dev
.fi .EE
.in
.PP
For an NFS example, the following shell command lines would change the For an NFS example, the following shell command lines would change the
normal root device to the NFS directory normal root device to the NFS directory
.I /var/nfsroot .I /var/nfsroot
on a local networked NFS server with IP number 193.8.232.7 for a system with on a local networked NFS server with IP number 193.8.232.7 for a system with
IP number 193.8.232.2 and named "idefix": IP number 193.8.232.2 and named "idefix":
.nf .PP
.in +4n
echo /var/nfsroot >/proc/sys/kernel/nfs-root-name .EX
echo 193.8.232.2:193.8.232.7::255.255.255.0:idefix \\ echo /var/nfsroot >/proc/sys/kernel/nfs-root-name
>/proc/sys/kernel/nfs-root-addrs echo 193.8.232.2:193.8.232.7::255.255.255.0:idefix \\
echo 255 >/proc/sys/kernel/real-root-dev >/proc/sys/kernel/nfs-root-addrs
.fi echo 255 >/proc/sys/kernel/real-root-dev
.EE
.in
.PP .PP
.BR Note : .BR Note :
The use of The use of

View File

@ -38,14 +38,16 @@ image stored in a file, so that it can be mounted with the
.BR mount (8) .BR mount (8)
command. command.
You could do You could do
.nf .PP
.IP .in +4n
.EX
$ \fBdd if=/dev/zero of=file.img bs=1MiB count=10\fP $ \fBdd if=/dev/zero of=file.img bs=1MiB count=10\fP
$ \fBsudo losetup /dev/loop4 file.img \fP $ \fBsudo losetup /dev/loop4 file.img \fP
$ \fBsudo mkfs -t ext4 /dev/loop4\fP $ \fBsudo mkfs -t ext4 /dev/loop4\fP
$ \fBsudo mkdir /myloopdev\fP $ \fBsudo mkdir /myloopdev\fP
$ \fBsudo mount /dev/loop4 /myloopdev\fP $ \fBsudo mount /dev/loop4 /myloopdev\fP
.fi .EE
.in
.PP .PP
See See
.BR losetup (8) .BR losetup (8)

View File

@ -91,8 +91,8 @@ and a 13-bit mantissa.
A value, A value,
.IR c , .IR c ,
of this type can be converted to a (long) integer as follows: of this type can be converted to a (long) integer as follows:
.PP
.nf .nf
v = (c & 0x1fff) << (((c >> 13) & 0x7) * 3); v = (c & 0x1fff) << (((c >> 13) & 0x7) * 3);
.fi .fi
.PP .PP

View File

@ -105,7 +105,7 @@ historical hosts.txt files on the WWW.
I just found three, from 92, I just found three, from 92,
94, and 95. 94, and 95.
.SH EXAMPLE .SH EXAMPLE
.nf .EX
# The following lines are desirable for IPv4 capable hosts # The following lines are desirable for IPv4 capable hosts
127.0.0.1 localhost 127.0.0.1 localhost
@ -120,7 +120,7 @@ I just found three, from 92,
::1 localhost ip6-localhost ip6-loopback ::1 localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes ff02::1 ip6-allnodes
ff02::2 ip6-allrouters ff02::2 ip6-allrouters
.fi .EE
.SH SEE ALSO .SH SEE ALSO
.BR hostname (1), .BR hostname (1),
.BR resolver (3), .BR resolver (3),

View File

@ -100,10 +100,13 @@ the next entry.
.SH EXAMPLE .SH EXAMPLE
The default configuration corresponds to the following configuration file: The default configuration corresponds to the following configuration file:
.PP .PP
.nf .in +4n
.EX
NETID_AUTHORITATIVE=FALSE NETID_AUTHORITATIVE=FALSE
SERVICES_AUTHORITATIVE=FALSE SERVICES_AUTHORITATIVE=FALSE
SETENT_BATCH_READ=FALSE SETENT_BATCH_READ=FALSE
.EE
.in
.\" .SH AUTHOR .\" .SH AUTHOR
.\" Ulrich Drepper <drepper@redhat.com> .\" Ulrich Drepper <drepper@redhat.com>
.\" .\"

View File

@ -42,8 +42,8 @@
operator \- C operator precedence and order of evaluation operator \- C operator precedence and order of evaluation
.SH DESCRIPTION .SH DESCRIPTION
This manual page lists C operators and their precedence in evaluation. This manual page lists C operators and their precedence in evaluation.
.PP
.nf .nf
.B "Operator Associativity" .B "Operator Associativity"
() [] \-> . left to right () [] \-> . left to right
! ~ ++ \-\- + \- (type) * & sizeof right to left ! ~ ++ \-\- + \- (type) * & sizeof right to left

View File

@ -659,8 +659,8 @@ and the extra zero byte ensures that there will be
a null terminator for the string returned in a null terminator for the string returned in
.IR sun_path : .IR sun_path :
.PP .PP
.nf .in +4n
.in +3 .EX
void *addrp; void *addrp;
addrlen = sizeof(struct sockaddr_un); addrlen = sizeof(struct sockaddr_un);