mirror of https://github.com/mkerrisk/man-pages
_syscall.2, capget.2, ioprio_set.2, semop.2, send.2, ctime.3, dysize.3, fenv.3, fmtmsg.3, ftok.3, ftw.3, getaddrinfo.3, getgrent_r.3, gethostbyname.3, getopt.3, getpw.3, getpwent_r.3, getsubopt.3, getutent.3, glob.3, if_nameindex.3, inet.3, lseek64.3, malloc_hook.3, mbrtowc.3, mkstemp.3, mq_receive.3, mq_send.3, posix_spawn.3, putgrent.3, putpwent.3, qsort.3, raise.3, rand.3, rtime.3, setaliasent.3, setbuf.3, shm_open.3, significand.3, sigqueue.3, statvfs.3, strfromd.3, strptime.3, strtol.3, strtoul.3, termios.3, tgamma.3, timeradd.3, tsearch.3, tzset.3, updwtmp.3, usleep.3, wcstok.3, console_codes.4, hd.4, hpsa.4, mem.4, null.4, ram.4, sd.4, ttyS.4, filesystems.5, group.5, passwd.5, shells.5, termcap.5, ttytype.5, tzfile.5, utmp.5, ascii.7, bootparam.7, complex.7, cpuset.7, epoll.7: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
parent
ba39b288ab
commit
bdd915e20f
|
@ -50,10 +50,12 @@ You need to know how many arguments, their types,
|
||||||
and the function return type.
|
and the function return type.
|
||||||
There are seven macros that make the actual call into the system easier.
|
There are seven macros that make the actual call into the system easier.
|
||||||
They have the form:
|
They have the form:
|
||||||
.sp
|
.PP
|
||||||
.RS
|
.in +4n
|
||||||
|
.EX
|
||||||
.RI _syscall X ( type , name , type1 , arg1 , type2 , arg2 ,...)
|
.RI _syscall X ( type , name , type1 , arg1 , type2 , arg2 ,...)
|
||||||
.RE
|
.EE
|
||||||
|
.in
|
||||||
.PP
|
.PP
|
||||||
where
|
where
|
||||||
.IP
|
.IP
|
||||||
|
|
|
@ -83,7 +83,7 @@ typedef struct __user_cap_data_struct {
|
||||||
__u32 inheritable;
|
__u32 inheritable;
|
||||||
} *cap_user_data_t;
|
} *cap_user_data_t;
|
||||||
.EE
|
.EE
|
||||||
.in -4n
|
.in
|
||||||
.PP
|
.PP
|
||||||
The
|
The
|
||||||
.IR effective ,
|
.IR effective ,
|
||||||
|
|
|
@ -248,14 +248,14 @@ One can view the current I/O scheduler via the
|
||||||
filesystem.
|
filesystem.
|
||||||
For example, the following command
|
For example, the following command
|
||||||
displays a list of all schedulers currently loaded in the kernel:
|
displays a list of all schedulers currently loaded in the kernel:
|
||||||
.sp
|
.PP
|
||||||
.RS
|
.in +4n
|
||||||
.nf
|
.EX
|
||||||
.RB "$" " cat /sys/block/sda/queue/scheduler"
|
.RB "$" " cat /sys/block/sda/queue/scheduler"
|
||||||
noop anticipatory deadline [cfq]
|
noop anticipatory deadline [cfq]
|
||||||
.fi
|
.EE
|
||||||
.RE
|
.in
|
||||||
.sp
|
.PP
|
||||||
The scheduler surrounded by brackets is the one actually
|
The scheduler surrounded by brackets is the one actually
|
||||||
in use for the device
|
in use for the device
|
||||||
.RI ( sda
|
.RI ( sda
|
||||||
|
@ -267,14 +267,15 @@ scheduler for the
|
||||||
.I sda
|
.I sda
|
||||||
device to
|
device to
|
||||||
.IR cfq :
|
.IR cfq :
|
||||||
.sp
|
.PP
|
||||||
.RS
|
.in +4n
|
||||||
.nf
|
.EX
|
||||||
.RB "$" " su"
|
.RB "$" " su"
|
||||||
Password:
|
Password:
|
||||||
.RB "#" " echo cfq > /sys/block/sda/queue/scheduler"
|
.RB "#" " echo cfq > /sys/block/sda/queue/scheduler"
|
||||||
.fi
|
.EE
|
||||||
.RE
|
.in
|
||||||
|
.\"
|
||||||
.SS The Completely Fair Queuing (CFQ) I/O scheduler
|
.SS The Completely Fair Queuing (CFQ) I/O scheduler
|
||||||
Since version 3 (also known as CFQ Time Sliced), CFQ implements
|
Since version 3 (also known as CFQ Time Sliced), CFQ implements
|
||||||
I/O nice levels similar to those
|
I/O nice levels similar to those
|
||||||
|
|
|
@ -57,17 +57,16 @@ _GNU_SOURCE
|
||||||
.SH DESCRIPTION
|
.SH DESCRIPTION
|
||||||
Each semaphore in a System\ V semaphore set
|
Each semaphore in a System\ V semaphore set
|
||||||
has the following associated values:
|
has the following associated values:
|
||||||
.sp
|
.PP
|
||||||
.in +4n
|
.in +4n
|
||||||
.nf
|
.nf
|
||||||
unsigned short semval; /* semaphore value */
|
unsigned short semval; /* semaphore value */
|
||||||
unsigned short semzcnt; /* # waiting for zero */
|
unsigned short semzcnt; /* # waiting for zero */
|
||||||
unsigned short semncnt; /* # waiting for increase */
|
unsigned short semncnt; /* # waiting for increase */
|
||||||
pid_t sempid; /* PID of process that last
|
pid_t sempid; /* PID of process that last
|
||||||
modified semaphore value */
|
|
||||||
.sp
|
|
||||||
.in -4n
|
.in -4n
|
||||||
.fi
|
.fi
|
||||||
|
.PP
|
||||||
.BR semop ()
|
.BR semop ()
|
||||||
performs operations on selected semaphores in the set indicated by
|
performs operations on selected semaphores in the set indicated by
|
||||||
.IR semid .
|
.IR semid .
|
||||||
|
@ -86,7 +85,7 @@ containing the following members:
|
||||||
unsigned short sem_num; /* semaphore number */
|
unsigned short sem_num; /* semaphore number */
|
||||||
short sem_op; /* semaphore operation */
|
short sem_op; /* semaphore operation */
|
||||||
short sem_flg; /* operation flags */
|
short sem_flg; /* operation flags */
|
||||||
.in -4n
|
.in
|
||||||
.fi
|
.fi
|
||||||
.PP
|
.PP
|
||||||
Flags recognized in
|
Flags recognized in
|
||||||
|
|
|
@ -328,7 +328,7 @@ or search permission is denied for one of the directories
|
||||||
the path prefix.
|
the path prefix.
|
||||||
(See
|
(See
|
||||||
.BR path_resolution (7).)
|
.BR path_resolution (7).)
|
||||||
.sp
|
.IP
|
||||||
(For UDP sockets) An attempt was made to send to a
|
(For UDP sockets) An attempt was made to send to a
|
||||||
network/broadcast address as though it was a unicast address.
|
network/broadcast address as though it was a unicast address.
|
||||||
.TP
|
.TP
|
||||||
|
|
|
@ -414,7 +414,6 @@ The glibc version of \fIstruct tm\fP has additional fields
|
||||||
.PP
|
.PP
|
||||||
.in +4n
|
.in +4n
|
||||||
.EX
|
.EX
|
||||||
.sp
|
|
||||||
const char *tm_zone; /* Timezone abbreviation */
|
const char *tm_zone; /* Timezone abbreviation */
|
||||||
.EE
|
.EE
|
||||||
.in
|
.in
|
||||||
|
|
|
@ -44,9 +44,13 @@ Feature Test Macro Requirements for glibc (see
|
||||||
.SH DESCRIPTION
|
.SH DESCRIPTION
|
||||||
The function returns 365 for a normal year and 366 for a leap year.
|
The function returns 365 for a normal year and 366 for a leap year.
|
||||||
The calculation for leap year is based on:
|
The calculation for leap year is based on:
|
||||||
.sp
|
.PP
|
||||||
|
.in +4n
|
||||||
|
.EX
|
||||||
(year) %4 == 0 && ((year) %100 != 0 || (year) %400 == 0)
|
(year) %4 == 0 && ((year) %100 != 0 || (year) %400 == 0)
|
||||||
.sp
|
.EE
|
||||||
|
.in
|
||||||
|
.PP
|
||||||
The formula is defined in the macro
|
The formula is defined in the macro
|
||||||
.I __isleap(year)
|
.I __isleap(year)
|
||||||
also found in
|
also found in
|
||||||
|
|
10
man3/fenv.3
10
man3/fenv.3
|
@ -315,20 +315,18 @@ and
|
||||||
to set individual floating-point traps, and
|
to set individual floating-point traps, and
|
||||||
.BR fegetexcept ()
|
.BR fegetexcept ()
|
||||||
to query the state.
|
to query the state.
|
||||||
.sp
|
.PP
|
||||||
.nf
|
.nf
|
||||||
|
.EX
|
||||||
.BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */"
|
.BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */"
|
||||||
.br
|
|
||||||
.B "#include <fenv.h>"
|
.B "#include <fenv.h>"
|
||||||
.sp
|
.sp
|
||||||
.BI "int feenableexcept(int " excepts );
|
.BI "int feenableexcept(int " excepts );
|
||||||
.br
|
|
||||||
.BI "int fedisableexcept(int " excepts );
|
.BI "int fedisableexcept(int " excepts );
|
||||||
.br
|
|
||||||
.B "int fegetexcept(void);"
|
.B "int fegetexcept(void);"
|
||||||
.br
|
.EE
|
||||||
.fi
|
.fi
|
||||||
.LP
|
.PP
|
||||||
The
|
The
|
||||||
.BR feenableexcept ()
|
.BR feenableexcept ()
|
||||||
and
|
and
|
||||||
|
|
|
@ -80,8 +80,7 @@ is a synonym for
|
||||||
The
|
The
|
||||||
.I classification
|
.I classification
|
||||||
argument is the sum of values describing 4 types of information.
|
argument is the sum of values describing 4 types of information.
|
||||||
.br
|
.PP
|
||||||
.sp
|
|
||||||
The first value defines the output channel.
|
The first value defines the output channel.
|
||||||
.TP 12n
|
.TP 12n
|
||||||
.B MM_PRINT
|
.B MM_PRINT
|
||||||
|
@ -187,19 +186,19 @@ print nothing.
|
||||||
If the user puts
|
If the user puts
|
||||||
.B SEV_LEVEL
|
.B SEV_LEVEL
|
||||||
with a format like
|
with a format like
|
||||||
.sp
|
.PP
|
||||||
.RS
|
.RS
|
||||||
SEV_LEVEL=[description[:description[:...]]]
|
SEV_LEVEL=[description[:description[:...]]]
|
||||||
.RE
|
.RE
|
||||||
.sp
|
.PP
|
||||||
in the environment of the process before the first call to
|
in the environment of the process before the first call to
|
||||||
.BR fmtmsg (),
|
.BR fmtmsg (),
|
||||||
where each description is of the form
|
where each description is of the form
|
||||||
.sp
|
.PP
|
||||||
.RS
|
.RS
|
||||||
severity-keyword,level,printstring
|
severity-keyword,level,printstring
|
||||||
.RE
|
.RE
|
||||||
.sp
|
.PP
|
||||||
then
|
then
|
||||||
.BR fmtmsg ()
|
.BR fmtmsg ()
|
||||||
will also accept the indicated values for the level (in addition to
|
will also accept the indicated values for the level (in addition to
|
||||||
|
|
|
@ -83,10 +83,12 @@ T} Thread safety MT-Safe
|
||||||
POSIX.1-2001, POSIX.1-2008.
|
POSIX.1-2001, POSIX.1-2008.
|
||||||
.SH NOTES
|
.SH NOTES
|
||||||
On some ancient systems, the prototype was:
|
On some ancient systems, the prototype was:
|
||||||
.sp
|
.PP
|
||||||
.RS
|
.in +4n
|
||||||
|
.EX
|
||||||
.BI "key_t ftok(char *" pathname ", char " proj_id );
|
.BI "key_t ftok(char *" pathname ", char " proj_id );
|
||||||
.RE
|
.EE
|
||||||
|
.in
|
||||||
.PP
|
.PP
|
||||||
Today,
|
Today,
|
||||||
.I proj_id
|
.I proj_id
|
||||||
|
|
|
@ -311,7 +311,7 @@ If set, stay within the same filesystem
|
||||||
If set, do not follow symbolic links.
|
If set, do not follow symbolic links.
|
||||||
(This is what you want.)
|
(This is what you want.)
|
||||||
If not set, symbolic links are followed, but no file is reported twice.
|
If not set, symbolic links are followed, but no file is reported twice.
|
||||||
.sp
|
.IP
|
||||||
If \fBFTW_PHYS\fP is not set, but \fBFTW_DEPTH\fP is set,
|
If \fBFTW_PHYS\fP is not set, but \fBFTW_DEPTH\fP is set,
|
||||||
then the function
|
then the function
|
||||||
.IR fn ()
|
.IR fn ()
|
||||||
|
|
|
@ -116,8 +116,8 @@ struct addrinfo {
|
||||||
char *ai_canonname;
|
char *ai_canonname;
|
||||||
struct addrinfo *ai_next;
|
struct addrinfo *ai_next;
|
||||||
};
|
};
|
||||||
.fi
|
|
||||||
.in
|
.in
|
||||||
|
.fi
|
||||||
.PP
|
.PP
|
||||||
The
|
The
|
||||||
.I hints
|
.I hints
|
||||||
|
|
|
@ -151,28 +151,28 @@ the POSIX version of functions like
|
||||||
.BR getpwnam_r (3).
|
.BR getpwnam_r (3).
|
||||||
Other systems use the prototype
|
Other systems use the prototype
|
||||||
.sp
|
.sp
|
||||||
.nf
|
|
||||||
.in +4n
|
.in +4n
|
||||||
|
.nf
|
||||||
struct group *getgrent_r(struct group *grp, char *buf,
|
struct group *getgrent_r(struct group *grp, char *buf,
|
||||||
int buflen);
|
int buflen);
|
||||||
.in
|
|
||||||
.fi
|
.fi
|
||||||
|
.in
|
||||||
.sp
|
.sp
|
||||||
or, better,
|
or, better,
|
||||||
.sp
|
.sp
|
||||||
.nf
|
|
||||||
.in +4n
|
.in +4n
|
||||||
|
.nf
|
||||||
int getgrent_r(struct group *grp, char *buf, int buflen,
|
int getgrent_r(struct group *grp, char *buf, int buflen,
|
||||||
FILE **gr_fp);
|
FILE **gr_fp);
|
||||||
.in
|
|
||||||
.fi
|
.fi
|
||||||
|
.in
|
||||||
.SH NOTES
|
.SH NOTES
|
||||||
The function
|
The function
|
||||||
.BR getgrent_r ()
|
.BR getgrent_r ()
|
||||||
is not really reentrant since it shares the reading position
|
is not really reentrant since it shares the reading position
|
||||||
in the stream with all other threads.
|
in the stream with all other threads.
|
||||||
.SH EXAMPLE
|
.SH EXAMPLE
|
||||||
.nf
|
.EX
|
||||||
#define _GNU_SOURCE
|
#define _GNU_SOURCE
|
||||||
#include <grp.h>
|
#include <grp.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
@ -202,7 +202,7 @@ main(void)
|
||||||
endgrent();
|
endgrent();
|
||||||
exit(EXIT_SUCCESS);
|
exit(EXIT_SUCCESS);
|
||||||
}
|
}
|
||||||
.fi
|
.EE
|
||||||
.\" perhaps add error checking - should use strerror_r
|
.\" perhaps add error checking - should use strerror_r
|
||||||
.\" #include <errno.h>
|
.\" #include <errno.h>
|
||||||
.\" #include <stdlib.h>
|
.\" #include <stdlib.h>
|
||||||
|
|
|
@ -261,7 +261,6 @@ The \fIhostent\fP structure is defined in \fI<netdb.h>\fP as follows:
|
||||||
.sp
|
.sp
|
||||||
.in +4n
|
.in +4n
|
||||||
.nf
|
.nf
|
||||||
.ne 7
|
|
||||||
struct hostent {
|
struct hostent {
|
||||||
char *h_name; /* official name of host */
|
char *h_name; /* official name of host */
|
||||||
char **h_aliases; /* alias list */
|
char **h_aliases; /* alias list */
|
||||||
|
|
|
@ -227,9 +227,9 @@ is a pointer to the first element of an array of
|
||||||
declared in
|
declared in
|
||||||
.I <getopt.h>
|
.I <getopt.h>
|
||||||
as
|
as
|
||||||
|
.PP
|
||||||
.in +4n
|
.in +4n
|
||||||
.nf
|
.nf
|
||||||
.sp
|
|
||||||
struct option {
|
struct option {
|
||||||
const char *name;
|
const char *name;
|
||||||
int has_arg;
|
int has_arg;
|
||||||
|
@ -402,8 +402,8 @@ to handle two program options:
|
||||||
with no associated value; and
|
with no associated value; and
|
||||||
.IR "\-t val" ,
|
.IR "\-t val" ,
|
||||||
which expects an associated value.
|
which expects an associated value.
|
||||||
.nf
|
.PP
|
||||||
.sp
|
.EX
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
@ -447,13 +447,13 @@ main(int argc, char *argv[])
|
||||||
|
|
||||||
exit(EXIT_SUCCESS);
|
exit(EXIT_SUCCESS);
|
||||||
}
|
}
|
||||||
.fi
|
.EX
|
||||||
.SS getopt_long()
|
.SS getopt_long()
|
||||||
The following example program illustrates the use of
|
The following example program illustrates the use of
|
||||||
.BR getopt_long ()
|
.BR getopt_long ()
|
||||||
with most of its features.
|
with most of its features.
|
||||||
.nf
|
.PP
|
||||||
.sp
|
.EE
|
||||||
#include <stdio.h> /* for printf */
|
#include <stdio.h> /* for printf */
|
||||||
#include <stdlib.h> /* for exit */
|
#include <stdlib.h> /* for exit */
|
||||||
#include <getopt.h>
|
#include <getopt.h>
|
||||||
|
@ -532,7 +532,7 @@ main(int argc, char **argv)
|
||||||
|
|
||||||
exit(EXIT_SUCCESS);
|
exit(EXIT_SUCCESS);
|
||||||
}
|
}
|
||||||
.fi
|
.EE
|
||||||
.SH SEE ALSO
|
.SH SEE ALSO
|
||||||
.BR getopt (1),
|
.BR getopt (1),
|
||||||
.BR getsubopt (3)
|
.BR getsubopt (3)
|
||||||
|
|
|
@ -46,10 +46,12 @@ The
|
||||||
function reconstructs the password line entry for
|
function reconstructs the password line entry for
|
||||||
the given user ID \fIuid\fP in the buffer \fIbuf\fP.
|
the given user ID \fIuid\fP in the buffer \fIbuf\fP.
|
||||||
The returned buffer contains a line of format
|
The returned buffer contains a line of format
|
||||||
.sp
|
.PP
|
||||||
.RS
|
.in +4n
|
||||||
|
.EE
|
||||||
.B name:passwd:uid:gid:gecos:dir:shell
|
.B name:passwd:uid:gid:gecos:dir:shell
|
||||||
.RE
|
.EE
|
||||||
|
.in
|
||||||
.PP
|
.PP
|
||||||
The \fIpasswd\fP structure is defined in \fI<pwd.h>\fP as follows:
|
The \fIpasswd\fP structure is defined in \fI<pwd.h>\fP as follows:
|
||||||
.sp
|
.sp
|
||||||
|
|
|
@ -153,12 +153,12 @@ the POSIX version of functions like
|
||||||
.BR getpwnam_r (3).
|
.BR getpwnam_r (3).
|
||||||
Other systems use the prototype
|
Other systems use the prototype
|
||||||
.sp
|
.sp
|
||||||
.nf
|
|
||||||
.in +4n
|
.in +4n
|
||||||
|
.nf
|
||||||
struct passwd *
|
struct passwd *
|
||||||
getpwent_r(struct passwd *pwd, char *buf, int buflen);
|
getpwent_r(struct passwd *pwd, char *buf, int buflen);
|
||||||
.in
|
|
||||||
.fi
|
.fi
|
||||||
|
.in
|
||||||
.sp
|
.sp
|
||||||
or, better,
|
or, better,
|
||||||
.sp
|
.sp
|
||||||
|
@ -175,7 +175,7 @@ The function
|
||||||
is not really reentrant since it shares the reading position
|
is not really reentrant since it shares the reading position
|
||||||
in the stream with all other threads.
|
in the stream with all other threads.
|
||||||
.SH EXAMPLE
|
.SH EXAMPLE
|
||||||
.nf
|
.EX
|
||||||
#define _GNU_SOURCE
|
#define _GNU_SOURCE
|
||||||
#include <pwd.h>
|
#include <pwd.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
@ -199,7 +199,7 @@ main(void)
|
||||||
endpwent();
|
endpwent();
|
||||||
exit(EXIT_SUCCESS);
|
exit(EXIT_SUCCESS);
|
||||||
}
|
}
|
||||||
.fi
|
.EE
|
||||||
.\" perhaps add error checking - should use strerror_r
|
.\" perhaps add error checking - should use strerror_r
|
||||||
.\" #include <errno.h>
|
.\" #include <errno.h>
|
||||||
.\" #include <stdlib.h>
|
.\" #include <stdlib.h>
|
||||||
|
|
|
@ -61,9 +61,11 @@ which is separated from the suboption name by an equal sign.
|
||||||
The following is an example of the kind of string
|
The following is an example of the kind of string
|
||||||
that might be passed in
|
that might be passed in
|
||||||
.IR optionp :
|
.IR optionp :
|
||||||
.sp
|
.PP
|
||||||
.in +4n
|
.in +4n
|
||||||
|
.EX
|
||||||
.B ro,name=xyz
|
.B ro,name=xyz
|
||||||
|
.EE
|
||||||
.in
|
.in
|
||||||
.PP
|
.PP
|
||||||
The
|
The
|
||||||
|
|
|
@ -225,20 +225,19 @@ with the prototype given above for
|
||||||
All these functions are obsolete now on non-Linux systems.
|
All these functions are obsolete now on non-Linux systems.
|
||||||
POSIX.1-2001 and POSIX.1-2008, following SUSv1,
|
POSIX.1-2001 and POSIX.1-2008, following SUSv1,
|
||||||
does not have any of these functions, but instead uses
|
does not have any of these functions, but instead uses
|
||||||
.sp
|
.PP
|
||||||
|
.in +4n
|
||||||
|
.EX
|
||||||
.B #include <utmpx.h>
|
.B #include <utmpx.h>
|
||||||
.sp
|
.PP
|
||||||
.B struct utmpx *getutxent(void);
|
.B struct utmpx *getutxent(void);
|
||||||
.br
|
|
||||||
.B struct utmpx *getutxid(const struct utmpx *);
|
.B struct utmpx *getutxid(const struct utmpx *);
|
||||||
.br
|
|
||||||
.B struct utmpx *getutxline(const struct utmpx *);
|
.B struct utmpx *getutxline(const struct utmpx *);
|
||||||
.br
|
|
||||||
.B struct utmpx *pututxline(const struct utmpx *);
|
.B struct utmpx *pututxline(const struct utmpx *);
|
||||||
.br
|
|
||||||
.B void setutxent(void);
|
.B void setutxent(void);
|
||||||
.br
|
|
||||||
.B void endutxent(void);
|
.B void endutxent(void);
|
||||||
|
.EE
|
||||||
|
.in
|
||||||
.PP
|
.PP
|
||||||
These functions are provided by glibc,
|
These functions are provided by glibc,
|
||||||
and perform the same task as their equivalents without the "x", but use
|
and perform the same task as their equivalents without the "x", but use
|
||||||
|
@ -268,20 +267,21 @@ is an alias for
|
||||||
.SS Glibc notes
|
.SS Glibc notes
|
||||||
The above functions are not thread-safe.
|
The above functions are not thread-safe.
|
||||||
Glibc adds reentrant versions
|
Glibc adds reentrant versions
|
||||||
.sp
|
.PP
|
||||||
.nf
|
.in +4n
|
||||||
|
.EX
|
||||||
.B #include <utmp.h>
|
.B #include <utmp.h>
|
||||||
.sp
|
.PP
|
||||||
.BI "int getutent_r(struct utmp *" ubuf ", struct utmp **" ubufp );
|
.BI "int getutent_r(struct utmp *" ubuf ", struct utmp **" ubufp );
|
||||||
.sp
|
.PP
|
||||||
.BI "int getutid_r(struct utmp *" ut ,
|
.BI "int getutid_r(struct utmp *" ut ,
|
||||||
.BI " struct utmp *" ubuf ", struct utmp **" ubufp );
|
.BI " struct utmp *" ubuf ", struct utmp **" ubufp );
|
||||||
.sp
|
.PP
|
||||||
.BI "int getutline_r(struct utmp *" ut ,
|
.BI "int getutline_r(struct utmp *" ut ,
|
||||||
.BI " struct utmp *" ubuf ", struct utmp **" ubufp );
|
.BI " struct utmp *" ubuf ", struct utmp **" ubufp );
|
||||||
.fi
|
.EE
|
||||||
.sp
|
.in
|
||||||
.in -4n
|
.PP
|
||||||
Feature Test Macro Requirements for glibc (see
|
Feature Test Macro Requirements for glibc (see
|
||||||
.BR feature_test_macros (7)):
|
.BR feature_test_macros (7)):
|
||||||
.in
|
.in
|
||||||
|
|
|
@ -333,7 +333,9 @@ These will store their error code in
|
||||||
One example of use is the following code, which simulates typing
|
One example of use is the following code, which simulates typing
|
||||||
.sp
|
.sp
|
||||||
.in +4n
|
.in +4n
|
||||||
|
.EX
|
||||||
ls \-l *.c ../*.c
|
ls \-l *.c ../*.c
|
||||||
|
.EE
|
||||||
.in
|
.in
|
||||||
.sp
|
.sp
|
||||||
in the shell:
|
in the shell:
|
||||||
|
|
|
@ -45,10 +45,10 @@ The
|
||||||
structure contains at least the following entries:
|
structure contains at least the following entries:
|
||||||
.sp
|
.sp
|
||||||
.in +4n
|
.in +4n
|
||||||
.nf
|
.EX
|
||||||
unsigned int if_index; /* Index of interface (1, 2, ...) */
|
unsigned int if_index; /* Index of interface (1, 2, ...) */
|
||||||
char *if_name; /* Null-terminated name ("eth0", etc.) */
|
char *if_name; /* Null-terminated name ("eth0", etc.) */
|
||||||
.fi
|
.EE
|
||||||
.in
|
.in
|
||||||
.PP
|
.PP
|
||||||
The
|
The
|
||||||
|
|
|
@ -212,13 +212,13 @@ is defined in
|
||||||
as:
|
as:
|
||||||
.sp
|
.sp
|
||||||
.in +4n
|
.in +4n
|
||||||
.nf
|
.EX
|
||||||
typedef uint32_t in_addr_t;
|
typedef uint32_t in_addr_t;
|
||||||
|
|
||||||
struct in_addr {
|
struct in_addr {
|
||||||
in_addr_t s_addr;
|
in_addr_t s_addr;
|
||||||
};
|
};
|
||||||
.fi
|
.EE
|
||||||
.in
|
.in
|
||||||
.SH ATTRIBUTES
|
.SH ATTRIBUTES
|
||||||
For an explanation of the terms used in this section, see
|
For an explanation of the terms used in this section, see
|
||||||
|
|
|
@ -62,35 +62,35 @@ and
|
||||||
.BR _llseek (2).
|
.BR _llseek (2).
|
||||||
.SS lseek()
|
.SS lseek()
|
||||||
Prototype:
|
Prototype:
|
||||||
.nf
|
.PP
|
||||||
.sp
|
|
||||||
.in +4n
|
.in +4n
|
||||||
|
.EX
|
||||||
.BI "off_t lseek(int " fd ", off_t " offset ", int " whence );
|
.BI "off_t lseek(int " fd ", off_t " offset ", int " whence );
|
||||||
|
.EE
|
||||||
.in
|
.in
|
||||||
.fi
|
.PP
|
||||||
.sp
|
|
||||||
.BR lseek (2)
|
.BR lseek (2)
|
||||||
uses the type
|
uses the type
|
||||||
.IR off_t .
|
.IR off_t .
|
||||||
This is a 32-bit signed type on 32-bit architectures, unless one
|
This is a 32-bit signed type on 32-bit architectures, unless one
|
||||||
compiles with
|
compiles with
|
||||||
.nf
|
.PP
|
||||||
.sp
|
|
||||||
.in +4n
|
.in +4n
|
||||||
|
.EX
|
||||||
#define _FILE_OFFSET_BITS 64
|
#define _FILE_OFFSET_BITS 64
|
||||||
|
.EE
|
||||||
.in
|
.in
|
||||||
.sp
|
.PP
|
||||||
.fi
|
|
||||||
in which case it is a 64-bit signed type.
|
in which case it is a 64-bit signed type.
|
||||||
.SS lseek64()
|
.SS lseek64()
|
||||||
Prototype:
|
Prototype:
|
||||||
.nf
|
.PP
|
||||||
.sp
|
|
||||||
.in +4n
|
.in +4n
|
||||||
|
.EX
|
||||||
.BI "off64_t lseek64(int " fd ", off64_t " offset ", int " whence );
|
.BI "off64_t lseek64(int " fd ", off64_t " offset ", int " whence );
|
||||||
|
.EE
|
||||||
.in
|
.in
|
||||||
.fi
|
.PP
|
||||||
.sp
|
|
||||||
The library routine
|
The library routine
|
||||||
.BR lseek64 ()
|
.BR lseek64 ()
|
||||||
uses a 64-bit type even when
|
uses a 64-bit type even when
|
||||||
|
@ -99,13 +99,13 @@ is a 32-bit type.
|
||||||
Its prototype (and the type
|
Its prototype (and the type
|
||||||
.IR off64_t )
|
.IR off64_t )
|
||||||
is available only when one compiles with
|
is available only when one compiles with
|
||||||
.nf
|
.PP
|
||||||
.sp
|
|
||||||
.in +4n
|
.in +4n
|
||||||
|
.EX
|
||||||
#define _LARGEFILE64_SOURCE
|
#define _LARGEFILE64_SOURCE
|
||||||
|
.EE
|
||||||
.in
|
.in
|
||||||
.sp
|
.PP
|
||||||
.fi
|
|
||||||
The function
|
The function
|
||||||
.BR lseek64 ()
|
.BR lseek64 ()
|
||||||
.\" in glibc 2.0.94, not in 2.0.6
|
.\" in glibc 2.0.94, not in 2.0.6
|
||||||
|
@ -113,13 +113,13 @@ is available since glibc 2.1, and is defined to be an alias for
|
||||||
.BR llseek ().
|
.BR llseek ().
|
||||||
.SS llseek()
|
.SS llseek()
|
||||||
Prototype:
|
Prototype:
|
||||||
.nf
|
.PP
|
||||||
.sp
|
|
||||||
.in +4n
|
.in +4n
|
||||||
|
.EX
|
||||||
.BI "loff_t llseek(int " fd ", loff_t " offset ", int " whence );
|
.BI "loff_t llseek(int " fd ", loff_t " offset ", int " whence );
|
||||||
|
.EE
|
||||||
.in
|
.in
|
||||||
.fi
|
.PP
|
||||||
.sp
|
|
||||||
The type
|
The type
|
||||||
.I loff_t
|
.I loff_t
|
||||||
is a 64-bit signed type.
|
is a 64-bit signed type.
|
||||||
|
@ -133,25 +133,25 @@ the above prototype, or something equivalent, to their own source.
|
||||||
When users complained about data loss caused by a miscompilation of
|
When users complained about data loss caused by a miscompilation of
|
||||||
.BR e2fsck (8),
|
.BR e2fsck (8),
|
||||||
glibc 2.1.3 added the link-time warning
|
glibc 2.1.3 added the link-time warning
|
||||||
.sp
|
.PP
|
||||||
.in +4n
|
.in +4n
|
||||||
"the \`llseek\' function may be dangerous; use \`lseek64\' instead."
|
"the \`llseek\' function may be dangerous; use \`lseek64\' instead."
|
||||||
.in
|
.in
|
||||||
.sp
|
.PP
|
||||||
This makes this function unusable if one desires a warning-free
|
This makes this function unusable if one desires a warning-free
|
||||||
compilation.
|
compilation.
|
||||||
.SS _llseek()
|
.SS _llseek()
|
||||||
On 32-bit architectures,
|
On 32-bit architectures,
|
||||||
this is the system call that is used to implement all of the above functions.
|
this is the system call that is used to implement all of the above functions.
|
||||||
The prototype is:
|
The prototype is:
|
||||||
.nf
|
.PP
|
||||||
.sp
|
|
||||||
.in +4n
|
.in +4n
|
||||||
|
.EX
|
||||||
.BI "int _llseek(int " fd ", off_t " offset_hi ", off_t " offset_lo ,
|
.BI "int _llseek(int " fd ", off_t " offset_hi ", off_t " offset_lo ,
|
||||||
.BI " loff_t *" result ", int " whence );
|
.BI " loff_t *" result ", int " whence );
|
||||||
|
.EE
|
||||||
.in
|
.in
|
||||||
.fi
|
.PP
|
||||||
.sp
|
|
||||||
For more details, see
|
For more details, see
|
||||||
.BR llseek (2).
|
.BR llseek (2).
|
||||||
.PP
|
.PP
|
||||||
|
|
|
@ -91,8 +91,8 @@ Programmers should instead preempt calls to the relevant functions
|
||||||
by defining and exporting functions such as "malloc" and "free".
|
by defining and exporting functions such as "malloc" and "free".
|
||||||
.SH EXAMPLE
|
.SH EXAMPLE
|
||||||
Here is a short example of how to use these variables.
|
Here is a short example of how to use these variables.
|
||||||
.sp
|
.PP
|
||||||
.nf
|
.EX
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <malloc.h>
|
#include <malloc.h>
|
||||||
|
|
||||||
|
@ -136,7 +136,7 @@ my_malloc_hook(size_t size, const void *caller)
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
.fi
|
.EX
|
||||||
.SH SEE ALSO
|
.SH SEE ALSO
|
||||||
.BR mallinfo (3),
|
.BR mallinfo (3),
|
||||||
.BR malloc (3),
|
.BR malloc (3),
|
||||||
|
|
|
@ -143,9 +143,11 @@ object
|
||||||
.I a
|
.I a
|
||||||
can be initialized to the initial state
|
can be initialized to the initial state
|
||||||
by zeroing it, for example using
|
by zeroing it, for example using
|
||||||
.sp
|
.PP
|
||||||
.in +4n
|
.in +4n
|
||||||
|
.EE
|
||||||
memset(&a, 0, sizeof(a));
|
memset(&a, 0, sizeof(a));
|
||||||
|
.EE
|
||||||
.in
|
.in
|
||||||
.SH RETURN VALUE
|
.SH RETURN VALUE
|
||||||
The
|
The
|
||||||
|
|
|
@ -172,7 +172,7 @@ and
|
||||||
.BR mkostemp ():
|
.BR mkostemp ():
|
||||||
The last six characters of \fItemplate\fP were not XXXXXX;
|
The last six characters of \fItemplate\fP were not XXXXXX;
|
||||||
now \fItemplate\fP is unchanged.
|
now \fItemplate\fP is unchanged.
|
||||||
.sp
|
.IP
|
||||||
For
|
For
|
||||||
.BR mkstemps ()
|
.BR mkstemps ()
|
||||||
and
|
and
|
||||||
|
|
|
@ -102,9 +102,9 @@ struct timespec {
|
||||||
time_t tv_sec; /* seconds */
|
time_t tv_sec; /* seconds */
|
||||||
long tv_nsec; /* nanoseconds */
|
long tv_nsec; /* nanoseconds */
|
||||||
};
|
};
|
||||||
|
|
||||||
.fi
|
.fi
|
||||||
.in
|
.in
|
||||||
|
.PP
|
||||||
If no message is available,
|
If no message is available,
|
||||||
and the timeout has already expired by the time of the call,
|
and the timeout has already expired by the time of the call,
|
||||||
.BR mq_timedreceive ()
|
.BR mq_timedreceive ()
|
||||||
|
|
|
@ -104,16 +104,16 @@ points to a structure which specifies how long the call will block.
|
||||||
This value is an absolute timeout in seconds and nanoseconds
|
This value is an absolute timeout in seconds and nanoseconds
|
||||||
since the Epoch, 1970-01-01 00:00:00 +0000 (UTC),
|
since the Epoch, 1970-01-01 00:00:00 +0000 (UTC),
|
||||||
specified in the following structure:
|
specified in the following structure:
|
||||||
.sp
|
.PP
|
||||||
.in +4n
|
.in +4n
|
||||||
.nf
|
.nf
|
||||||
struct timespec {
|
struct timespec {
|
||||||
time_t tv_sec; /* seconds */
|
time_t tv_sec; /* seconds */
|
||||||
long tv_nsec; /* nanoseconds */
|
long tv_nsec; /* nanoseconds */
|
||||||
};
|
};
|
||||||
|
|
||||||
.fi
|
.fi
|
||||||
.in
|
.in
|
||||||
|
.PP
|
||||||
If the message queue is full,
|
If the message queue is full,
|
||||||
and the timeout has already expired by the time of the call,
|
and the timeout has already expired by the time of the call,
|
||||||
.BR mq_timedsend ()
|
.BR mq_timedsend ()
|
||||||
|
|
|
@ -576,16 +576,16 @@ In the first run, the
|
||||||
command is executed in the child, and the
|
command is executed in the child, and the
|
||||||
.BR posix_spawn ()
|
.BR posix_spawn ()
|
||||||
call employs no file actions or attributes objects.
|
call employs no file actions or attributes objects.
|
||||||
.sp
|
.PP
|
||||||
.in +4
|
.in +4
|
||||||
.nf
|
.EX
|
||||||
$ \fB./a.out date\fP
|
$ \fB./a.out date\fP
|
||||||
PID of child: 7634
|
PID of child: 7634
|
||||||
Tue Feb 1 19:47:50 CEST 2011
|
Tue Feb 1 19:47:50 CEST 2011
|
||||||
Child status: exited, status=0
|
Child status: exited, status=0
|
||||||
.fi
|
.EE
|
||||||
.in
|
.in
|
||||||
.sp
|
.PP
|
||||||
In the next run, the
|
In the next run, the
|
||||||
.I \-c
|
.I \-c
|
||||||
command-line option is used to create a file actions object that closes
|
command-line option is used to create a file actions object that closes
|
||||||
|
@ -593,16 +593,16 @@ standard output in the child.
|
||||||
Consequently,
|
Consequently,
|
||||||
.BR date (1)
|
.BR date (1)
|
||||||
fails when trying to perform output and exits with a status of 1.
|
fails when trying to perform output and exits with a status of 1.
|
||||||
.sp
|
.PP
|
||||||
.in +4
|
.in +4
|
||||||
.nf
|
.EX
|
||||||
$ \fB./a.out -c date\fP
|
$ \fB./a.out -c date\fP
|
||||||
PID of child: 7636
|
PID of child: 7636
|
||||||
date: write error: Bad file descriptor
|
date: write error: Bad file descriptor
|
||||||
Child status: exited, status=1
|
Child status: exited, status=1
|
||||||
.fi
|
.EE
|
||||||
.in
|
.in
|
||||||
.sp
|
.PP
|
||||||
In the next run, the
|
In the next run, the
|
||||||
.I \-s
|
.I \-s
|
||||||
command-line option is used to create an attributes object that
|
command-line option is used to create an attributes object that
|
||||||
|
@ -617,9 +617,9 @@ Therefore, to kill the child,
|
||||||
is necessary
|
is necessary
|
||||||
.RB ( SIGKILL
|
.RB ( SIGKILL
|
||||||
can't be blocked).
|
can't be blocked).
|
||||||
.sp
|
.PP
|
||||||
.in +4
|
.in +4
|
||||||
.nf
|
.EX
|
||||||
$ \fB./a.out -s sleep 60 &\fP
|
$ \fB./a.out -s sleep 60 &\fP
|
||||||
[1] 7637
|
[1] 7637
|
||||||
$ PID of child: 7638
|
$ PID of child: 7638
|
||||||
|
@ -628,19 +628,19 @@ $ \fBkill 7638\fP
|
||||||
$ \fBkill -KILL 7638\fP
|
$ \fBkill -KILL 7638\fP
|
||||||
$ Child status: killed by signal 9
|
$ Child status: killed by signal 9
|
||||||
[1]+ Done ./a.out -s sleep 60
|
[1]+ Done ./a.out -s sleep 60
|
||||||
.fi
|
.EE
|
||||||
.in
|
.in
|
||||||
.sp
|
.PP
|
||||||
When we try to execute a nonexistent command in the child, the
|
When we try to execute a nonexistent command in the child, the
|
||||||
.BR exec (3)
|
.BR exec (3)
|
||||||
fails and the child exits with a status of 127.
|
fails and the child exits with a status of 127.
|
||||||
.sp
|
.PP
|
||||||
.in +4
|
.in +4
|
||||||
.nf
|
.EX
|
||||||
$ \fB./a.out xxxxx
|
$ \fB./a.out xxxxx
|
||||||
PID of child: 10190
|
PID of child: 10190
|
||||||
Child status: exited, status=127
|
Child status: exited, status=127
|
||||||
.fi
|
.EE
|
||||||
.in
|
.in
|
||||||
.SS Program source
|
.SS Program source
|
||||||
.EX
|
.EX
|
||||||
|
|
|
@ -29,14 +29,14 @@ The
|
||||||
is defined as follows:
|
is defined as follows:
|
||||||
.sp
|
.sp
|
||||||
.in +4n
|
.in +4n
|
||||||
.nf
|
.EX
|
||||||
struct group {
|
struct group {
|
||||||
char *gr_name; /* group name */
|
char *gr_name; /* group name */
|
||||||
char *gr_passwd; /* group password */
|
char *gr_passwd; /* group password */
|
||||||
gid_t gr_gid; /* group ID */
|
gid_t gr_gid; /* group ID */
|
||||||
char **gr_mem; /* group members */
|
char **gr_mem; /* group members */
|
||||||
};
|
};
|
||||||
.fi
|
.EE
|
||||||
.in
|
.in
|
||||||
.SH RETURN VALUE
|
.SH RETURN VALUE
|
||||||
The function returns zero on success, and a nonzero value on error.
|
The function returns zero on success, and a nonzero value on error.
|
||||||
|
|
|
@ -58,7 +58,7 @@ structure \fIp\fP in the file associated with \fIstream\fP.
|
||||||
The \fIpasswd\fP structure is defined in \fI<pwd.h>\fP as follows:
|
The \fIpasswd\fP structure is defined in \fI<pwd.h>\fP as follows:
|
||||||
.sp
|
.sp
|
||||||
.in +4n
|
.in +4n
|
||||||
.nf
|
.EX
|
||||||
struct passwd {
|
struct passwd {
|
||||||
char *pw_name; /* username */
|
char *pw_name; /* username */
|
||||||
char *pw_passwd; /* user password */
|
char *pw_passwd; /* user password */
|
||||||
|
@ -68,7 +68,7 @@ struct passwd {
|
||||||
char *pw_dir; /* home directory */
|
char *pw_dir; /* home directory */
|
||||||
char *pw_shell; /* shell program */
|
char *pw_shell; /* shell program */
|
||||||
};
|
};
|
||||||
.fi
|
.EE
|
||||||
.in
|
.in
|
||||||
.SH RETURN VALUE
|
.SH RETURN VALUE
|
||||||
The
|
The
|
||||||
|
|
|
@ -124,8 +124,8 @@ For one example of use, see the example under
|
||||||
.PP
|
.PP
|
||||||
Another example is the following program,
|
Another example is the following program,
|
||||||
which sorts the strings given in its command-line arguments:
|
which sorts the strings given in its command-line arguments:
|
||||||
.sp
|
.PP
|
||||||
.nf
|
.EX
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
@ -156,7 +156,7 @@ main(int argc, char *argv[])
|
||||||
puts(argv[j]);
|
puts(argv[j]);
|
||||||
exit(EXIT_SUCCESS);
|
exit(EXIT_SUCCESS);
|
||||||
}
|
}
|
||||||
.fi
|
.EE
|
||||||
.SH SEE ALSO
|
.SH SEE ALSO
|
||||||
.BR sort (1),
|
.BR sort (1),
|
||||||
.BR alphasort (3),
|
.BR alphasort (3),
|
||||||
|
|
12
man3/raise.3
12
man3/raise.3
|
@ -40,19 +40,19 @@ The
|
||||||
.BR raise ()
|
.BR raise ()
|
||||||
function sends a signal to the calling process or thread.
|
function sends a signal to the calling process or thread.
|
||||||
In a single-threaded program it is equivalent to
|
In a single-threaded program it is equivalent to
|
||||||
.sp
|
.PP
|
||||||
.in +4n
|
.in +4n
|
||||||
.nf
|
.EX
|
||||||
kill(getpid(), sig);
|
kill(getpid(), sig);
|
||||||
.fi
|
.EE
|
||||||
.in
|
.in
|
||||||
.PP
|
.PP
|
||||||
In a multithreaded program it is equivalent to
|
In a multithreaded program it is equivalent to
|
||||||
.sp
|
.PP
|
||||||
.in +4n
|
.in +4n
|
||||||
.nf
|
.EX
|
||||||
pthread_kill(pthread_self(), sig);
|
pthread_kill(pthread_self(), sig);
|
||||||
.fi
|
.EE
|
||||||
.in
|
.in
|
||||||
.PP
|
.PP
|
||||||
If the signal causes a handler to be called,
|
If the signal causes a handler to be called,
|
||||||
|
|
10
man3/rand.3
10
man3/rand.3
|
@ -185,7 +185,7 @@ and
|
||||||
possibly useful when one needs the same sequence on two different machines.
|
possibly useful when one needs the same sequence on two different machines.
|
||||||
.sp
|
.sp
|
||||||
.in +4n
|
.in +4n
|
||||||
.nf
|
.EX
|
||||||
static unsigned long next = 1;
|
static unsigned long next = 1;
|
||||||
|
|
||||||
/* RAND_MAX assumed to be 32767 */
|
/* RAND_MAX assumed to be 32767 */
|
||||||
|
@ -197,16 +197,16 @@ int myrand(void) {
|
||||||
void mysrand(unsigned int seed) {
|
void mysrand(unsigned int seed) {
|
||||||
next = seed;
|
next = seed;
|
||||||
}
|
}
|
||||||
.fi
|
.EE
|
||||||
.in
|
.in
|
||||||
.PP
|
.PP
|
||||||
The following program can be used to display the
|
The following program can be used to display the
|
||||||
pseudo-random sequence produced by
|
pseudo-random sequence produced by
|
||||||
.BR rand ()
|
.BR rand ()
|
||||||
when given a particular seed.
|
when given a particular seed.
|
||||||
|
.PP
|
||||||
.in +4n
|
.in +4n
|
||||||
.nf
|
.EX
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
|
@ -232,7 +232,7 @@ main(int argc, char *argv[])
|
||||||
|
|
||||||
exit(EXIT_SUCCESS);
|
exit(EXIT_SUCCESS);
|
||||||
}
|
}
|
||||||
.fi
|
.EX
|
||||||
.in
|
.in
|
||||||
.SH SEE ALSO
|
.SH SEE ALSO
|
||||||
.BR drand48 (3),
|
.BR drand48 (3),
|
||||||
|
|
|
@ -99,8 +99,8 @@ is not commented out.
|
||||||
The program connects to a computer called "linux".
|
The program connects to a computer called "linux".
|
||||||
Using "localhost" does not work.
|
Using "localhost" does not work.
|
||||||
The result is the localtime of the computer "linux".
|
The result is the localtime of the computer "linux".
|
||||||
.sp
|
.PP
|
||||||
.nf
|
.EX
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
@ -136,7 +136,7 @@ main(void)
|
||||||
|
|
||||||
exit(EXIT_SUCCESS);
|
exit(EXIT_SUCCESS);
|
||||||
}
|
}
|
||||||
.fi
|
.EE
|
||||||
.SH SEE ALSO
|
.SH SEE ALSO
|
||||||
.\" .BR netdate (1),
|
.\" .BR netdate (1),
|
||||||
.BR ntpdate (1),
|
.BR ntpdate (1),
|
||||||
|
|
|
@ -137,8 +137,8 @@ alias_ent *alias_getbyname(char *name);
|
||||||
The following example compiles with
|
The following example compiles with
|
||||||
.IR "gcc example.c \-o example" .
|
.IR "gcc example.c \-o example" .
|
||||||
It will dump all names in the alias database.
|
It will dump all names in the alias database.
|
||||||
.sp
|
.PP
|
||||||
.nf
|
.EX
|
||||||
#include <aliases.h>
|
#include <aliases.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
@ -162,7 +162,7 @@ main(void)
|
||||||
endaliasent();
|
endaliasent();
|
||||||
exit(EXIT_SUCCESS);
|
exit(EXIT_SUCCESS);
|
||||||
}
|
}
|
||||||
.fi
|
.EE
|
||||||
.SH SEE ALSO
|
.SH SEE ALSO
|
||||||
.BR getgrent (3),
|
.BR getgrent (3),
|
||||||
.BR getpwent (3),
|
.BR getpwent (3),
|
||||||
|
|
|
@ -201,8 +201,8 @@ points to still exists by the time
|
||||||
.I stream
|
.I stream
|
||||||
is closed, which also happens at program termination.
|
is closed, which also happens at program termination.
|
||||||
For example, the following is invalid:
|
For example, the following is invalid:
|
||||||
.nf
|
.PP
|
||||||
.sp
|
.EX
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
int
|
int
|
||||||
|
@ -213,7 +213,7 @@ main(void)
|
||||||
printf("Hello, world!\\n");
|
printf("Hello, world!\\n");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
.fi
|
.PP
|
||||||
.SH SEE ALSO
|
.SH SEE ALSO
|
||||||
.BR stdbuf (1),
|
.BR stdbuf (1),
|
||||||
.BR fclose (3),
|
.BR fclose (3),
|
||||||
|
|
|
@ -109,7 +109,7 @@ is listed in
|
||||||
.BR open (2).
|
.BR open (2).
|
||||||
(Symbolic definitions of these constants can be obtained by including
|
(Symbolic definitions of these constants can be obtained by including
|
||||||
.IR <sys/stat.h> .)
|
.IR <sys/stat.h> .)
|
||||||
.sp
|
.IP
|
||||||
A new shared memory object initially has zero length\(emthe size of the
|
A new shared memory object initially has zero length\(emthe size of the
|
||||||
object can be set using
|
object can be set using
|
||||||
.BR ftruncate (2).
|
.BR ftruncate (2).
|
||||||
|
|
|
@ -40,9 +40,11 @@ These functions return the mantissa of
|
||||||
.I x
|
.I x
|
||||||
scaled to the range [1,2).
|
scaled to the range [1,2).
|
||||||
They are equivalent to
|
They are equivalent to
|
||||||
.sp
|
.PP
|
||||||
.in +4n
|
.in +4n
|
||||||
|
.EX
|
||||||
scalb(x, (double) \-ilogb(x))
|
scalb(x, (double) \-ilogb(x))
|
||||||
|
.EE
|
||||||
.in
|
.in
|
||||||
.PP
|
.PP
|
||||||
This function exists mainly for use in certain standardized tests
|
This function exists mainly for use in certain standardized tests
|
||||||
|
|
|
@ -59,12 +59,12 @@ argument is used to specify an accompanying item of data (either an integer
|
||||||
or a pointer value) to be sent with the signal, and has the following type:
|
or a pointer value) to be sent with the signal, and has the following type:
|
||||||
.sp
|
.sp
|
||||||
.in +4n
|
.in +4n
|
||||||
.nf
|
.EX
|
||||||
union sigval {
|
union sigval {
|
||||||
int sival_int;
|
int sival_int;
|
||||||
void *sival_ptr;
|
void *sival_ptr;
|
||||||
};
|
};
|
||||||
.fi
|
.EE
|
||||||
.in
|
.in
|
||||||
.PP
|
.PP
|
||||||
If the receiving process has installed a handler for this signal using the
|
If the receiving process has installed a handler for this signal using the
|
||||||
|
|
|
@ -236,13 +236,15 @@ function will use information from that field rather than scanning
|
||||||
.IR /proc/mounts .
|
.IR /proc/mounts .
|
||||||
.PP
|
.PP
|
||||||
The glibc implementations of
|
The glibc implementations of
|
||||||
.sp
|
.PP
|
||||||
.nf
|
.in +4n
|
||||||
pathconf(path, _PC_REC_XFER_ALIGN);
|
.EX
|
||||||
pathconf(path, _PC_ALLOC_SIZE_MIN);
|
pathconf(path, _PC_REC_XFER_ALIGN);
|
||||||
pathconf(path, _PC_REC_MIN_XFER_SIZE);
|
pathconf(path, _PC_ALLOC_SIZE_MIN);
|
||||||
.fi
|
pathconf(path, _PC_REC_MIN_XFER_SIZE);
|
||||||
.sp
|
.EE
|
||||||
|
.in
|
||||||
|
.PP
|
||||||
respectively use the
|
respectively use the
|
||||||
.IR f_frsize ,
|
.IR f_frsize ,
|
||||||
.IR f_frsize ,
|
.IR f_frsize ,
|
||||||
|
|
|
@ -84,7 +84,11 @@ and
|
||||||
.BR strfroml ()
|
.BR strfroml ()
|
||||||
functions are equivalent to
|
functions are equivalent to
|
||||||
.PP
|
.PP
|
||||||
snprintf(str, n, format, fp);
|
.in +4n
|
||||||
|
.EX
|
||||||
|
snprintf(str, n, format, fp);
|
||||||
|
.EE
|
||||||
|
.in
|
||||||
.PP
|
.PP
|
||||||
except for the
|
except for the
|
||||||
.I format
|
.I format
|
||||||
|
@ -189,7 +193,7 @@ T} Thread safety MT-Safe locale
|
||||||
\^ Asynchronous signal safety AS-Unsafe heap
|
\^ Asynchronous signal safety AS-Unsafe heap
|
||||||
\^ Asynchronous cancellation safety AC-Unsafe mem
|
\^ Asynchronous cancellation safety AC-Unsafe mem
|
||||||
.TE
|
.TE
|
||||||
.sp
|
.sp 1
|
||||||
Note: these attributes are preliminary.
|
Note: these attributes are preliminary.
|
||||||
.SH CONFORMING TO
|
.SH CONFORMING TO
|
||||||
C99, ISO/IEC TS 18661-1.
|
C99, ISO/IEC TS 18661-1.
|
||||||
|
@ -207,39 +211,39 @@ To convert the value 12.1 as a float type to a string using decimal
|
||||||
notation, resulting in "12.100000":
|
notation, resulting in "12.100000":
|
||||||
.sp
|
.sp
|
||||||
.in +4
|
.in +4
|
||||||
.nf
|
.EX
|
||||||
#define __STDC_WANT_IEC_60559_BFP_EXT__
|
#define __STDC_WANT_IEC_60559_BFP_EXT__
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
int ssize = 10;
|
int ssize = 10;
|
||||||
char s[ssize];
|
char s[ssize];
|
||||||
strfromf(s, ssize, "%f", 12.1);
|
strfromf(s, ssize, "%f", 12.1);
|
||||||
.fi
|
.EE
|
||||||
.in
|
.in
|
||||||
.sp
|
.sp
|
||||||
To convert the value 12.3456 as a float type to a string using
|
To convert the value 12.3456 as a float type to a string using
|
||||||
decimal notation with two digits of precision, resulting in "12.35":
|
decimal notation with two digits of precision, resulting in "12.35":
|
||||||
.sp
|
.sp
|
||||||
.in +4
|
.in +4
|
||||||
.nf
|
.EX
|
||||||
#define __STDC_WANT_IEC_60559_BFP_EXT__
|
#define __STDC_WANT_IEC_60559_BFP_EXT__
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
int ssize = 10;
|
int ssize = 10;
|
||||||
char s[ssize];
|
char s[ssize];
|
||||||
strfromf(s, ssize, "%.2f", 12.3456);
|
strfromf(s, ssize, "%.2f", 12.3456);
|
||||||
.fi
|
.EE
|
||||||
.in
|
.in
|
||||||
.sp
|
.sp
|
||||||
To convert the value 12.345e19 as a double type to a string using
|
To convert the value 12.345e19 as a double type to a string using
|
||||||
scientific notation with zero digits of precision, resulting in "1E+20":
|
scientific notation with zero digits of precision, resulting in "1E+20":
|
||||||
.sp
|
.sp
|
||||||
.in +4
|
.in +4
|
||||||
.nf
|
.EX
|
||||||
#define __STDC_WANT_IEC_60559_BFP_EXT__
|
#define __STDC_WANT_IEC_60559_BFP_EXT__
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
int ssize = 10;
|
int ssize = 10;
|
||||||
char s[ssize];
|
char s[ssize];
|
||||||
strfromd(s, ssize, "%.E", 12.345e19);
|
strfromd(s, ssize, "%.E", 12.345e19);
|
||||||
.fi
|
.EE
|
||||||
.in
|
.in
|
||||||
.SH SEE ALSO
|
.SH SEE ALSO
|
||||||
.BR atof (3),
|
.BR atof (3),
|
||||||
|
|
|
@ -59,7 +59,7 @@ is defined in
|
||||||
as follows:
|
as follows:
|
||||||
.sp
|
.sp
|
||||||
.in +4n
|
.in +4n
|
||||||
.nf
|
.EX
|
||||||
struct tm {
|
struct tm {
|
||||||
int tm_sec; /* Seconds (0-60) */
|
int tm_sec; /* Seconds (0-60) */
|
||||||
int tm_min; /* Minutes (0-59) */
|
int tm_min; /* Minutes (0-59) */
|
||||||
|
@ -71,7 +71,7 @@ struct tm {
|
||||||
int tm_yday; /* Day in the year (0-365, 1 Jan = 0) */
|
int tm_yday; /* Day in the year (0-365, 1 Jan = 0) */
|
||||||
int tm_isdst; /* Daylight saving time */
|
int tm_isdst; /* Daylight saving time */
|
||||||
};
|
};
|
||||||
.fi
|
.EE
|
||||||
.in
|
.in
|
||||||
.PP
|
.PP
|
||||||
For more details on the
|
For more details on the
|
||||||
|
@ -418,7 +418,7 @@ The following example demonstrates the use of
|
||||||
and
|
and
|
||||||
.BR strftime (3).
|
.BR strftime (3).
|
||||||
.sp
|
.sp
|
||||||
.nf
|
.EX
|
||||||
#define _XOPEN_SOURCE
|
#define _XOPEN_SOURCE
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
@ -437,7 +437,7 @@ main(void)
|
||||||
puts(buf);
|
puts(buf);
|
||||||
exit(EXIT_SUCCESS);
|
exit(EXIT_SUCCESS);
|
||||||
}
|
}
|
||||||
.fi
|
.EE
|
||||||
.SH SEE ALSO
|
.SH SEE ALSO
|
||||||
.BR time (2),
|
.BR time (2),
|
||||||
.BR getdate (3),
|
.BR getdate (3),
|
||||||
|
|
|
@ -202,9 +202,9 @@ implementation-defined numeric strings.
|
||||||
BSD also has
|
BSD also has
|
||||||
.sp
|
.sp
|
||||||
.in +4n
|
.in +4n
|
||||||
.nf
|
.EX
|
||||||
.BI "quad_t strtoq(const char *" nptr ", char **" endptr ", int " base );
|
.BI "quad_t strtoq(const char *" nptr ", char **" endptr ", int " base );
|
||||||
.sp
|
.EX
|
||||||
.in
|
.in
|
||||||
.fi
|
.fi
|
||||||
with completely analogous definition.
|
with completely analogous definition.
|
||||||
|
|
|
@ -199,13 +199,13 @@ In locales other than the "C" locale, other strings may be accepted.
|
||||||
supported.)
|
supported.)
|
||||||
.LP
|
.LP
|
||||||
BSD also has
|
BSD also has
|
||||||
.sp
|
.PP
|
||||||
.in +4n
|
.in +4n
|
||||||
.nf
|
.EX
|
||||||
.BI "u_quad_t strtouq(const char *" nptr ", char **" endptr ", int " base );
|
.BI "u_quad_t strtouq(const char *" nptr ", char **" endptr ", int " base );
|
||||||
.sp
|
.EE
|
||||||
.in -4n
|
.in
|
||||||
.fi
|
.PP
|
||||||
with completely analogous definition.
|
with completely analogous definition.
|
||||||
Depending on the wordsize of the current architecture, this
|
Depending on the wordsize of the current architecture, this
|
||||||
may be equivalent to
|
may be equivalent to
|
||||||
|
|
|
@ -94,13 +94,13 @@ that is a pointer to a \fItermios\fP structure.
|
||||||
This structure contains at least the following members:
|
This structure contains at least the following members:
|
||||||
.sp
|
.sp
|
||||||
.in +4n
|
.in +4n
|
||||||
.nf
|
.EX
|
||||||
tcflag_t c_iflag; /* input modes */
|
tcflag_t c_iflag; /* input modes */
|
||||||
tcflag_t c_oflag; /* output modes */
|
tcflag_t c_oflag; /* output modes */
|
||||||
tcflag_t c_cflag; /* control modes */
|
tcflag_t c_cflag; /* control modes */
|
||||||
tcflag_t c_lflag; /* local modes */
|
tcflag_t c_lflag; /* local modes */
|
||||||
cc_t c_cc[NCCS]; /* special characters */
|
cc_t c_cc[NCCS]; /* special characters */
|
||||||
.fi
|
.EE
|
||||||
.in
|
.in
|
||||||
.PP
|
.PP
|
||||||
The values that may be assigned to these fields are described below.
|
The values that may be assigned to these fields are described below.
|
||||||
|
@ -292,7 +292,7 @@ or
|
||||||
.B _BSD_SOURCE
|
.B _BSD_SOURCE
|
||||||
or
|
or
|
||||||
.BR _SVID_SOURCE ]
|
.BR _SVID_SOURCE ]
|
||||||
.sp
|
.IP
|
||||||
(POSIX says that the baud speed is stored in the
|
(POSIX says that the baud speed is stored in the
|
||||||
.I termios
|
.I termios
|
||||||
structure without specifying where precisely, and provides
|
structure without specifying where precisely, and provides
|
||||||
|
|
|
@ -43,26 +43,33 @@ These functions calculate the Gamma function of
|
||||||
.IR x .
|
.IR x .
|
||||||
.PP
|
.PP
|
||||||
The Gamma function is defined by
|
The Gamma function is defined by
|
||||||
.sp
|
.PP
|
||||||
Gamma(x) = integral from 0 to infinity of t^(x\-1) e^\-t dt
|
.RS
|
||||||
.sp
|
Gamma(x) = integral from 0 to infinity of t^(x\-1) e^\-t dt
|
||||||
|
.RE
|
||||||
|
.PP
|
||||||
It is defined for every real number except for nonpositive integers.
|
It is defined for every real number except for nonpositive integers.
|
||||||
For nonnegative integral
|
For nonnegative integral
|
||||||
.I m
|
.I m
|
||||||
one has
|
one has
|
||||||
.sp
|
.PP
|
||||||
Gamma(m+1) = m!
|
.RS
|
||||||
.sp
|
Gamma(m+1) = m!
|
||||||
|
.RE
|
||||||
|
.PP
|
||||||
and, more generally, for all
|
and, more generally, for all
|
||||||
.IR x :
|
.IR x :
|
||||||
.sp
|
.PP
|
||||||
Gamma(x+1) = x * Gamma(x)
|
.RS
|
||||||
.sp
|
Gamma(x+1) = x * Gamma(x)
|
||||||
|
.RE
|
||||||
|
.PP
|
||||||
Furthermore, the following is valid for all values of
|
Furthermore, the following is valid for all values of
|
||||||
.I x
|
.I x
|
||||||
outside the poles:
|
outside the poles:
|
||||||
.sp
|
.PP
|
||||||
Gamma(x) * Gamma(1 \- x) = PI / sin(PI * x)
|
.RS
|
||||||
|
Gamma(x) * Gamma(1 \- x) = PI / sin(PI * x)
|
||||||
.PP
|
.PP
|
||||||
.SH RETURN VALUE
|
.SH RETURN VALUE
|
||||||
On success, these functions return Gamma(x).
|
On success, these functions return Gamma(x).
|
||||||
|
|
|
@ -62,12 +62,12 @@ structures, defined in
|
||||||
as:
|
as:
|
||||||
.sp
|
.sp
|
||||||
.in +4n
|
.in +4n
|
||||||
.nf
|
.EX
|
||||||
struct timeval {
|
struct timeval {
|
||||||
time_t tv_sec; /* seconds */
|
time_t tv_sec; /* seconds */
|
||||||
suseconds_t tv_usec; /* microseconds */
|
suseconds_t tv_usec; /* microseconds */
|
||||||
};
|
};
|
||||||
.fi
|
.EE
|
||||||
.in
|
.in
|
||||||
.PP
|
.PP
|
||||||
.BR timeradd ()
|
.BR timeradd ()
|
||||||
|
|
|
@ -233,8 +233,8 @@ implementation, but is not in the System V documentation.
|
||||||
The following program inserts twelve random numbers into a binary
|
The following program inserts twelve random numbers into a binary
|
||||||
tree, where duplicate numbers are collapsed, then prints the numbers
|
tree, where duplicate numbers are collapsed, then prints the numbers
|
||||||
in order.
|
in order.
|
||||||
.sp
|
.PP
|
||||||
.nf
|
.EX
|
||||||
#define _GNU_SOURCE /* Expose declaration of tdestroy() */
|
#define _GNU_SOURCE /* Expose declaration of tdestroy() */
|
||||||
#include <search.h>
|
#include <search.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
@ -305,7 +305,7 @@ main(void)
|
||||||
tdestroy(root, free);
|
tdestroy(root, free);
|
||||||
exit(EXIT_SUCCESS);
|
exit(EXIT_SUCCESS);
|
||||||
}
|
}
|
||||||
.fi
|
.EE
|
||||||
.SH SEE ALSO
|
.SH SEE ALSO
|
||||||
.BR bsearch (3),
|
.BR bsearch (3),
|
||||||
.BR hsearch (3),
|
.BR hsearch (3),
|
||||||
|
|
47
man3/tzset.3
47
man3/tzset.3
|
@ -93,11 +93,13 @@ The value of
|
||||||
can be one of two formats.
|
can be one of two formats.
|
||||||
The first format is a string of characters that directly represent the
|
The first format is a string of characters that directly represent the
|
||||||
timezone to be used:
|
timezone to be used:
|
||||||
.sp
|
.PP
|
||||||
.RS
|
.in +4n
|
||||||
|
.EX
|
||||||
.IR "std offset" [ dst [ offset ][, start [ /time ], end [ /time ]]]
|
.IR "std offset" [ dst [ offset ][, start [ /time ], end [ /time ]]]
|
||||||
.RE
|
.EE
|
||||||
.sp
|
.in
|
||||||
|
.PP
|
||||||
There are no spaces in the specification.
|
There are no spaces in the specification.
|
||||||
The \fIstd\fP string specifies an abbreviation for the timezone and must be
|
The \fIstd\fP string specifies an abbreviation for the timezone and must be
|
||||||
three or more alphabetic characters.
|
three or more alphabetic characters.
|
||||||
|
@ -111,10 +113,12 @@ The \fIoffset\fP is positive
|
||||||
if the local timezone is west of the Prime Meridian and negative if it is
|
if the local timezone is west of the Prime Meridian and negative if it is
|
||||||
east.
|
east.
|
||||||
The hour must be between 0 and 24, and the minutes and seconds 00 and 59:
|
The hour must be between 0 and 24, and the minutes and seconds 00 and 59:
|
||||||
.sp
|
.PP
|
||||||
.RS
|
.in +4n
|
||||||
|
.EX
|
||||||
.RI [ + | - ] hh [ :mm [ :ss ]]
|
.RI [ + | - ] hh [ :mm [ :ss ]]
|
||||||
.RE
|
.EE
|
||||||
|
.in
|
||||||
.PP
|
.PP
|
||||||
The \fIdst\fP string and \fIoffset\fP specify the name and offset for the
|
The \fIdst\fP string and \fIoffset\fP specify the name and offset for the
|
||||||
corresponding daylight saving timezone.
|
corresponding daylight saving timezone.
|
||||||
|
@ -153,18 +157,21 @@ where the standard time (NZST) is 12 hours ahead of UTC,
|
||||||
and daylight saving time (NZDT), 13 hours ahead of UTC,
|
and daylight saving time (NZDT), 13 hours ahead of UTC,
|
||||||
runs from the first Sunday in October to the third Sunday in March,
|
runs from the first Sunday in October to the third Sunday in March,
|
||||||
and the changeovers happen at the default time of 02:00:00:
|
and the changeovers happen at the default time of 02:00:00:
|
||||||
.nf
|
.in +4n
|
||||||
|
.EX
|
||||||
TZ="NZST-12:00:00NZDT-13:00:00,M10.1.0,M3.3.0"
|
TZ="NZST-12:00:00NZDT-13:00:00,M10.1.0,M3.3.0"
|
||||||
.fi
|
.EE
|
||||||
|
.in
|
||||||
.PP
|
.PP
|
||||||
The second format specifies that the timezone information should be read
|
The second format specifies that the timezone information should be read
|
||||||
from a file:
|
from a file:
|
||||||
.sp
|
.PP
|
||||||
.RS
|
.in +4n
|
||||||
|
.EX
|
||||||
:[filespec]
|
:[filespec]
|
||||||
.RE
|
.EE
|
||||||
.sp
|
.in
|
||||||
|
.PP
|
||||||
If the file specification \fIfilespec\fP is omitted, or its value cannot
|
If the file specification \fIfilespec\fP is omitted, or its value cannot
|
||||||
be interpreted, then Coordinated Universal Time (UTC) is used.
|
be interpreted, then Coordinated Universal Time (UTC) is used.
|
||||||
If \fIfilespec\fP is given, it specifies another
|
If \fIfilespec\fP is given, it specifies another
|
||||||
|
@ -176,10 +183,12 @@ If the colon is omitted each
|
||||||
of the above \fBTZ\fP formats will be tried.
|
of the above \fBTZ\fP formats will be tried.
|
||||||
.PP
|
.PP
|
||||||
Here's an example, once more for New Zealand:
|
Here's an example, once more for New Zealand:
|
||||||
.nf
|
.PP
|
||||||
|
.in +4n
|
||||||
TZ=":Pacific/Auckland"
|
.EX
|
||||||
.fi
|
TZ=":Pacific/Auckland"
|
||||||
|
.EE
|
||||||
|
.in
|
||||||
.SH ENVIRONMENT
|
.SH ENVIRONMENT
|
||||||
.TP
|
.TP
|
||||||
.B TZ
|
.B TZ
|
||||||
|
|
|
@ -81,12 +81,13 @@ Present on Solaris, NetBSD, and perhaps other systems.
|
||||||
For consistency with the other "utmpx" functions (see
|
For consistency with the other "utmpx" functions (see
|
||||||
.BR getutxent (3)),
|
.BR getutxent (3)),
|
||||||
glibc provides (since version 2.1):
|
glibc provides (since version 2.1):
|
||||||
.nf
|
.PP
|
||||||
.sp
|
.in +4n
|
||||||
|
.EX
|
||||||
.B #include <utmpx.h>
|
.B #include <utmpx.h>
|
||||||
.sp
|
|
||||||
.BI "void updwtmpx (const char *" wtmpx_file ", const struct utmpx *" utx );
|
.BI "void updwtmpx (const char *" wtmpx_file ", const struct utmpx *" utx );
|
||||||
.fi
|
.EE
|
||||||
|
.in
|
||||||
.PP
|
.PP
|
||||||
This function performs the same task as
|
This function performs the same task as
|
||||||
.BR updwtmp (),
|
.BR updwtmp (),
|
||||||
|
|
|
@ -125,15 +125,15 @@ in the range [0,1000000].
|
||||||
Programs will be more portable
|
Programs will be more portable
|
||||||
if they never mention this type explicitly.
|
if they never mention this type explicitly.
|
||||||
Use
|
Use
|
||||||
|
.PP
|
||||||
.in +4n
|
.in +4n
|
||||||
.nf
|
.EX
|
||||||
.sp
|
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
\&...
|
\&...
|
||||||
unsigned int usecs;
|
unsigned int usecs;
|
||||||
\&...
|
\&...
|
||||||
usleep(usecs);
|
usleep(usecs);
|
||||||
.fi
|
.EE
|
||||||
.in
|
.in
|
||||||
.LP
|
.LP
|
||||||
The interaction of this function with the
|
The interaction of this function with the
|
||||||
|
@ -151,7 +151,7 @@ signal, and with other timer functions such as
|
||||||
.BR ualarm (3)
|
.BR ualarm (3)
|
||||||
is unspecified.
|
is unspecified.
|
||||||
.SH SEE ALSO
|
.SH SEE ALSO
|
||||||
.BR alarm (2),
|
BR alarm (2),
|
||||||
.BR getitimer (2),
|
.BR getitimer (2),
|
||||||
.BR nanosleep (2),
|
.BR nanosleep (2),
|
||||||
.BR select (2),
|
.BR select (2),
|
||||||
|
|
|
@ -97,8 +97,8 @@ wide-character string is destructively modified during
|
||||||
the operation.
|
the operation.
|
||||||
.SH EXAMPLE
|
.SH EXAMPLE
|
||||||
The following code loops over the tokens contained in a wide-character string.
|
The following code loops over the tokens contained in a wide-character string.
|
||||||
.sp
|
.PP
|
||||||
.nf
|
.EX
|
||||||
wchar_t *wcs = ...;
|
wchar_t *wcs = ...;
|
||||||
wchar_t *token;
|
wchar_t *token;
|
||||||
wchar_t *state;
|
wchar_t *state;
|
||||||
|
@ -107,7 +107,7 @@ for (token = wcstok(wcs, " \\t\\n", &state);
|
||||||
token = wcstok(NULL, " \\t\\n", &state)) {
|
token = wcstok(NULL, " \\t\\n", &state)) {
|
||||||
...
|
...
|
||||||
}
|
}
|
||||||
.fi
|
.EE
|
||||||
.SH SEE ALSO
|
.SH SEE ALSO
|
||||||
.BR strtok (3),
|
.BR strtok (3),
|
||||||
.BR wcschr (3)
|
.BR wcschr (3)
|
||||||
|
|
|
@ -72,7 +72,7 @@ that invoke special functions (i.e., anything other than writing a
|
||||||
glyph at the current cursor location) on the Linux console.
|
glyph at the current cursor location) on the Linux console.
|
||||||
.PP
|
.PP
|
||||||
.B "Control characters"
|
.B "Control characters"
|
||||||
.sp
|
.PP
|
||||||
A character is a control character if (before transformation
|
A character is a control character if (before transformation
|
||||||
according to the mapping table) it has one of the 14 codes
|
according to the mapping table) it has one of the 14 codes
|
||||||
00 (NUL), 07 (BEL), 08 (BS), 09 (HT), 0a (LF), 0b (VT),
|
00 (NUL), 07 (BEL), 08 (BS), 09 (HT), 0a (LF), 0b (VT),
|
||||||
|
@ -164,7 +164,7 @@ T}
|
||||||
.TE
|
.TE
|
||||||
.PP
|
.PP
|
||||||
.B "ECMA-48 CSI sequences"
|
.B "ECMA-48 CSI sequences"
|
||||||
.sp
|
.PP
|
||||||
CSI (or ESC [) is followed by a sequence of parameters,
|
CSI (or ESC [) is followed by a sequence of parameters,
|
||||||
at most NPAR (16), that are decimal numbers separated by
|
at most NPAR (16), that are decimal numbers separated by
|
||||||
semicolons.
|
semicolons.
|
||||||
|
@ -223,7 +223,7 @@ u ? Restore cursor location.
|
||||||
.TE
|
.TE
|
||||||
.PP
|
.PP
|
||||||
.B ECMA-48 Set Graphics Rendition
|
.B ECMA-48 Set Graphics Rendition
|
||||||
.sp
|
.PP
|
||||||
The ECMA-48 SGR sequence ESC [ \fIparameters\fP m sets display
|
The ECMA-48 SGR sequence ESC [ \fIparameters\fP m sets display
|
||||||
attributes.
|
attributes.
|
||||||
Several attributes can be set in the same sequence, separated by
|
Several attributes can be set in the same sequence, separated by
|
||||||
|
@ -308,7 +308,7 @@ where \fIx,y\fP is the cursor location.
|
||||||
.\"
|
.\"
|
||||||
.PP
|
.PP
|
||||||
.B DEC Private Mode (DECSET/DECRST) sequences
|
.B DEC Private Mode (DECSET/DECRST) sequences
|
||||||
.sp
|
.PP
|
||||||
.\"
|
.\"
|
||||||
These are not described in ECMA-48.
|
These are not described in ECMA-48.
|
||||||
We list the Set Mode sequences;
|
We list the Set Mode sequences;
|
||||||
|
@ -355,7 +355,7 @@ to 0)\(emsee below.
|
||||||
.\"
|
.\"
|
||||||
.PP
|
.PP
|
||||||
.B Linux Console Private CSI Sequences
|
.B Linux Console Private CSI Sequences
|
||||||
.sp
|
.PP
|
||||||
.\"
|
.\"
|
||||||
The following sequences are neither ECMA-48 nor native VT102.
|
The following sequences are neither ECMA-48 nor native VT102.
|
||||||
They are native to the Linux console driver.
|
They are native to the Linux console driver.
|
||||||
|
@ -472,7 +472,7 @@ Linux console and the two most important others, the DEC VT102 and
|
||||||
.\"
|
.\"
|
||||||
.PP
|
.PP
|
||||||
.B Control-character handling
|
.B Control-character handling
|
||||||
.sp
|
.PP
|
||||||
The VT102 also recognized the following control characters:
|
The VT102 also recognized the following control characters:
|
||||||
.HP
|
.HP
|
||||||
NUL (0x00) was ignored;
|
NUL (0x00) was ignored;
|
||||||
|
@ -493,7 +493,7 @@ BEL, BS, HT, LF, VT, FF, CR, SO, SI, ESC.
|
||||||
.\"
|
.\"
|
||||||
.PP
|
.PP
|
||||||
.B Escape sequences
|
.B Escape sequences
|
||||||
.sp
|
.PP
|
||||||
VT100 console sequences not implemented on the Linux console:
|
VT100 console sequences not implemented on the Linux console:
|
||||||
.TS
|
.TS
|
||||||
l l l.
|
l l l.
|
||||||
|
@ -568,7 +568,7 @@ implementation than Linux console.
|
||||||
.\"
|
.\"
|
||||||
.PP
|
.PP
|
||||||
.B CSI Sequences
|
.B CSI Sequences
|
||||||
.sp
|
.PP
|
||||||
Old versions of \fBxterm\fP(1), for example, from X11R5,
|
Old versions of \fBxterm\fP(1), for example, from X11R5,
|
||||||
interpret the blink SGR as a bold SGR.
|
interpret the blink SGR as a bold SGR.
|
||||||
Later versions which implemented ANSI colors, for example,
|
Later versions which implemented ANSI colors, for example,
|
||||||
|
|
18
man4/hd.4
18
man4/hd.4
|
@ -76,30 +76,22 @@ refers to all of the first IDE drive in the system; and
|
||||||
refers to the third DOS "primary" partition on the second one.
|
refers to the third DOS "primary" partition on the second one.
|
||||||
.LP
|
.LP
|
||||||
They are typically created by:
|
They are typically created by:
|
||||||
.RS
|
.PP
|
||||||
.sp
|
.in +4n
|
||||||
|
.EX
|
||||||
mknod \-m 660 /dev/hda b 3 0
|
mknod \-m 660 /dev/hda b 3 0
|
||||||
.br
|
|
||||||
mknod \-m 660 /dev/hda1 b 3 1
|
mknod \-m 660 /dev/hda1 b 3 1
|
||||||
.br
|
|
||||||
mknod \-m 660 /dev/hda2 b 3 2
|
mknod \-m 660 /dev/hda2 b 3 2
|
||||||
.br
|
|
||||||
\&...
|
\&...
|
||||||
.br
|
|
||||||
mknod \-m 660 /dev/hda8 b 3 8
|
mknod \-m 660 /dev/hda8 b 3 8
|
||||||
.br
|
|
||||||
mknod \-m 660 /dev/hdb b 3 64
|
mknod \-m 660 /dev/hdb b 3 64
|
||||||
.br
|
|
||||||
mknod \-m 660 /dev/hdb1 b 3 65
|
mknod \-m 660 /dev/hdb1 b 3 65
|
||||||
.br
|
|
||||||
mknod \-m 660 /dev/hdb2 b 3 66
|
mknod \-m 660 /dev/hdb2 b 3 66
|
||||||
.br
|
|
||||||
\&...
|
\&...
|
||||||
.br
|
|
||||||
mknod \-m 660 /dev/hdb8 b 3 72
|
mknod \-m 660 /dev/hdb8 b 3 72
|
||||||
.br
|
|
||||||
chown root:disk /dev/hd*
|
chown root:disk /dev/hd*
|
||||||
.RE
|
.EE
|
||||||
|
.in
|
||||||
.SH FILES
|
.SH FILES
|
||||||
/dev/hd*
|
/dev/hd*
|
||||||
.SH SEE ALSO
|
.SH SEE ALSO
|
||||||
|
|
74
man4/hpsa.4
74
man4/hpsa.4
|
@ -40,8 +40,8 @@ should still be used for these.
|
||||||
The
|
The
|
||||||
.B hpsa
|
.B hpsa
|
||||||
driver supports the following Smart Array boards:
|
driver supports the following Smart Array boards:
|
||||||
|
.PP
|
||||||
.nf
|
.nf
|
||||||
|
|
||||||
Smart Array P700M
|
Smart Array P700M
|
||||||
Smart Array P212
|
Smart Array P212
|
||||||
Smart Array P410
|
Smart Array P410
|
||||||
|
@ -96,48 +96,58 @@ This attribute contains the firmware version of the Smart Array.
|
||||||
.IP
|
.IP
|
||||||
For example:
|
For example:
|
||||||
.IP
|
.IP
|
||||||
.nf
|
.in +4n
|
||||||
# \fBcd /sys/class/scsi_host/host4\fP
|
.EX
|
||||||
# \fBcat firmware_revision\fP
|
# \fBcd /sys/class/scsi_host/host4\fP
|
||||||
7.14
|
# \fBcat firmware_revision\fP
|
||||||
.fi
|
7.14
|
||||||
|
.EE
|
||||||
|
.in
|
||||||
|
.\"
|
||||||
.SS HPSA-specific disk attribute files in /sys
|
.SS HPSA-specific disk attribute files in /sys
|
||||||
.TP
|
.TP
|
||||||
.I /sys/class/scsi_disk/c:b:t:l/device/unique_id
|
.I /sys/class/scsi_disk/c:b:t:l/device/unique_id
|
||||||
This attribute contains a 32 hex-digit unique ID for each logical drive.
|
This attribute contains a 32 hex-digit unique ID for each logical drive.
|
||||||
.nf
|
.IP
|
||||||
|
|
||||||
For example:
|
For example:
|
||||||
|
.IP
|
||||||
# \fBcd /sys/class/scsi_disk/4:0:0:0/device\fP
|
.in +4n
|
||||||
# \fBcat unique_id\fP
|
.EX
|
||||||
600508B1001044395355323037570F77
|
# \fBcd /sys/class/scsi_disk/4:0:0:0/device\fP
|
||||||
.fi
|
# \fBcat unique_id\fP
|
||||||
|
600508B1001044395355323037570F77
|
||||||
|
.EE
|
||||||
|
.in
|
||||||
.TP
|
.TP
|
||||||
.I /sys/class/scsi_disk/c:b:t:l/device/raid_level
|
.I /sys/class/scsi_disk/c:b:t:l/device/raid_level
|
||||||
This attribute contains the RAID level of each logical drive.
|
This attribute contains the RAID level of each logical drive.
|
||||||
.nf
|
.IP
|
||||||
|
|
||||||
For example:
|
For example:
|
||||||
|
.IP
|
||||||
# \fBcd /sys/class/scsi_disk/4:0:0:0/device\fP
|
.in +4n
|
||||||
# \fBcat raid_level\fP
|
.EX
|
||||||
RAID 0
|
# \fBcd /sys/class/scsi_disk/4:0:0:0/device\fP
|
||||||
.fi
|
# \fBcat raid_level\fP
|
||||||
|
RAID 0
|
||||||
|
.EE
|
||||||
|
.in
|
||||||
.TP
|
.TP
|
||||||
.I /sys/class/scsi_disk/c:b:t:l/device/lunid
|
.I /sys/class/scsi_disk/c:b:t:l/device/lunid
|
||||||
This attribute contains the 16 hex-digit (8 byte) LUN ID
|
This attribute contains the 16 hex-digit (8 byte) LUN ID
|
||||||
by which a logical drive or physical device can be addressed.
|
by which a logical drive or physical device can be addressed.
|
||||||
.IR c : b : t : l
|
.IR c : b : t : l
|
||||||
are the controller, bus, target, and lun of the device.
|
are the controller, bus, target, and lun of the device.
|
||||||
.nf
|
.PP
|
||||||
|
|
||||||
For example:
|
For example:
|
||||||
|
.IP
|
||||||
# \fBcd /sys/class/scsi_disk/4:0:0:0/device\fP
|
.in +4n
|
||||||
# \fBcat lunid\fP
|
.EX
|
||||||
0x0000004000000000
|
# \fBcd /sys/class/scsi_disk/4:0:0:0/device\fP
|
||||||
.fi
|
# \fBcat lunid\fP
|
||||||
|
0x0000004000000000
|
||||||
|
.EE
|
||||||
|
.in
|
||||||
|
.\"
|
||||||
.SS Supported ioctl() operations
|
.SS Supported ioctl() operations
|
||||||
For compatibility with applications written for the
|
For compatibility with applications written for the
|
||||||
.BR cciss (4)
|
.BR cciss (4)
|
||||||
|
@ -162,9 +172,13 @@ Returns PCI domain, bus, device and function and "board ID" (PCI subsystem ID).
|
||||||
.TP
|
.TP
|
||||||
.B CCISS_GETDRIVVER
|
.B CCISS_GETDRIVVER
|
||||||
Returns driver version in three bytes encoded as:
|
Returns driver version in three bytes encoded as:
|
||||||
.sp
|
.IP
|
||||||
(major_version << 16) | (minor_version << 8) |
|
.in +4n
|
||||||
(subminor_version)
|
.EX
|
||||||
|
(major_version << 16) | (minor_version << 8) |
|
||||||
|
(subminor_version)
|
||||||
|
.EE
|
||||||
|
.in
|
||||||
.TP
|
.TP
|
||||||
.BR CCISS_PASSTHRU ", " CCISS_BIG_PASSTHRU
|
.BR CCISS_PASSTHRU ", " CCISS_BIG_PASSTHRU
|
||||||
Allows "BMIC" and "CISS" commands to be passed through to the Smart Array.
|
Allows "BMIC" and "CISS" commands to be passed through to the Smart Array.
|
||||||
|
|
31
man4/mem.4
31
man4/mem.4
|
@ -48,13 +48,14 @@ For example: on x86, RAM access is not allowed but accessing
|
||||||
memory-mapped PCI regions is.
|
memory-mapped PCI regions is.
|
||||||
.LP
|
.LP
|
||||||
It is typically created by:
|
It is typically created by:
|
||||||
.RS
|
.PP
|
||||||
.sp
|
.in +4n
|
||||||
|
.EX
|
||||||
mknod \-m 660 /dev/mem c 1 1
|
mknod \-m 660 /dev/mem c 1 1
|
||||||
.br
|
|
||||||
chown root:kmem /dev/mem
|
chown root:kmem /dev/mem
|
||||||
.RE
|
.EE
|
||||||
.LP
|
.in
|
||||||
|
.PP
|
||||||
The file
|
The file
|
||||||
.IR /dev/kmem
|
.IR /dev/kmem
|
||||||
is the same as
|
is the same as
|
||||||
|
@ -66,25 +67,27 @@ Since Linux 2.6.26, this file is available only if the
|
||||||
kernel configuration option is enabled.
|
kernel configuration option is enabled.
|
||||||
.LP
|
.LP
|
||||||
It is typically created by:
|
It is typically created by:
|
||||||
.RS
|
.PP
|
||||||
.sp
|
.in +4n
|
||||||
|
.EX
|
||||||
mknod \-m 640 /dev/kmem c 1 2
|
mknod \-m 640 /dev/kmem c 1 2
|
||||||
.br
|
|
||||||
chown root:kmem /dev/kmem
|
chown root:kmem /dev/kmem
|
||||||
.RE
|
.EE
|
||||||
.LP
|
.in
|
||||||
|
.PP
|
||||||
.IR /dev/port
|
.IR /dev/port
|
||||||
is similar to
|
is similar to
|
||||||
.IR /dev/mem ,
|
.IR /dev/mem ,
|
||||||
but the I/O ports are accessed.
|
but the I/O ports are accessed.
|
||||||
.LP
|
.LP
|
||||||
It is typically created by:
|
It is typically created by:
|
||||||
.RS
|
.PP
|
||||||
.sp
|
.in +4n
|
||||||
|
.EX
|
||||||
mknod \-m 660 /dev/port c 1 4
|
mknod \-m 660 /dev/port c 1 4
|
||||||
.br
|
|
||||||
chown root:kmem /dev/port
|
chown root:kmem /dev/port
|
||||||
.RE
|
.EE
|
||||||
|
.in
|
||||||
.SH FILES
|
.SH FILES
|
||||||
.I /dev/mem
|
.I /dev/mem
|
||||||
.br
|
.br
|
||||||
|
|
10
man4/null.4
10
man4/null.4
|
@ -42,14 +42,14 @@ returns 0), whereas reads from
|
||||||
always return bytes containing zero (\(aq\e0\(aq characters).
|
always return bytes containing zero (\(aq\e0\(aq characters).
|
||||||
.LP
|
.LP
|
||||||
These devices are typically created by:
|
These devices are typically created by:
|
||||||
.RS
|
.PP
|
||||||
.sp
|
.in +4n
|
||||||
|
.EX
|
||||||
mknod \-m 666 /dev/null c 1 3
|
mknod \-m 666 /dev/null c 1 3
|
||||||
.br
|
|
||||||
mknod \-m 666 /dev/zero c 1 5
|
mknod \-m 666 /dev/zero c 1 5
|
||||||
.br
|
|
||||||
chown root:root /dev/null /dev/zero
|
chown root:root /dev/null /dev/zero
|
||||||
.RE
|
.EE
|
||||||
|
.in
|
||||||
.SH FILES
|
.SH FILES
|
||||||
.I /dev/null
|
.I /dev/null
|
||||||
.br
|
.br
|
||||||
|
|
|
@ -32,12 +32,13 @@ The
|
||||||
device is a block device to access the ram disk in raw mode.
|
device is a block device to access the ram disk in raw mode.
|
||||||
.LP
|
.LP
|
||||||
It is typically created by:
|
It is typically created by:
|
||||||
.RS
|
.PP
|
||||||
.sp
|
.in +4n
|
||||||
|
.EX
|
||||||
mknod \-m 660 /dev/ram b 1 1
|
mknod \-m 660 /dev/ram b 1 1
|
||||||
.br
|
|
||||||
chown root:disk /dev/ram
|
chown root:disk /dev/ram
|
||||||
.RE
|
.EE
|
||||||
|
.in
|
||||||
.SH FILES
|
.SH FILES
|
||||||
/dev/ram
|
/dev/ram
|
||||||
.SH SEE ALSO
|
.SH SEE ALSO
|
||||||
|
|
12
man4/sd.4
12
man4/sd.4
|
@ -51,11 +51,11 @@ where
|
||||||
is the number of the physical drive in order of detection, and
|
is the number of the physical drive in order of detection, and
|
||||||
.I partition_number
|
.I partition_number
|
||||||
is as follows:
|
is as follows:
|
||||||
.sp
|
.IP +3
|
||||||
partition 0 is the whole drive
|
partition 0 is the whole drive
|
||||||
.br
|
.IP
|
||||||
partitions 1-4 are the DOS "primary" partitions
|
partitions 1-4 are the DOS "primary" partitions
|
||||||
.br
|
.IP
|
||||||
partitions 5-8 are the DOS "extended" (or "logical") partitions
|
partitions 5-8 are the DOS "extended" (or "logical") partitions
|
||||||
.PP
|
.PP
|
||||||
For example,
|
For example,
|
||||||
|
@ -75,16 +75,16 @@ are provided:
|
||||||
.TP
|
.TP
|
||||||
.B HDIO_GETGEO
|
.B HDIO_GETGEO
|
||||||
Returns the BIOS disk parameters in the following structure:
|
Returns the BIOS disk parameters in the following structure:
|
||||||
|
.PP
|
||||||
.in +4n
|
.in +4n
|
||||||
.nf
|
.EX
|
||||||
|
|
||||||
struct hd_geometry {
|
struct hd_geometry {
|
||||||
unsigned char heads;
|
unsigned char heads;
|
||||||
unsigned char sectors;
|
unsigned char sectors;
|
||||||
unsigned short cylinders;
|
unsigned short cylinders;
|
||||||
unsigned long start;
|
unsigned long start;
|
||||||
};
|
};
|
||||||
.fi
|
.EE
|
||||||
.in
|
.in
|
||||||
.IP
|
.IP
|
||||||
A pointer to this structure is passed as the
|
A pointer to this structure is passed as the
|
||||||
|
|
12
man4/ttyS.4
12
man4/ttyS.4
|
@ -31,18 +31,16 @@ ttyS \- serial terminal lines
|
||||||
are character devices for the serial terminal lines.
|
are character devices for the serial terminal lines.
|
||||||
.LP
|
.LP
|
||||||
They are typically created by:
|
They are typically created by:
|
||||||
.RS
|
.PP
|
||||||
.sp
|
.in +4n
|
||||||
|
.EX
|
||||||
mknod \-m 660 /dev/ttyS0 c 4 64 # base address 0x3f8
|
mknod \-m 660 /dev/ttyS0 c 4 64 # base address 0x3f8
|
||||||
.br
|
|
||||||
mknod \-m 660 /dev/ttyS1 c 4 65 # base address 0x2f8
|
mknod \-m 660 /dev/ttyS1 c 4 65 # base address 0x2f8
|
||||||
.br
|
|
||||||
mknod \-m 660 /dev/ttyS2 c 4 66 # base address 0x3e8
|
mknod \-m 660 /dev/ttyS2 c 4 66 # base address 0x3e8
|
||||||
.br
|
|
||||||
mknod \-m 660 /dev/ttyS3 c 4 67 # base address 0x2e8
|
mknod \-m 660 /dev/ttyS3 c 4 67 # base address 0x2e8
|
||||||
.br
|
|
||||||
chown root:tty /dev/ttyS[0\-3]
|
chown root:tty /dev/ttyS[0\-3]
|
||||||
.RE
|
.EE
|
||||||
|
.in
|
||||||
.SH FILES
|
.SH FILES
|
||||||
/dev/ttyS[0\-3]
|
/dev/ttyS[0\-3]
|
||||||
.SH SEE ALSO
|
.SH SEE ALSO
|
||||||
|
|
|
@ -137,7 +137,7 @@ optional period and 3 character extension.
|
||||||
.B ncpfs
|
.B ncpfs
|
||||||
is a network filesystem that supports the NCP protocol, used by
|
is a network filesystem that supports the NCP protocol, used by
|
||||||
Novell NetWare.
|
Novell NetWare.
|
||||||
.sp
|
.IP
|
||||||
To use
|
To use
|
||||||
.BR ncpfs ,
|
.BR ncpfs ,
|
||||||
you need special programs, which can be found at
|
you need special programs, which can be found at
|
||||||
|
@ -167,7 +167,7 @@ that was integrated into Linux in kernel 2.4.1.
|
||||||
.B smb
|
.B smb
|
||||||
is a network filesystem that supports the SMB protocol, used by
|
is a network filesystem that supports the SMB protocol, used by
|
||||||
Windows for Workgroups, Windows NT, and Lan Manager.
|
Windows for Workgroups, Windows NT, and Lan Manager.
|
||||||
.sp
|
.IP
|
||||||
To use
|
To use
|
||||||
.B smb
|
.B smb
|
||||||
fs, you need a special mount program, which can be found in the ksmbfs
|
fs, you need a special mount program, which can be found in the ksmbfs
|
||||||
|
|
10
man5/group.5
10
man5/group.5
|
@ -31,11 +31,13 @@ The
|
||||||
.I /etc/group
|
.I /etc/group
|
||||||
file is a text file that defines the groups on the system.
|
file is a text file that defines the groups on the system.
|
||||||
There is one entry per line, with the following format:
|
There is one entry per line, with the following format:
|
||||||
.sp
|
.PP
|
||||||
.RS
|
.in +4n
|
||||||
|
.EX
|
||||||
group_name:password:GID:user_list
|
group_name:password:GID:user_list
|
||||||
.RE
|
.EE
|
||||||
.sp
|
.in
|
||||||
|
.PP
|
||||||
The fields are as follows:
|
The fields are as follows:
|
||||||
.TP 12
|
.TP 12
|
||||||
.I group_name
|
.I group_name
|
||||||
|
|
|
@ -78,11 +78,13 @@ to set it.
|
||||||
.PP
|
.PP
|
||||||
Each line of the file describes a single user,
|
Each line of the file describes a single user,
|
||||||
and contains seven colon-separated fields:
|
and contains seven colon-separated fields:
|
||||||
.sp
|
.PP
|
||||||
.RS
|
.in +4n
|
||||||
|
.EX
|
||||||
name:password:UID:GID:GECOS:directory:shell
|
name:password:UID:GID:GECOS:directory:shell
|
||||||
.RE
|
.EE
|
||||||
.sp
|
.in
|
||||||
|
.PP
|
||||||
The field are as follows:
|
The field are as follows:
|
||||||
.TP 12
|
.TP 12
|
||||||
.I name
|
.I name
|
||||||
|
|
|
@ -45,14 +45,14 @@ disallow access to users with shells not included in this file.
|
||||||
.SH EXAMPLE
|
.SH EXAMPLE
|
||||||
.I /etc/shells
|
.I /etc/shells
|
||||||
may contain the following paths:
|
may contain the following paths:
|
||||||
.sp
|
.PP
|
||||||
.RS
|
.in +4n
|
||||||
|
.EX
|
||||||
.I /bin/sh
|
.I /bin/sh
|
||||||
.br
|
|
||||||
.I /bin/bash
|
.I /bin/bash
|
||||||
.br
|
|
||||||
.I /bin/csh
|
.I /bin/csh
|
||||||
.RE
|
.EE
|
||||||
|
.in
|
||||||
.SH SEE ALSO
|
.SH SEE ALSO
|
||||||
.BR chsh (1),
|
.BR chsh (1),
|
||||||
.BR getusershell (3)
|
.BR getusershell (3)
|
||||||
|
|
|
@ -84,9 +84,9 @@ boolean, then numeric, and then string capabilities, each sorted
|
||||||
alphabetically without looking at lower or upper spelling.
|
alphabetically without looking at lower or upper spelling.
|
||||||
Capabilities of similar functions can be written in one line.
|
Capabilities of similar functions can be written in one line.
|
||||||
.LP
|
.LP
|
||||||
.nf
|
|
||||||
Example for:
|
Example for:
|
||||||
.sp
|
.nf
|
||||||
|
.PP
|
||||||
Head line: vt|vt101|DEC VT 101 terminal in 80 character mode:\e
|
Head line: vt|vt101|DEC VT 101 terminal in 80 character mode:\e
|
||||||
Head line: Vt|vt101-w|DEC VT 101 terminal in (wide) 132 character mode:\e
|
Head line: Vt|vt101-w|DEC VT 101 terminal in (wide) 132 character mode:\e
|
||||||
Boolean: :bs:\e
|
Boolean: :bs:\e
|
||||||
|
@ -436,7 +436,7 @@ The first character is the name of the block graphic
|
||||||
symbol and the second characters is its definition.
|
symbol and the second characters is its definition.
|
||||||
.LP
|
.LP
|
||||||
The following names are available:
|
The following names are available:
|
||||||
.sp
|
.PP
|
||||||
.nf
|
.nf
|
||||||
+ right arrow (>)
|
+ right arrow (>)
|
||||||
, left arrow (<)
|
, left arrow (<)
|
||||||
|
@ -464,7 +464,7 @@ w normal tee (+)
|
||||||
x vertical line (|)
|
x vertical line (|)
|
||||||
~ paragraph (???)
|
~ paragraph (???)
|
||||||
.fi
|
.fi
|
||||||
.sp
|
.PP
|
||||||
The values in parentheses are suggested defaults which are used by the
|
The values in parentheses are suggested defaults which are used by the
|
||||||
.IR curses
|
.IR curses
|
||||||
library, if the capabilities are missing.
|
library, if the capabilities are missing.
|
||||||
|
|
|
@ -58,12 +58,13 @@ the tty definitions file.
|
||||||
A typical
|
A typical
|
||||||
.I /etc/ttytype
|
.I /etc/ttytype
|
||||||
is:
|
is:
|
||||||
.RS
|
.PP
|
||||||
.sp
|
.in +4n
|
||||||
|
.EX
|
||||||
con80x25 tty1
|
con80x25 tty1
|
||||||
.br
|
|
||||||
vt320 ttys0
|
vt320 ttys0
|
||||||
.RE
|
.EE
|
||||||
|
.in
|
||||||
.SH SEE ALSO
|
.SH SEE ALSO
|
||||||
.BR termcap (5),
|
.BR termcap (5),
|
||||||
.BR terminfo (5),
|
.BR terminfo (5),
|
||||||
|
|
|
@ -83,18 +83,17 @@ These values serve as indices into the next field.
|
||||||
.I tzh_typecnt
|
.I tzh_typecnt
|
||||||
.I ttinfo
|
.I ttinfo
|
||||||
entries, each defined as follows:
|
entries, each defined as follows:
|
||||||
.in +.5i
|
.PP
|
||||||
.sp
|
.in +4n
|
||||||
.nf
|
.EX
|
||||||
.ta .5i +\w'unsigned char\0\0'u
|
|
||||||
struct ttinfo {
|
struct ttinfo {
|
||||||
int32_t tt_gmtoff;
|
int32_t tt_gmtoff;
|
||||||
unsigned char tt_isdst;
|
unsigned char tt_isdst;
|
||||||
unsigned char tt_abbrind;
|
unsigned char tt_abbrind;
|
||||||
};
|
};
|
||||||
.in -.5i
|
.EE
|
||||||
.fi
|
.in
|
||||||
.sp
|
.PP
|
||||||
Each structure is written as a four-byte signed integer value for
|
Each structure is written as a four-byte signed integer value for
|
||||||
.IR tt_gmtoff ,
|
.IR tt_gmtoff ,
|
||||||
in a standard byte order, followed by a one-byte value for
|
in a standard byte order, followed by a one-byte value for
|
||||||
|
|
20
man5/utmp.5
20
man5/utmp.5
|
@ -57,9 +57,9 @@ declared as follows in
|
||||||
.IR <utmp.h>
|
.IR <utmp.h>
|
||||||
(note that this is only one of several definitions
|
(note that this is only one of several definitions
|
||||||
around; details depend on the version of libc):
|
around; details depend on the version of libc):
|
||||||
|
.in
|
||||||
.in +4n
|
.in +4n
|
||||||
.nf
|
.EX
|
||||||
.sp
|
|
||||||
/* Values for ut_type field, below */
|
/* Values for ut_type field, below */
|
||||||
|
|
||||||
#define EMPTY 0 /* Record does not contain valid info
|
#define EMPTY 0 /* Record does not contain valid info
|
||||||
|
@ -127,9 +127,9 @@ struct utmp {
|
||||||
#endif
|
#endif
|
||||||
#define ut_xtime ut_tv.tv_sec
|
#define ut_xtime ut_tv.tv_sec
|
||||||
#define ut_addr ut_addr_v6[0]
|
#define ut_addr ut_addr_v6[0]
|
||||||
.sp
|
.EE
|
||||||
.fi
|
|
||||||
.in
|
.in
|
||||||
|
.PP
|
||||||
This structure gives the name of the special file associated with the
|
This structure gives the name of the special file associated with the
|
||||||
user's terminal, the user's login name, and the time of login in the form
|
user's terminal, the user's login name, and the time of login in the form
|
||||||
of
|
of
|
||||||
|
@ -309,24 +309,24 @@ and
|
||||||
.IR tv_usec .
|
.IR tv_usec .
|
||||||
Since \fIut_tv\fP may not be the same as \fIstruct timeval\fP,
|
Since \fIut_tv\fP may not be the same as \fIstruct timeval\fP,
|
||||||
then instead of the call:
|
then instead of the call:
|
||||||
|
.PP
|
||||||
.in +4n
|
.in +4n
|
||||||
.nf
|
.EX
|
||||||
.sp
|
|
||||||
gettimeofday((struct timeval *) &ut.ut_tv, NULL);
|
gettimeofday((struct timeval *) &ut.ut_tv, NULL);
|
||||||
.fi
|
.EE
|
||||||
.in
|
.in
|
||||||
.PP
|
.PP
|
||||||
the following method of setting this field is recommended:
|
the following method of setting this field is recommended:
|
||||||
|
.PP
|
||||||
.in +4n
|
.in +4n
|
||||||
.nf
|
.EX
|
||||||
.sp
|
|
||||||
struct utmp ut;
|
struct utmp ut;
|
||||||
struct timeval tv;
|
struct timeval tv;
|
||||||
|
|
||||||
gettimeofday(&tv, NULL);
|
gettimeofday(&tv, NULL);
|
||||||
ut.ut_tv.tv_sec = tv.tv_sec;
|
ut.ut_tv.tv_sec = tv.tv_sec;
|
||||||
ut.ut_tv.tv_usec = tv.tv_usec;
|
ut.ut_tv.tv_usec = tv.tv_usec;
|
||||||
.fi
|
.EE
|
||||||
.in
|
.in
|
||||||
.\" .PP
|
.\" .PP
|
||||||
.\" Note that the \fIutmp\fP struct from libc5 has changed in libc6.
|
.\" Note that the \fIutmp\fP struct from libc5 has changed in libc6.
|
||||||
|
|
|
@ -123,7 +123,7 @@ _
|
||||||
\}
|
\}
|
||||||
.SS Tables
|
.SS Tables
|
||||||
For convenience, below are more compact tables in hex and decimal.
|
For convenience, below are more compact tables in hex and decimal.
|
||||||
.sp
|
.PP
|
||||||
.nf
|
.nf
|
||||||
.if t \{\
|
.if t \{\
|
||||||
.in 1i
|
.in 1i
|
||||||
|
|
160
man7/bootparam.7
160
man7/bootparam.7
|
@ -35,7 +35,7 @@ In general, this is used to
|
||||||
supply the kernel with information about hardware parameters that
|
supply the kernel with information about hardware parameters that
|
||||||
the kernel would not be able to determine on its own, or to avoid/override
|
the kernel would not be able to determine on its own, or to avoid/override
|
||||||
the values that the kernel would otherwise detect.
|
the values that the kernel would otherwise detect.
|
||||||
|
.PP
|
||||||
When the kernel is booted directly by the BIOS,
|
When the kernel is booted directly by the BIOS,
|
||||||
you have no opportunity to specify any parameters.
|
you have no opportunity to specify any parameters.
|
||||||
So, in order to take advantage of this possibility you have to
|
So, in order to take advantage of this possibility you have to
|
||||||
|
@ -44,11 +44,11 @@ use a boot loader that is able to pass parameters, such as GRUB.
|
||||||
The kernel command line is parsed into a list of strings
|
The kernel command line is parsed into a list of strings
|
||||||
(boot arguments) separated by spaces.
|
(boot arguments) separated by spaces.
|
||||||
Most of the boot arguments have the form:
|
Most of the boot arguments have the form:
|
||||||
|
.PP
|
||||||
.in +4n
|
.in +4n
|
||||||
.nf
|
.EX
|
||||||
name[=value_1][,value_2]...[,value_10]
|
name[=value_1][,value_2]...[,value_10]
|
||||||
.fi
|
.EE
|
||||||
.in
|
.in
|
||||||
.LP
|
.LP
|
||||||
where 'name' is a unique keyword that is used to identify what part of
|
where 'name' is a unique keyword that is used to identify what part of
|
||||||
|
@ -58,14 +58,14 @@ separated parameters per keyword.
|
||||||
(However, you can reuse the same
|
(However, you can reuse the same
|
||||||
keyword with up to an additional 10 parameters in unusually
|
keyword with up to an additional 10 parameters in unusually
|
||||||
complicated situations, assuming the setup function supports it.)
|
complicated situations, assuming the setup function supports it.)
|
||||||
|
.PP
|
||||||
Most of the sorting is coded in the kernel source file
|
Most of the sorting is coded in the kernel source file
|
||||||
.IR init/main.c .
|
.IR init/main.c .
|
||||||
First, the kernel
|
First, the kernel
|
||||||
checks to see if the argument is any of the special arguments 'root=',
|
checks to see if the argument is any of the special arguments 'root=',
|
||||||
\&'nfsroot=', 'nfsaddrs=', 'ro', 'rw', 'debug' or 'init'.
|
\&'nfsroot=', 'nfsaddrs=', 'ro', 'rw', 'debug' or 'init'.
|
||||||
The meaning of these special arguments is described below.
|
The meaning of these special arguments is described below.
|
||||||
|
.PP
|
||||||
Then it walks a list of setup functions
|
Then it walks a list of setup functions
|
||||||
to see if the specified argument string (such as 'foo') has
|
to see if the specified argument string (such as 'foo') has
|
||||||
been associated with a setup function ('foo_setup()') for a particular
|
been associated with a setup function ('foo_setup()') for a particular
|
||||||
|
@ -76,13 +76,13 @@ if 'foo' was registered.
|
||||||
If it was, then it would call the setup
|
If it was, then it would call the setup
|
||||||
function associated with 'foo' (foo_setup()) and hand it the arguments
|
function associated with 'foo' (foo_setup()) and hand it the arguments
|
||||||
3, 4, 5, and 6 as given on the kernel command line.
|
3, 4, 5, and 6 as given on the kernel command line.
|
||||||
|
.PP
|
||||||
Anything of the form 'foo=bar' that is not accepted as a setup function
|
Anything of the form 'foo=bar' that is not accepted as a setup function
|
||||||
as described above is then interpreted as an environment variable to
|
as described above is then interpreted as an environment variable to
|
||||||
be set.
|
be set.
|
||||||
A (useless?) example would be to use 'TERM=vt100' as a boot
|
A (useless?) example would be to use 'TERM=vt100' as a boot
|
||||||
argument.
|
argument.
|
||||||
|
.PP
|
||||||
Any remaining arguments that were not picked up by the kernel and were
|
Any remaining arguments that were not picked up by the kernel and were
|
||||||
not interpreted as environment variables are then passed onto PID 1,
|
not interpreted as environment variables are then passed onto PID 1,
|
||||||
which is usually the
|
which is usually the
|
||||||
|
@ -132,7 +132,7 @@ system that the kernel was built on.
|
||||||
To override this value, and
|
To override this value, and
|
||||||
select the second floppy drive as the root device, one would
|
select the second floppy drive as the root device, one would
|
||||||
use 'root=/dev/fd1'.
|
use 'root=/dev/fd1'.
|
||||||
|
.IP
|
||||||
The root device can be specified symbolically or numerically.
|
The root device can be specified symbolically or numerically.
|
||||||
A symbolic specification has the form
|
A symbolic specification has the form
|
||||||
.IR /dev/XXYN ,
|
.IR /dev/XXYN ,
|
||||||
|
@ -141,11 +141,11 @@ the device type (e.g., 'hd' for ST-506 compatible hard disk, with Y in
|
||||||
\&'a'-'d'; 'sd' for SCSI compatible disk, with Y in 'a'-'e'),
|
\&'a'-'d'; 'sd' for SCSI compatible disk, with Y in 'a'-'e'),
|
||||||
Y the driver letter or
|
Y the driver letter or
|
||||||
number, and N the number (in decimal) of the partition on this device.
|
number, and N the number (in decimal) of the partition on this device.
|
||||||
|
.IP
|
||||||
Note that this has nothing to do with the designation of these
|
Note that this has nothing to do with the designation of these
|
||||||
devices on your filesystem.
|
devices on your filesystem.
|
||||||
The '/dev/' part is purely conventional.
|
The '/dev/' part is purely conventional.
|
||||||
|
.IP
|
||||||
The more awkward and less portable numeric specification of the above
|
The more awkward and less portable numeric specification of the above
|
||||||
possible root devices in major/minor format is also accepted.
|
possible root devices in major/minor format is also accepted.
|
||||||
(For example,
|
(For example,
|
||||||
|
@ -179,7 +179,7 @@ write to files on the filesystem in question until it is 'remounted'
|
||||||
as read/write capable, for example, by 'mount \-w \-n \-o remount /'.
|
as read/write capable, for example, by 'mount \-w \-n \-o remount /'.
|
||||||
(See also
|
(See also
|
||||||
.BR mount (8).)
|
.BR mount (8).)
|
||||||
|
.IP
|
||||||
The 'rw' option tells the kernel to mount the root filesystem read/write.
|
The 'rw' option tells the kernel to mount the root filesystem read/write.
|
||||||
This is the default.
|
This is the default.
|
||||||
.TP
|
.TP
|
||||||
|
@ -187,41 +187,41 @@ This is the default.
|
||||||
This tells the kernel the location of the suspend-to-disk data that you want the machine to resume from after hibernation.
|
This tells the kernel the location of the suspend-to-disk data that you want the machine to resume from after hibernation.
|
||||||
Usually, it is the same as your swap partition or file.
|
Usually, it is the same as your swap partition or file.
|
||||||
Example:
|
Example:
|
||||||
|
.IP
|
||||||
.in +4n
|
.in +4n
|
||||||
.nf
|
.EX
|
||||||
resume=/dev/hda2
|
resume=/dev/hda2
|
||||||
.fi
|
.EE
|
||||||
.in
|
.in
|
||||||
.TP
|
.TP
|
||||||
.B "'reserve=...'"
|
.B "'reserve=...'"
|
||||||
This is used to protect I/O port regions from probes.
|
This is used to protect I/O port regions from probes.
|
||||||
The form of the command is:
|
The form of the command is:
|
||||||
|
.IP
|
||||||
.in +4n
|
.in +4n
|
||||||
.nf
|
.EX
|
||||||
.BI reserve= iobase,extent[,iobase,extent]...
|
.BI reserve= iobase,extent[,iobase,extent]...
|
||||||
.fi
|
.EE
|
||||||
.in
|
.in
|
||||||
.sp
|
.IP
|
||||||
In some machines it may be necessary to prevent device drivers from
|
In some machines it may be necessary to prevent device drivers from
|
||||||
checking for devices (auto-probing) in a specific region.
|
checking for devices (auto-probing) in a specific region.
|
||||||
This may be
|
This may be
|
||||||
because of hardware that reacts badly to the probing, or hardware
|
because of hardware that reacts badly to the probing, or hardware
|
||||||
that would be mistakenly identified, or merely
|
that would be mistakenly identified, or merely
|
||||||
hardware you don't want the kernel to initialize.
|
hardware you don't want the kernel to initialize.
|
||||||
|
.IP
|
||||||
The reserve boot-time argument specifies an I/O port region that
|
The reserve boot-time argument specifies an I/O port region that
|
||||||
shouldn't be probed.
|
shouldn't be probed.
|
||||||
A device driver will not probe a reserved region,
|
A device driver will not probe a reserved region,
|
||||||
unless another boot argument explicitly specifies that it do so.
|
unless another boot argument explicitly specifies that it do so.
|
||||||
|
.IP
|
||||||
For example, the boot line
|
For example, the boot line
|
||||||
|
.IP
|
||||||
.in +4n
|
.in +4n
|
||||||
.nf
|
.EX
|
||||||
reserve=0x300,32 blah=0x300
|
reserve=0x300,32 blah=0x300
|
||||||
.fi
|
.EE
|
||||||
.in
|
.in
|
||||||
.IP
|
.IP
|
||||||
keeps all device drivers except the driver for 'blah' from probing
|
keeps all device drivers except the driver for 'blah' from probing
|
||||||
|
@ -231,11 +231,11 @@ keeps all device drivers except the driver for 'blah' from probing
|
||||||
By default, the kernel will not reboot after a panic, but this option
|
By default, the kernel will not reboot after a panic, but this option
|
||||||
will cause a kernel reboot after N seconds (if N is greater than zero).
|
will cause a kernel reboot after N seconds (if N is greater than zero).
|
||||||
This panic timeout can also be set by
|
This panic timeout can also be set by
|
||||||
|
.IP
|
||||||
.in +4n
|
.in +4n
|
||||||
.nf
|
.EX
|
||||||
echo N > /proc/sys/kernel/panic
|
echo N > /proc/sys/kernel/panic
|
||||||
.fi
|
.EE
|
||||||
.in
|
.in
|
||||||
.TP
|
.TP
|
||||||
.B "'reboot=[warm|cold][,[bios|hard]]'"
|
.B "'reboot=[warm|cold][,[bios|hard]]'"
|
||||||
|
@ -300,13 +300,13 @@ when that is given, or 2, the default.
|
||||||
The significance of this variable is that it
|
The significance of this variable is that it
|
||||||
gives the granularity of the profiling: each clock tick, if the
|
gives the granularity of the profiling: each clock tick, if the
|
||||||
system was executing kernel code, a counter is incremented:
|
system was executing kernel code, a counter is incremented:
|
||||||
|
.IP
|
||||||
.in +4n
|
.in +4n
|
||||||
.nf
|
.EX
|
||||||
profile[address >> prof_shift]++;
|
profile[address >> prof_shift]++;
|
||||||
.fi
|
.EE
|
||||||
.in
|
.in
|
||||||
.sp
|
.IP
|
||||||
The raw profiling information can be read from
|
The raw profiling information can be read from
|
||||||
.IR /proc/profile .
|
.IR /proc/profile .
|
||||||
Probably you'll want to use a tool such as readprofile.c to digest it.
|
Probably you'll want to use a tool such as readprofile.c to digest it.
|
||||||
|
@ -324,7 +324,7 @@ ramdisk.
|
||||||
One might also have a system in which first
|
One might also have a system in which first
|
||||||
some modules (for filesystem or hardware) must be loaded
|
some modules (for filesystem or hardware) must be loaded
|
||||||
before the main disk can be accessed.
|
before the main disk can be accessed.
|
||||||
|
.IP
|
||||||
In Linux 1.3.48, ramdisk handling was changed drastically.
|
In Linux 1.3.48, ramdisk handling was changed drastically.
|
||||||
Earlier, the memory was allocated statically, and there was
|
Earlier, the memory was allocated statically, and there was
|
||||||
a 'ramdisk=N' parameter to tell its size.
|
a 'ramdisk=N' parameter to tell its size.
|
||||||
|
@ -335,7 +335,7 @@ setup, see the kernel source file
|
||||||
.IR Documentation/blockdev/ramdisk.txt
|
.IR Documentation/blockdev/ramdisk.txt
|
||||||
.RI ( Documentation/ramdisk.txt
|
.RI ( Documentation/ramdisk.txt
|
||||||
in older kernels).
|
in older kernels).
|
||||||
|
.IP
|
||||||
There are four parameters, two boolean and two integral.
|
There are four parameters, two boolean and two integral.
|
||||||
.TP
|
.TP
|
||||||
.B "'load_ramdisk=N'"
|
.B "'load_ramdisk=N'"
|
||||||
|
@ -376,10 +376,10 @@ finally
|
||||||
the usual boot sequence (e.g., invocation of
|
the usual boot sequence (e.g., invocation of
|
||||||
.IR /sbin/init )
|
.IR /sbin/init )
|
||||||
is performed.
|
is performed.
|
||||||
|
.IP
|
||||||
For a detailed description of the initrd feature, see the kernel source file
|
For a detailed description of the initrd feature, see the kernel source file
|
||||||
.IR Documentation/initrd.txt .
|
.IR Documentation/initrd.txt .
|
||||||
|
.IP
|
||||||
The 'noinitrd' option tells the kernel that although it was compiled for
|
The 'noinitrd' option tells the kernel that although it was compiled for
|
||||||
operation with initrd, it should not go through the above steps, but
|
operation with initrd, it should not go through the above steps, but
|
||||||
leave the initrd data under
|
leave the initrd data under
|
||||||
|
@ -389,12 +389,12 @@ the last process that used it has closed
|
||||||
.IR /dev/initrd .)
|
.IR /dev/initrd .)
|
||||||
.SS Boot arguments for SCSI devices
|
.SS Boot arguments for SCSI devices
|
||||||
General notation for this section:
|
General notation for this section:
|
||||||
|
.PP
|
||||||
.I iobase
|
.I iobase
|
||||||
-- the first I/O port that the SCSI host occupies.
|
-- the first I/O port that the SCSI host occupies.
|
||||||
These are specified in hexadecimal notation,
|
These are specified in hexadecimal notation,
|
||||||
and usually lie in the range from 0x200 to 0x3ff.
|
and usually lie in the range from 0x200 to 0x3ff.
|
||||||
|
.PP
|
||||||
.I irq
|
.I irq
|
||||||
-- the hardware interrupt that the card is configured to use.
|
-- the hardware interrupt that the card is configured to use.
|
||||||
Valid values will be dependent on the card in question, but will
|
Valid values will be dependent on the card in question, but will
|
||||||
|
@ -402,7 +402,7 @@ usually be 5, 7, 9, 10, 11, 12, and 15.
|
||||||
The other values are usually
|
The other values are usually
|
||||||
used for common peripherals like IDE hard disks, floppies, serial
|
used for common peripherals like IDE hard disks, floppies, serial
|
||||||
ports, and so on.
|
ports, and so on.
|
||||||
|
.PP
|
||||||
.I scsi-id
|
.I scsi-id
|
||||||
-- the ID that the host adapter uses to identify itself on the
|
-- the ID that the host adapter uses to identify itself on the
|
||||||
SCSI bus.
|
SCSI bus.
|
||||||
|
@ -410,7 +410,7 @@ Only some host adapters allow you to change this value, as
|
||||||
most have it permanently specified internally.
|
most have it permanently specified internally.
|
||||||
The usual default value
|
The usual default value
|
||||||
is 7, but the Seagate and Future Domain TMC-950 boards use 6.
|
is 7, but the Seagate and Future Domain TMC-950 boards use 6.
|
||||||
|
.PP
|
||||||
.I parity
|
.I parity
|
||||||
-- whether the SCSI host adapter expects the attached devices
|
-- whether the SCSI host adapter expects the attached devices
|
||||||
to supply a parity value with all information exchanges.
|
to supply a parity value with all information exchanges.
|
||||||
|
@ -429,13 +429,13 @@ Each CD is addressed as a
|
||||||
But most
|
But most
|
||||||
devices, such as hard disks, tape drives and such are only one device,
|
devices, such as hard disks, tape drives and such are only one device,
|
||||||
and will be assigned to LUN zero.
|
and will be assigned to LUN zero.
|
||||||
|
.IP
|
||||||
Some poorly designed SCSI devices cannot handle being probed for
|
Some poorly designed SCSI devices cannot handle being probed for
|
||||||
LUNs not equal to zero.
|
LUNs not equal to zero.
|
||||||
Therefore, if the compile-time flag
|
Therefore, if the compile-time flag
|
||||||
.B CONFIG_SCSI_MULTI_LUN
|
.B CONFIG_SCSI_MULTI_LUN
|
||||||
is not set, newer kernels will by default probe only LUN zero.
|
is not set, newer kernels will by default probe only LUN zero.
|
||||||
|
.IP
|
||||||
To specify the number of probed LUNs at boot, one enters
|
To specify the number of probed LUNs at boot, one enters
|
||||||
\&'max_scsi_luns=n' as a boot arg, where n is a number between one and
|
\&'max_scsi_luns=n' as a boot arg, where n is a number between one and
|
||||||
eight.
|
eight.
|
||||||
|
@ -445,13 +445,13 @@ avoid upsetting such broken devices.
|
||||||
.B "SCSI tape configuration"
|
.B "SCSI tape configuration"
|
||||||
Some boot time configuration of the SCSI tape driver can be achieved
|
Some boot time configuration of the SCSI tape driver can be achieved
|
||||||
by using the following:
|
by using the following:
|
||||||
|
.IP
|
||||||
.in +4n
|
.in +4n
|
||||||
.nf
|
.EX
|
||||||
.BI st= buf_size[,write_threshold[,max_bufs]]
|
.BI st= buf_size[,write_threshold[,max_bufs]]
|
||||||
.fi
|
.EE
|
||||||
.in
|
.in
|
||||||
.sp
|
.IP
|
||||||
The first two numbers are specified in units of kB.
|
The first two numbers are specified in units of kB.
|
||||||
The default
|
The default
|
||||||
.I buf_size
|
.I buf_size
|
||||||
|
@ -464,11 +464,11 @@ default value of 30kB.
|
||||||
The maximum number of buffers varies
|
The maximum number of buffers varies
|
||||||
with the number of drives detected, and has a default of two.
|
with the number of drives detected, and has a default of two.
|
||||||
An example usage would be:
|
An example usage would be:
|
||||||
|
.IP
|
||||||
.in +4n
|
.in +4n
|
||||||
.nf
|
.EX
|
||||||
st=32,30,2
|
st=32,30,2
|
||||||
.fi
|
.EE
|
||||||
.in
|
.in
|
||||||
.IP
|
.IP
|
||||||
Full details can be found in the file
|
Full details can be found in the file
|
||||||
|
@ -482,11 +482,11 @@ for older kernels) in the Linux kernel source.
|
||||||
The IDE driver accepts a number of parameters, which range from disk
|
The IDE driver accepts a number of parameters, which range from disk
|
||||||
geometry specifications, to support for broken controller chips.
|
geometry specifications, to support for broken controller chips.
|
||||||
Drive-specific options are specified by using 'hdX=' with X in 'a'-'h'.
|
Drive-specific options are specified by using 'hdX=' with X in 'a'-'h'.
|
||||||
|
.IP
|
||||||
Non-drive-specific options are specified with the prefix 'hd='.
|
Non-drive-specific options are specified with the prefix 'hd='.
|
||||||
Note that using a drive-specific prefix for a non-drive-specific option
|
Note that using a drive-specific prefix for a non-drive-specific option
|
||||||
will still work, and the option will just be applied as expected.
|
will still work, and the option will just be applied as expected.
|
||||||
|
.IP
|
||||||
Also note that 'hd=' can be used to refer to the next unspecified
|
Also note that 'hd=' can be used to refer to the next unspecified
|
||||||
drive in the (a, ..., h) sequence.
|
drive in the (a, ..., h) sequence.
|
||||||
For the following discussions,
|
For the following discussions,
|
||||||
|
@ -522,11 +522,11 @@ used at the same time.
|
||||||
.B "The 'hd=noprobe' option"
|
.B "The 'hd=noprobe' option"
|
||||||
Do not probe for this drive.
|
Do not probe for this drive.
|
||||||
For example,
|
For example,
|
||||||
|
.IP
|
||||||
.in +4n
|
.in +4n
|
||||||
.nf
|
.EX
|
||||||
hdb=noprobe hdb=1166,7,17
|
hdb=noprobe hdb=1166,7,17
|
||||||
.fi
|
.EE
|
||||||
.in
|
.in
|
||||||
.IP
|
.IP
|
||||||
would disable the probe, but still specify the drive geometry so
|
would disable the probe, but still specify the drive geometry so
|
||||||
|
@ -553,11 +553,11 @@ values (C/H/S); any more or any less and it will silently ignore you.
|
||||||
Also, it accepts only 'hd=' as an argument, that is, 'hda='
|
Also, it accepts only 'hd=' as an argument, that is, 'hda='
|
||||||
and so on are not valid here.
|
and so on are not valid here.
|
||||||
The format is as follows:
|
The format is as follows:
|
||||||
|
.IP
|
||||||
.in +4n
|
.in +4n
|
||||||
.nf
|
.EX
|
||||||
hd=cyls,heads,sects
|
hd=cyls,heads,sects
|
||||||
.fi
|
.EE
|
||||||
.in
|
.in
|
||||||
.IP
|
.IP
|
||||||
If there are two disks installed, the above is repeated with the
|
If there are two disks installed, the above is repeated with the
|
||||||
|
@ -566,33 +566,33 @@ geometry parameters of the second disk.
|
||||||
Different drivers make use of different parameters, but they all at
|
Different drivers make use of different parameters, but they all at
|
||||||
least share having an IRQ, an I/O port base value, and a name.
|
least share having an IRQ, an I/O port base value, and a name.
|
||||||
In its most generic form, it looks something like this:
|
In its most generic form, it looks something like this:
|
||||||
|
.PP
|
||||||
.in +4n
|
.in +4n
|
||||||
.nf
|
.EX
|
||||||
ether=irq,iobase[,param_1[,...param_8]],name
|
ether=irq,iobase[,param_1[,...param_8]],name
|
||||||
.fi
|
.EE
|
||||||
.in
|
.in
|
||||||
|
.PP
|
||||||
The first nonnumeric argument is taken as the name.
|
The first nonnumeric argument is taken as the name.
|
||||||
The param_n values (if applicable) usually have different meanings for each
|
The param_n values (if applicable) usually have different meanings for each
|
||||||
different card/driver.
|
different card/driver.
|
||||||
Typical param_n values are used to specify
|
Typical param_n values are used to specify
|
||||||
things like shared memory address, interface selection, DMA channel
|
things like shared memory address, interface selection, DMA channel
|
||||||
and the like.
|
and the like.
|
||||||
|
.PP
|
||||||
The most common use of this parameter is to force probing for a second
|
The most common use of this parameter is to force probing for a second
|
||||||
ethercard, as the default is to probe only for one.
|
ethercard, as the default is to probe only for one.
|
||||||
This can be accomplished with a simple:
|
This can be accomplished with a simple:
|
||||||
|
.PP
|
||||||
.in +4n
|
.in +4n
|
||||||
.nf
|
.EX
|
||||||
ether=0,0,eth1
|
ether=0,0,eth1
|
||||||
.fi
|
.EE
|
||||||
.in
|
.in
|
||||||
|
.PP
|
||||||
Note that the values of zero for the IRQ and I/O base in the above
|
Note that the values of zero for the IRQ and I/O base in the above
|
||||||
example tell the driver(s) to autoprobe.
|
example tell the driver(s) to autoprobe.
|
||||||
|
.PP
|
||||||
The Ethernet-HowTo has extensive documentation on using multiple
|
The Ethernet-HowTo has extensive documentation on using multiple
|
||||||
cards and on the card/driver-specific implementation
|
cards and on the card/driver-specific implementation
|
||||||
of the param_n values where used.
|
of the param_n values where used.
|
||||||
|
@ -617,25 +617,25 @@ It is described in the Linux kernel source file
|
||||||
in older kernel versions).
|
in older kernel versions).
|
||||||
It accepts
|
It accepts
|
||||||
a boot argument of the form:
|
a boot argument of the form:
|
||||||
|
.PP
|
||||||
.in +4n
|
.in +4n
|
||||||
.nf
|
.EX
|
||||||
sound=device1[,device2[,device3...[,device10]]]
|
sound=device1[,device2[,device3...[,device10]]]
|
||||||
.fi
|
.EE
|
||||||
.in
|
.in
|
||||||
.IP
|
.PP
|
||||||
where each deviceN value is of the following format 0xTaaaId and the
|
where each deviceN value is of the following format 0xTaaaId and the
|
||||||
bytes are used as follows:
|
bytes are used as follows:
|
||||||
|
.PP
|
||||||
T \- device type: 1=FM, 2=SB, 3=PAS, 4=GUS, 5=MPU401, 6=SB16,
|
T \- device type: 1=FM, 2=SB, 3=PAS, 4=GUS, 5=MPU401, 6=SB16,
|
||||||
7=SB16-MPU401
|
7=SB16-MPU401
|
||||||
|
.PP
|
||||||
aaa \- I/O address in hex.
|
aaa \- I/O address in hex.
|
||||||
|
.PP
|
||||||
I \- interrupt line in hex (i.e., 10=a, 11=b, ...)
|
I \- interrupt line in hex (i.e., 10=a, 11=b, ...)
|
||||||
|
.PP
|
||||||
d \- DMA channel.
|
d \- DMA channel.
|
||||||
|
.PP
|
||||||
As you can see, it gets pretty messy, and you are better off to compile
|
As you can see, it gets pretty messy, and you are better off to compile
|
||||||
in your own personal values as recommended.
|
in your own personal values as recommended.
|
||||||
Using a boot argument of
|
Using a boot argument of
|
||||||
|
@ -645,14 +645,14 @@ Using a boot argument of
|
||||||
.B "'lp='"
|
.B "'lp='"
|
||||||
.br
|
.br
|
||||||
Syntax:
|
Syntax:
|
||||||
|
.IP
|
||||||
.in +4n
|
.in +4n
|
||||||
.nf
|
.EX
|
||||||
lp=0
|
lp=0
|
||||||
lp=auto
|
lp=auto
|
||||||
lp=reset
|
lp=reset
|
||||||
lp=port[,port...]
|
lp=port[,port...]
|
||||||
.fi
|
.EE
|
||||||
.in
|
.in
|
||||||
.IP
|
.IP
|
||||||
You can tell the printer driver what ports to use and what ports not
|
You can tell the printer driver what ports to use and what ports not
|
||||||
|
@ -660,7 +660,7 @@ to use.
|
||||||
The latter comes in handy if you don't want the printer driver
|
The latter comes in handy if you don't want the printer driver
|
||||||
to claim all available parallel ports, so that other drivers
|
to claim all available parallel ports, so that other drivers
|
||||||
(e.g., PLIP, PPA) can use them instead.
|
(e.g., PLIP, PPA) can use them instead.
|
||||||
|
.IP
|
||||||
The format of the argument is multiple port names.
|
The format of the argument is multiple port names.
|
||||||
For example,
|
For example,
|
||||||
lp=none,parport0 would use the first parallel port for lp1, and
|
lp=none,parport0 would use the first parallel port for lp1, and
|
||||||
|
@ -672,6 +672,6 @@ lp=0.
|
||||||
.SH SEE ALSO
|
.SH SEE ALSO
|
||||||
.BR klogd (8),
|
.BR klogd (8),
|
||||||
.BR mount (8)
|
.BR mount (8)
|
||||||
|
.PP
|
||||||
For up-to-date information, see the kernel source file
|
For up-to-date information, see the kernel source file
|
||||||
.IR Documentation/admin-guide/kernel-parameters.txt .
|
.IR Documentation/admin-guide/kernel-parameters.txt .
|
||||||
|
|
|
@ -37,8 +37,8 @@ some complex-only functions.
|
||||||
Your C-compiler can work with complex numbers if it supports the C99 standard.
|
Your C-compiler can work with complex numbers if it supports the C99 standard.
|
||||||
Link with \fI\-lm\fP.
|
Link with \fI\-lm\fP.
|
||||||
The imaginary unit is represented by I.
|
The imaginary unit is represented by I.
|
||||||
.sp
|
.PP
|
||||||
.nf
|
.EX
|
||||||
/* check that exp(i * pi) == \-1 */
|
/* check that exp(i * pi) == \-1 */
|
||||||
#include <math.h> /* for atan */
|
#include <math.h> /* for atan */
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
@ -51,7 +51,7 @@ main(void)
|
||||||
double complex z = cexp(I * pi);
|
double complex z = cexp(I * pi);
|
||||||
printf("%f + %f * i\\n", creal(z), cimag(z));
|
printf("%f + %f * i\\n", creal(z), cimag(z));
|
||||||
}
|
}
|
||||||
.fi
|
.EE
|
||||||
.SH SEE ALSO
|
.SH SEE ALSO
|
||||||
.BR cabs (3),
|
.BR cabs (3),
|
||||||
.BR cacos (3),
|
.BR cacos (3),
|
||||||
|
|
|
@ -376,13 +376,13 @@ displaying the process's
|
||||||
in the two formats \fBMask Format\fR and \fBList Format\fR (see below)
|
in the two formats \fBMask Format\fR and \fBList Format\fR (see below)
|
||||||
as shown in the following example:
|
as shown in the following example:
|
||||||
.PP
|
.PP
|
||||||
.RS
|
.in +4n
|
||||||
.nf
|
.EX
|
||||||
Cpus_allowed: ffffffff,ffffffff,ffffffff,ffffffff
|
Cpus_allowed: ffffffff,ffffffff,ffffffff,ffffffff
|
||||||
Cpus_allowed_list: 0-127
|
Cpus_allowed_list: 0-127
|
||||||
Mems_allowed: ffffffff,ffffffff
|
Mems_allowed: ffffffff,ffffffff
|
||||||
Mems_allowed_list: 0-63
|
Mems_allowed_list: 0-63
|
||||||
.fi
|
.EE
|
||||||
.RE
|
.RE
|
||||||
.PP
|
.PP
|
||||||
The "allowed" fields were added in Linux 2.6.24;
|
The "allowed" fields were added in Linux 2.6.24;
|
||||||
|
@ -493,12 +493,12 @@ of the to-be-released cpuset in
|
||||||
The usual contents of the command
|
The usual contents of the command
|
||||||
.I /sbin/cpuset_release_agent
|
.I /sbin/cpuset_release_agent
|
||||||
is simply the shell script:
|
is simply the shell script:
|
||||||
|
.PP
|
||||||
.in +4n
|
.in +4n
|
||||||
.nf
|
.EX
|
||||||
|
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
rmdir /dev/cpuset/$1
|
rmdir /dev/cpuset/$1
|
||||||
.fi
|
.EE
|
||||||
.in
|
.in
|
||||||
.PP
|
.PP
|
||||||
As with other flag values below, this flag can
|
As with other flag values below, this flag can
|
||||||
|
@ -819,7 +819,7 @@ As of this writing, when this capability was introduced in Linux
|
||||||
2.6.26, on certain popular architectures, the positive values of
|
2.6.26, on certain popular architectures, the positive values of
|
||||||
.I sched_relax_domain_level
|
.I sched_relax_domain_level
|
||||||
have the following meanings.
|
have the following meanings.
|
||||||
.sp
|
.PP
|
||||||
.PD 0
|
.PD 0
|
||||||
.IP \fB(1)\fR 4
|
.IP \fB(1)\fR 4
|
||||||
Perform immediate load balancing across Hyper-Thread
|
Perform immediate load balancing across Hyper-Thread
|
||||||
|
@ -883,23 +883,23 @@ display all bits of the bit mask, based on the size of the bit mask.
|
||||||
.PP
|
.PP
|
||||||
Examples of the \fBMask Format\fR:
|
Examples of the \fBMask Format\fR:
|
||||||
.PP
|
.PP
|
||||||
.RS
|
.in +4n
|
||||||
.nf
|
.EX
|
||||||
00000001 # just bit 0 set
|
00000001 # just bit 0 set
|
||||||
40000000,00000000,00000000 # just bit 94 set
|
40000000,00000000,00000000 # just bit 94 set
|
||||||
00000001,00000000,00000000 # just bit 64 set
|
00000001,00000000,00000000 # just bit 64 set
|
||||||
000000ff,00000000 # bits 32-39 set
|
000000ff,00000000 # bits 32-39 set
|
||||||
00000000,000e3862 # 1,5,6,11-13,17-19 set
|
00000000,000e3862 # 1,5,6,11-13,17-19 set
|
||||||
.fi
|
.EE
|
||||||
.RE
|
.in
|
||||||
.PP
|
.PP
|
||||||
A mask with bits 0, 1, 2, 4, 8, 16, 32, and 64 set displays as:
|
A mask with bits 0, 1, 2, 4, 8, 16, 32, and 64 set displays as:
|
||||||
.PP
|
.PP
|
||||||
.RS
|
.in +4n
|
||||||
.nf
|
.EX
|
||||||
00000001,00000001,00010117
|
00000001,00000001,00010117
|
||||||
.fi
|
.EE
|
||||||
.RE
|
.in
|
||||||
.PP
|
.PP
|
||||||
The first "1" is for bit 64, the
|
The first "1" is for bit 64, the
|
||||||
second for bit 32, the third for bit 16, the fourth for bit 8, the
|
second for bit 32, the third for bit 16, the fourth for bit 8, the
|
||||||
|
@ -915,12 +915,12 @@ numbers and ranges of numbers, in ASCII decimal.
|
||||||
.PP
|
.PP
|
||||||
Examples of the \fBList Format\fR:
|
Examples of the \fBList Format\fR:
|
||||||
.PP
|
.PP
|
||||||
.RS
|
.in +4n
|
||||||
.nf
|
.EX
|
||||||
0-4,9 # bits 0, 1, 2, 3, 4, and 9 set
|
0-4,9 # bits 0, 1, 2, 3, 4, and 9 set
|
||||||
0-2,7,12-14 # bits 0, 1, 2, 7, 12, 13, and 14 set
|
0-2,7,12-14 # bits 0, 1, 2, 7, 12, 13, and 14 set
|
||||||
.fi
|
.EE
|
||||||
.RE
|
.in
|
||||||
.\" ================== RULES ==================
|
.\" ================== RULES ==================
|
||||||
.SH RULES
|
.SH RULES
|
||||||
The following rules apply to each cpuset:
|
The following rules apply to each cpuset:
|
||||||
|
@ -1033,13 +1033,13 @@ command in some shells does not display an error message if the
|
||||||
system call fails.
|
system call fails.
|
||||||
.\" Gack! csh(1)'s echo does this
|
.\" Gack! csh(1)'s echo does this
|
||||||
For example, if the command:
|
For example, if the command:
|
||||||
|
.PP
|
||||||
.in +4n
|
.in +4n
|
||||||
.nf
|
.EX
|
||||||
|
|
||||||
echo 19 > cpuset.mems
|
echo 19 > cpuset.mems
|
||||||
|
.EE
|
||||||
.fi
|
|
||||||
.in
|
.in
|
||||||
|
.PP
|
||||||
failed because memory node 19 was not allowed (perhaps
|
failed because memory node 19 was not allowed (perhaps
|
||||||
the current system does not have a memory node 19), then the
|
the current system does not have a memory node 19), then the
|
||||||
.B echo
|
.B echo
|
||||||
|
@ -1050,12 +1050,12 @@ external command to change cpuset file settings, as this
|
||||||
command will display
|
command will display
|
||||||
.BR write (2)
|
.BR write (2)
|
||||||
errors, as in the example:
|
errors, as in the example:
|
||||||
|
.PP
|
||||||
.in +4n
|
.in +4n
|
||||||
.nf
|
.EX
|
||||||
|
|
||||||
/bin/echo 19 > cpuset.mems
|
/bin/echo 19 > cpuset.mems
|
||||||
/bin/echo: write error: Invalid argument
|
/bin/echo: write error: Invalid argument
|
||||||
.fi
|
.EE
|
||||||
.in
|
.in
|
||||||
.\" ================== EXCEPTIONS ==================
|
.\" ================== EXCEPTIONS ==================
|
||||||
.SH EXCEPTIONS
|
.SH EXCEPTIONS
|
||||||
|
@ -1368,7 +1368,7 @@ options using shell commands.
|
||||||
.SS Creating and attaching to a cpuset.
|
.SS Creating and attaching to a cpuset.
|
||||||
To create a new cpuset and attach the current command shell to it,
|
To create a new cpuset and attach the current command shell to it,
|
||||||
the steps are:
|
the steps are:
|
||||||
.sp
|
.PP
|
||||||
.PD 0
|
.PD 0
|
||||||
.IP 1) 4
|
.IP 1) 4
|
||||||
mkdir /dev/cpuset (if not already done)
|
mkdir /dev/cpuset (if not already done)
|
||||||
|
@ -1386,9 +1386,9 @@ Attach the shell to the new cpuset.
|
||||||
For example, the following sequence of commands will set up a cpuset
|
For example, the following sequence of commands will set up a cpuset
|
||||||
named "Charlie", containing just CPUs 2 and 3, and memory node 1,
|
named "Charlie", containing just CPUs 2 and 3, and memory node 1,
|
||||||
and then attach the current shell to that cpuset.
|
and then attach the current shell to that cpuset.
|
||||||
|
.PP
|
||||||
.in +4n
|
.in +4n
|
||||||
.nf
|
.EX
|
||||||
|
|
||||||
.RB "$" " mkdir /dev/cpuset"
|
.RB "$" " mkdir /dev/cpuset"
|
||||||
.RB "$" " mount \-t cpuset cpuset /dev/cpuset"
|
.RB "$" " mount \-t cpuset cpuset /dev/cpuset"
|
||||||
.RB "$" " cd /dev/cpuset"
|
.RB "$" " cd /dev/cpuset"
|
||||||
|
@ -1400,14 +1400,15 @@ and then attach the current shell to that cpuset.
|
||||||
# The current shell is now running in cpuset Charlie
|
# The current shell is now running in cpuset Charlie
|
||||||
# The next line should display '/Charlie'
|
# The next line should display '/Charlie'
|
||||||
.RB "$" " cat /proc/self/cpuset"
|
.RB "$" " cat /proc/self/cpuset"
|
||||||
.fi
|
.EE
|
||||||
.in
|
.in
|
||||||
|
.\"
|
||||||
.SS Migrating a job to different memory nodes.
|
.SS Migrating a job to different memory nodes.
|
||||||
To migrate a job (the set of processes attached to a cpuset)
|
To migrate a job (the set of processes attached to a cpuset)
|
||||||
to different CPUs and memory nodes in the system, including moving
|
to different CPUs and memory nodes in the system, including moving
|
||||||
the memory pages currently allocated to that job,
|
the memory pages currently allocated to that job,
|
||||||
perform the following steps.
|
perform the following steps.
|
||||||
.sp
|
.PP
|
||||||
.PD 0
|
.PD 0
|
||||||
.IP 1) 4
|
.IP 1) 4
|
||||||
Let's say we want to move the job in cpuset
|
Let's say we want to move the job in cpuset
|
||||||
|
@ -1434,9 +1435,9 @@ to
|
||||||
.PD
|
.PD
|
||||||
.PP
|
.PP
|
||||||
The following sequence of commands accomplishes this.
|
The following sequence of commands accomplishes this.
|
||||||
|
.PP
|
||||||
.in +4n
|
.in +4n
|
||||||
.nf
|
.EX
|
||||||
|
|
||||||
.RB "$" " cd /dev/cpuset"
|
.RB "$" " cd /dev/cpuset"
|
||||||
.RB "$" " mkdir beta"
|
.RB "$" " mkdir beta"
|
||||||
.RB "$" " cd beta"
|
.RB "$" " cd beta"
|
||||||
|
@ -1444,7 +1445,7 @@ The following sequence of commands accomplishes this.
|
||||||
.RB "$" " /bin/echo 8-9 > cpuset.mems"
|
.RB "$" " /bin/echo 8-9 > cpuset.mems"
|
||||||
.RB "$" " /bin/echo 1 > cpuset.memory_migrate"
|
.RB "$" " /bin/echo 1 > cpuset.memory_migrate"
|
||||||
.RB "$" " while read i; do /bin/echo $i; done < ../alpha/tasks > tasks"
|
.RB "$" " while read i; do /bin/echo $i; done < ../alpha/tasks > tasks"
|
||||||
.fi
|
.EE
|
||||||
.in
|
.in
|
||||||
.PP
|
.PP
|
||||||
The above should move any processes in
|
The above should move any processes in
|
||||||
|
@ -1455,11 +1456,11 @@ and any memory held by these processes on memory nodes 2-3 to memory
|
||||||
nodes 8-9, respectively.
|
nodes 8-9, respectively.
|
||||||
.PP
|
.PP
|
||||||
Notice that the last step of the above sequence did not do:
|
Notice that the last step of the above sequence did not do:
|
||||||
|
.PP
|
||||||
.in +4n
|
.in +4n
|
||||||
.nf
|
.EX
|
||||||
|
|
||||||
.RB "$" " cp ../alpha/tasks tasks"
|
.RB "$" " cp ../alpha/tasks tasks"
|
||||||
.fi
|
.EE
|
||||||
.in
|
.in
|
||||||
.PP
|
.PP
|
||||||
The
|
The
|
||||||
|
@ -1478,11 +1479,11 @@ syntax that works on any shell, but alas more obscurely, by using the
|
||||||
.B \-u
|
.B \-u
|
||||||
(unbuffered) option of
|
(unbuffered) option of
|
||||||
.BR sed (1):
|
.BR sed (1):
|
||||||
|
.PP
|
||||||
.in +4n
|
.in +4n
|
||||||
|
.EX
|
||||||
.nf
|
|
||||||
.RB "$" " sed \-un p < ../alpha/tasks > tasks"
|
.RB "$" " sed \-un p < ../alpha/tasks > tasks"
|
||||||
.fi
|
.EE
|
||||||
.in
|
.in
|
||||||
.\" ================== SEE ALSO ==================
|
.\" ================== SEE ALSO ==================
|
||||||
.SH SEE ALSO
|
.SH SEE ALSO
|
||||||
|
|
|
@ -257,7 +257,7 @@ or
|
||||||
from where it stopped before.
|
from where it stopped before.
|
||||||
.PP
|
.PP
|
||||||
.in +4n
|
.in +4n
|
||||||
.nf
|
.EX
|
||||||
#define MAX_EVENTS 10
|
#define MAX_EVENTS 10
|
||||||
struct epoll_event ev, events[MAX_EVENTS];
|
struct epoll_event ev, events[MAX_EVENTS];
|
||||||
int listen_sock, conn_sock, nfds, epollfd;
|
int listen_sock, conn_sock, nfds, epollfd;
|
||||||
|
@ -306,7 +306,7 @@ for (;;) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.fi
|
.EE
|
||||||
.in
|
.in
|
||||||
.PP
|
.PP
|
||||||
When used as an edge-triggered interface, for performance reasons, it is
|
When used as an edge-triggered interface, for performance reasons, it is
|
||||||
|
@ -493,13 +493,13 @@ You must consider it ready until the next (nonblocking)
|
||||||
read/write yields
|
read/write yields
|
||||||
.BR EAGAIN .
|
.BR EAGAIN .
|
||||||
When and how you will use the file descriptor is entirely up to you.
|
When and how you will use the file descriptor is entirely up to you.
|
||||||
.sp
|
.IP
|
||||||
For packet/token-oriented files (e.g., datagram socket,
|
For packet/token-oriented files (e.g., datagram socket,
|
||||||
terminal in canonical mode),
|
terminal in canonical mode),
|
||||||
the only way to detect the end of the read/write I/O space
|
the only way to detect the end of the read/write I/O space
|
||||||
is to continue to read/write until
|
is to continue to read/write until
|
||||||
.BR EAGAIN .
|
.BR EAGAIN .
|
||||||
.sp
|
.IP
|
||||||
For stream-oriented files (e.g., pipe, FIFO, stream socket), the
|
For stream-oriented files (e.g., pipe, FIFO, stream socket), the
|
||||||
condition that the read/write I/O space is exhausted can also be detected by
|
condition that the read/write I/O space is exhausted can also be detected by
|
||||||
checking the amount of data read from / written to the target file
|
checking the amount of data read from / written to the target file
|
||||||
|
|
Loading…
Reference in New Issue