65878a
From 5b154beab0557c51f18012e7d01d29d48d1910f3 Mon Sep 17 00:00:00 2001
65878a
From: Lennart Poettering <lennart@poettering.net>
65878a
Date: Thu, 7 Nov 2013 17:51:09 +0100
65878a
Subject: [PATCH] man: add docs for sd_is_special() and some man page symlinks
65878a
65878a
Conflicts:
65878a
	Makefile.am
65878a
---
65878a
 Makefile-man.am            | 15 +++++++++++++++
65878a
 man/sd_is_fifo.xml         | 17 +++++++++++++++++
65878a
 man/sd_seat_get_active.xml |  2 ++
65878a
 3 files changed, 34 insertions(+)
65878a
65878a
diff --git a/Makefile-man.am b/Makefile-man.am
65878a
index c8a4342..b8c8acc 100644
65878a
--- a/Makefile-man.am
65878a
+++ b/Makefile-man.am
65878a
@@ -138,6 +138,7 @@ MANPAGES_ALIAS += \
65878a
 	man/sd_is_socket.3 \
65878a
 	man/sd_is_socket_inet.3 \
65878a
 	man/sd_is_socket_unix.3 \
65878a
+	man/sd_is_special.3 \
65878a
 	man/sd_journal.3 \
65878a
 	man/sd_journal_add_conjunction.3 \
65878a
 	man/sd_journal_add_disjunction.3 \
65878a
@@ -238,6 +239,7 @@ man/sd_is_mq.3: man/sd_is_fifo.3
65878a
 man/sd_is_socket.3: man/sd_is_fifo.3
65878a
 man/sd_is_socket_inet.3: man/sd_is_fifo.3
65878a
 man/sd_is_socket_unix.3: man/sd_is_fifo.3
65878a
+man/sd_is_special.3: man/sd_is_fifo.3
65878a
 man/sd_journal.3: man/sd_journal_open.3
65878a
 man/sd_journal_add_conjunction.3: man/sd_journal_add_match.3
65878a
 man/sd_journal_add_disjunction.3: man/sd_journal_add_match.3
65878a
@@ -410,6 +412,9 @@ man/sd_is_socket_inet.html: man/sd_is_fifo.html
65878a
 man/sd_is_socket_unix.html: man/sd_is_fifo.html
65878a
 	$(html-alias)
65878a
 
65878a
+man/sd_is_special.html: man/sd_is_fifo.html
65878a
+	$(html-alias)
65878a
+
65878a
 man/sd_journal.html: man/sd_journal_open.html
65878a
 	$(html-alias)
65878a
 
65878a
@@ -844,7 +849,9 @@ MANPAGES_ALIAS += \
65878a
 	man/sd_pid_get_slice.3 \
65878a
 	man/sd_pid_get_unit.3 \
65878a
 	man/sd_pid_get_user_unit.3 \
65878a
+	man/sd_seat_can_graphical.3 \
65878a
 	man/sd_seat_can_multi_session.3 \
65878a
+	man/sd_seat_can_tty.3 \
65878a
 	man/sd_seat_get_sessions.3 \
65878a
 	man/sd_session_get_class.3 \
65878a
 	man/sd_session_get_display.3 \
65878a
@@ -873,7 +880,9 @@ man/sd_pid_get_owner_uid.3: man/sd_pid_get_session.3
65878a
 man/sd_pid_get_slice.3: man/sd_pid_get_session.3
65878a
 man/sd_pid_get_unit.3: man/sd_pid_get_session.3
65878a
 man/sd_pid_get_user_unit.3: man/sd_pid_get_session.3
65878a
+man/sd_seat_can_graphical.3: man/sd_seat_get_active.3
65878a
 man/sd_seat_can_multi_session.3: man/sd_seat_get_active.3
65878a
+man/sd_seat_can_tty.3: man/sd_seat_get_active.3
65878a
 man/sd_seat_get_sessions.3: man/sd_seat_get_active.3
65878a
 man/sd_session_get_class.3: man/sd_session_is_active.3
65878a
 man/sd_session_get_display.3: man/sd_session_is_active.3
65878a
@@ -930,9 +939,15 @@ man/sd_pid_get_unit.html: man/sd_pid_get_session.html
65878a
 man/sd_pid_get_user_unit.html: man/sd_pid_get_session.html
65878a
 	$(html-alias)
65878a
 
65878a
+man/sd_seat_can_graphical.html: man/sd_seat_get_active.html
65878a
+	$(html-alias)
65878a
+
65878a
 man/sd_seat_can_multi_session.html: man/sd_seat_get_active.html
65878a
 	$(html-alias)
65878a
 
65878a
+man/sd_seat_can_tty.html: man/sd_seat_get_active.html
65878a
+	$(html-alias)
65878a
+
65878a
 man/sd_seat_get_sessions.html: man/sd_seat_get_active.html
65878a
 	$(html-alias)
65878a
 
65878a
diff --git a/man/sd_is_fifo.xml b/man/sd_is_fifo.xml
65878a
index 2bc860c..4d9cd79 100644
65878a
--- a/man/sd_is_fifo.xml
65878a
+++ b/man/sd_is_fifo.xml
65878a
@@ -48,6 +48,7 @@
65878a
                 <refname>sd_is_socket_inet</refname>
65878a
                 <refname>sd_is_socket_unix</refname>
65878a
                 <refname>sd_is_mq</refname>
65878a
+                <refname>sd_is_special</refname>
65878a
                 <refpurpose>Check the type of a file descriptor</refpurpose>
65878a
         </refnamediv>
65878a
 
65878a
@@ -93,6 +94,12 @@
65878a
                                 <paramdef>const char *<parameter>path</parameter></paramdef>
65878a
                         </funcprototype>
65878a
 
65878a
+                        <funcprototype>
65878a
+                                <funcdef>int <function>sd_is_special</function></funcdef>
65878a
+                                <paramdef>int <parameter>fd</parameter></paramdef>
65878a
+                                <paramdef>const char *<parameter>path</parameter></paramdef>
65878a
+                        </funcprototype>
65878a
+
65878a
                 </funcsynopsis>
65878a
         </refsynopsisdiv>
65878a
 
65878a
@@ -153,6 +160,16 @@
65878a
                 <parameter>path</parameter> parameter is not
65878a
                 <constant>NULL</constant>, it is checked whether the
65878a
                 message queue is bound to the specified name.</para>
65878a
+
65878a
+                <para><function>sd_is_special()</function> may be
65878a
+                called to check whether the specified file descriptor
65878a
+                refers to a special file. If the
65878a
+                <parameter>path</parameter> parameter is not
65878a
+                <constant>NULL</constant>, it is checked whether file
65878a
+                descriptor is bound to the specified file
65878a
+                name. Special files in this context are character
65878a
+                device nodes and files in <filename>/proc</filename>
65878a
+                or <filename>/sys</filename>.</para>
65878a
         </refsect1>
65878a
 
65878a
         <refsect1>
65878a
diff --git a/man/sd_seat_get_active.xml b/man/sd_seat_get_active.xml
65878a
index 1610d3e..cd87696 100644
65878a
--- a/man/sd_seat_get_active.xml
65878a
+++ b/man/sd_seat_get_active.xml
65878a
@@ -46,6 +46,8 @@
65878a
                 <refname>sd_seat_get_active</refname>
65878a
                 <refname>sd_seat_get_sessions</refname>
65878a
                 <refname>sd_seat_can_multi_session</refname>
65878a
+                <refname>sd_seat_can_tty</refname>
65878a
+                <refname>sd_seat_can_graphical</refname>
65878a
                 <refpurpose>Determine state of a specific seat</refpurpose>
65878a
         </refnamediv>
65878a