Util-Linux package development
 help / color / mirror / Atom feed
From: "Casper Ti. Vector" <caspervector@gmail.com>
To: util-linux@vger.kernel.org
Subject: [PATCH 2/2] linux_reboot.h: remove code that is unused anyway.
Date: Tue, 17 Nov 2015 17:05:46 +0800	[thread overview]
Message-ID: <0549ea39f558cb6970596dc0cf56bc166c6c271e.1447762216.git.CasperVector@gmail.com> (raw)
In-Reply-To: <3122dea1b0bbfab174b9e1cc70aec72676568f52.1447762216.git.CasperVector@gmail.com>

---
 include/linux_reboot.h | 22 ----------------------
 1 file changed, 22 deletions(-)

diff --git a/include/linux_reboot.h b/include/linux_reboot.h
index 7ba4bca..ce7fa68 100644
--- a/include/linux_reboot.h
+++ b/include/linux_reboot.h
@@ -34,10 +34,6 @@
 #include <unistd.h>
 #include "linux_reboot.h"
 
-#define USE_LIBC
-
-#ifdef USE_LIBC
-
 /* libc version */
 #if defined __GLIBC__ && __GLIBC__ < 2
 extern int reboot(int, int, int);
@@ -50,23 +46,5 @@ static inline int my_reboot(int cmd) {
 	return REBOOT(cmd);
 }
 
-#else /* no USE_LIBC */
-
-/* direct syscall version */
-#include <linux/unistd.h>
-
-#ifdef _syscall3
-_syscall3(int,  reboot,  int,  magic, int, magic_too, int, cmd);
-#else
-/* Let us hope we have a 3-argument reboot here */
-extern int reboot(int, int, int);
-#endif
-
-static inline int my_reboot(int cmd) {
-	return reboot(LINUX_REBOOT_MAGIC1, LINUX_REBOOT_MAGIC2, cmd);
-}
-
-#endif
-
 
 #endif /*  _LINUX_REBOOT_H  */
-- 
2.6.3


  reply	other threads:[~2015-11-17 12:13 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-17  8:54 [PATCH 1/2] linux_reboot.h: support 1-argument reboot() from alternative libc Casper Ti. Vector
2015-11-17  9:05 ` Casper Ti. Vector [this message]
2015-11-17 21:04 ` Christoph Hellwig
2015-11-18 12:59 ` Karel Zak
2015-11-19  2:52 ` [PATCH v2 1/2] ctrlaltdel: use reboot() provided by libc, assuming it is 1-adic Casper Ti. Vector
2015-11-19 11:12   ` Karel Zak
2015-11-19 11:38     ` Casper Ti. Vector
2015-11-19  2:56 ` [PATCH v2 2/2] Remove now useless linux_reboot.h Casper Ti. Vector

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0549ea39f558cb6970596dc0cf56bc166c6c271e.1447762216.git.CasperVector@gmail.com \
    --to=caspervector@gmail.com \
    --cc=util-linux@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox