]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
prctl.2, PR_SET_ENDIAN.2const: Split PR_SET_ENDIAN from prctl(2)
authorAlejandro Colomar <alx@kernel.org>
Sun, 26 May 2024 17:31:18 +0000 (19:31 +0200)
committerAlejandro Colomar <alx@kernel.org>
Thu, 30 May 2024 23:37:47 +0000 (01:37 +0200)
Signed-off-by: Alejandro Colomar <alx@kernel.org>
man/man2/prctl.2
man/man2const/PR_SET_ENDIAN.2const [new file with mode: 0644]

index 272ebe7305c7e31fe3c0bf273565efc814aa8ab6..ddeb3af5d8b6f0690e3af94cc0175a1766caa73c 100644 (file)
@@ -76,17 +76,8 @@ The first argument can be:
 .B PR_SET_DUMPABLE
 .TQ
 .B PR_GET_DUMPABLE
-.\" prctl PR_SET_ENDIAN
-.TP
-.BR PR_SET_ENDIAN " (since Linux 2.6.18, PowerPC only)"
-Set the endian-ness of the calling process to the value given
-in \fIarg2\fP, which should be one of the following:
-.\" Respectively 0, 1, 2
-.BR PR_ENDIAN_BIG ,
-.BR PR_ENDIAN_LITTLE ,
-or
-.B PR_ENDIAN_PPC_LITTLE
-(PowerPC pseudo little endian).
+.TQ
+.B PR_SET_ENDIAN
 .\" prctl PR_GET_ENDIAN
 .TP
 .BR PR_GET_ENDIAN " (since Linux 2.6.18, PowerPC only)"
@@ -2225,4 +2216,5 @@ glibc 2.0.6
 .BR PR_GET_CHILD_SUBREAPER (2const),
 .BR PR_SET_DUMPABLE (2const),
 .BR PR_GET_DUMPABLE (2const),
+.BR PR_SET_ENDIAN (2const),
 .BR core (5)
diff --git a/man/man2const/PR_SET_ENDIAN.2const b/man/man2const/PR_SET_ENDIAN.2const
new file mode 100644 (file)
index 0000000..209748b
--- /dev/null
@@ -0,0 +1,49 @@
+.\" Copyright 2006, 2008, 2012, 2013, 2015, Michael Kerrisk <mtk.manpages@gmail.com>
+.\"
+.\" SPDX-License-Identifier: Linux-man-pages-copyleft
+.\"
+.TH PR_SET_ENDIAN 2const (date) "Linux man-pages (unreleased)"
+.SH NAME
+PR_SET_ENDIAN
+\-
+set endianness of the calling process
+.SH LIBRARY
+Standard C library
+.RI ( libc ", " \-lc )
+.SH SYNOPSIS
+.nf
+.B #include <sys/prctl.h>
+.P
+.BI "int prctl(int " op ", ..."
+.BI "          \fR/*\fP unsigned long " arg2 ", unsigned long " arg3 ,
+.BI "          unsigned long " arg4 ", unsigned long " arg5 " \fR*/\fP );"
+.fi
+.SH DESCRIPTION
+.TP
+.BR PR_SET_ENDIAN " (since Linux 2.6.18, PowerPC only)"
+Set the endian-ness of the calling process to the value given
+in \fIarg2\fP, which should be one of the following:
+.\" Respectively 0, 1, 2
+.BR PR_ENDIAN_BIG ,
+.BR PR_ENDIAN_LITTLE ,
+or
+.B PR_ENDIAN_PPC_LITTLE
+(PowerPC pseudo little endian).
+.SH RETURN VALUE
+On success,
+0 is returned.
+On error, \-1 is returned, and
+.I errno
+is set to indicate the error.
+.SH ERRORS
+.TP
+.B EINVAL
+.I arg2
+is not a valid value for this
+.IR op .
+.SH STANDARDS
+Linux.
+.SH HISTORY
+.SH SEE ALSO
+.BR prctl (2),
+.BR PR_GET_ENDIAN (2const)