summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
Diffstat (limited to 'util')
-rw-r--r--util/ccdrv/devtime.c14
-rw-r--r--util/m5/m5.c2
-rw-r--r--util/statetrace/arch/amd64/tracechild.cc9
-rw-r--r--util/statetrace/arch/amd64/tracechild.hh5
-rw-r--r--util/statetrace/arch/arm/tracechild.cc7
-rw-r--r--util/statetrace/arch/arm/tracechild.hh7
-rw-r--r--util/statetrace/arch/i686/tracechild.cc5
-rw-r--r--util/statetrace/arch/i686/tracechild.hh5
-rw-r--r--util/statetrace/arch/sparc/tracechild.cc5
-rw-r--r--util/statetrace/arch/sparc/tracechild.hh7
-rw-r--r--util/statetrace/base/regstate.hh3
-rw-r--r--util/statetrace/base/statetrace.cc18
-rw-r--r--util/statetrace/base/tracechild.cc10
-rw-r--r--util/tap/tap.cc16
-rw-r--r--util/term/term.c10
15 files changed, 64 insertions, 59 deletions
diff --git a/util/ccdrv/devtime.c b/util/ccdrv/devtime.c
index d8be97bb4..d46d6f00c 100644
--- a/util/ccdrv/devtime.c
+++ b/util/ccdrv/devtime.c
@@ -28,20 +28,20 @@
* Authors: Ali Saidi
*/
-#include <linux/module.h>
+#include <asm/io.h>
+#include <asm/page.h>
+#include <asm/uaccess.h>
#include <linux/config.h>
-#include <linux/moduleparam.h>
-#include <linux/init.h>
#include <linux/fs.h>
-#include <asm/uaccess.h>
+#include <linux/init.h>
#include <linux/kernel.h>
-#include <asm/io.h>
-#include <asm/page.h>
+#include <linux/module.h>
+#include <linux/moduleparam.h>
#include <linux/netdevice.h>
#ifdef __i386__
-#include <asm/processor.h>
#include <asm/msr.h>
+#include <asm/processor.h>
#endif
#define DRIVER_AUTHOR "Ali Saidi"
diff --git a/util/m5/m5.c b/util/m5/m5.c
index 96150f2bb..fc4f5dcae 100644
--- a/util/m5/m5.c
+++ b/util/m5/m5.c
@@ -33,9 +33,9 @@
#include <sched.h>
#endif
-#include <inttypes.h>
#include <err.h>
#include <fcntl.h>
+#include <inttypes.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
diff --git a/util/statetrace/arch/amd64/tracechild.cc b/util/statetrace/arch/amd64/tracechild.cc
index 5d3b660ab..1aec5ec97 100644
--- a/util/statetrace/arch/amd64/tracechild.cc
+++ b/util/statetrace/arch/amd64/tracechild.cc
@@ -28,12 +28,13 @@
* Authors: Gabe Black
*/
-#include <iostream>
-#include <iomanip>
-#include <errno.h>
#include <sys/ptrace.h>
#include <stdint.h>
-#include <string.h>
+
+#include <cerrno>
+#include <cstring>
+#include <iomanip>
+#include <iostream>
#include "arch/amd64/tracechild.hh"
diff --git a/util/statetrace/arch/amd64/tracechild.hh b/util/statetrace/arch/amd64/tracechild.hh
index 6f28bc0bd..7adbec59e 100644
--- a/util/statetrace/arch/amd64/tracechild.hh
+++ b/util/statetrace/arch/amd64/tracechild.hh
@@ -31,9 +31,10 @@
#ifndef REGSTATE_AMD64_HH
#define REGSTATE_AMD64_HH
-#include <sys/user.h>
-#include <sys/types.h>
#include <sys/ptrace.h>
+#include <sys/types.h>
+#include <sys/user.h>
+
#include <cassert>
#include <string>
diff --git a/util/statetrace/arch/arm/tracechild.cc b/util/statetrace/arch/arm/tracechild.cc
index 97b8d06ec..5dde3d567 100644
--- a/util/statetrace/arch/arm/tracechild.cc
+++ b/util/statetrace/arch/arm/tracechild.cc
@@ -41,11 +41,12 @@
* Gabe Black
*/
-#include <iostream>
-#include <errno.h>
#include <stdint.h>
-#include <cstring>
+
+#include <cerrno>
#include <cstdio>
+#include <cstring>
+#include <iostream>
#include "arch/arm/tracechild.hh"
diff --git a/util/statetrace/arch/arm/tracechild.hh b/util/statetrace/arch/arm/tracechild.hh
index f4e8ca694..9a4dc1921 100644
--- a/util/statetrace/arch/arm/tracechild.hh
+++ b/util/statetrace/arch/arm/tracechild.hh
@@ -44,12 +44,13 @@
#ifndef TRACECHILD_ARM_HH
#define TRACECHILD_ARM_HH
+#include <sys/ptrace.h>
+#include <sys/user.h>
+
#include <cassert>
#include <string>
-#include <sys/user.h>
-#include <sys/ptrace.h>
-#include "base/tracechild.hh"
+#include "base/tracechild.hh"
class ARMTraceChild : public TraceChild
{
diff --git a/util/statetrace/arch/i686/tracechild.cc b/util/statetrace/arch/i686/tracechild.cc
index f9e37442e..44508c1a0 100644
--- a/util/statetrace/arch/i686/tracechild.cc
+++ b/util/statetrace/arch/i686/tracechild.cc
@@ -28,11 +28,12 @@
* Authors: Gabe Black
*/
-#include <iostream>
-#include <errno.h>
#include <sys/ptrace.h>
#include <stdint.h>
+#include <cerrno>
+#include <iostream>
+
#include "arch/i686/tracechild.hh"
using namespace std;
diff --git a/util/statetrace/arch/i686/tracechild.hh b/util/statetrace/arch/i686/tracechild.hh
index 1c1a36593..60bc5ed8d 100644
--- a/util/statetrace/arch/i686/tracechild.hh
+++ b/util/statetrace/arch/i686/tracechild.hh
@@ -31,9 +31,10 @@
#ifndef REGSTATE_I686_HH
#define REGSTATE_I686_HH
-#include <sys/user.h>
-#include <sys/types.h>
#include <sys/ptrace.h>
+#include <sys/types.h>
+#include <sys/user.h>
+
#include <cassert>
#include <string>
diff --git a/util/statetrace/arch/sparc/tracechild.cc b/util/statetrace/arch/sparc/tracechild.cc
index b18739e24..fad4a00d7 100644
--- a/util/statetrace/arch/sparc/tracechild.cc
+++ b/util/statetrace/arch/sparc/tracechild.cc
@@ -28,11 +28,12 @@
* Authors: Gabe Black
*/
-#include <iostream>
-#include <errno.h>
#include <sys/ptrace.h>
#include <stdint.h>
+#include <cerrno>
+#include <iostream>
+
#include "arch/sparc/tracechild.hh"
using namespace std;
diff --git a/util/statetrace/arch/sparc/tracechild.hh b/util/statetrace/arch/sparc/tracechild.hh
index 27670604a..30f7f26bd 100644
--- a/util/statetrace/arch/sparc/tracechild.hh
+++ b/util/statetrace/arch/sparc/tracechild.hh
@@ -32,12 +32,13 @@
#define TRACECHILD_SPARC_HH
#include <asm-sparc64/reg.h>
+#include <sys/ptrace.h>
+#include <sys/types.h>
+#include <stdint.h>
+
#include <cassert>
#include <ostream>
-#include <stdint.h>
#include <string>
-#include <sys/ptrace.h>
-#include <sys/types.h>
#include "base/tracechild.hh"
diff --git a/util/statetrace/base/regstate.hh b/util/statetrace/base/regstate.hh
index bab3485c6..ac350ddba 100644
--- a/util/statetrace/base/regstate.hh
+++ b/util/statetrace/base/regstate.hh
@@ -31,9 +31,10 @@
#ifndef REGSTATE_H
#define REGSTATE_H
-#include <string>
#include <stdint.h>
+#include <string>
+
class RegState
{
protected:
diff --git a/util/statetrace/base/statetrace.cc b/util/statetrace/base/statetrace.cc
index 156983a67..fd6f40925 100644
--- a/util/statetrace/base/statetrace.cc
+++ b/util/statetrace/base/statetrace.cc
@@ -28,22 +28,22 @@
* Authors: Gabe Black
*/
-#include "base/arch_check.h"
-
-#include <cstring>
-#include <errno.h>
-#include <fstream>
-#include <iostream>
-#include <netdb.h>
#include <netinet/in.h>
-#include <stdio.h>
-#include <string>
#include <sys/ptrace.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <sys/wait.h>
+#include <netdb.h>
#include <unistd.h>
+#include <cerrno>
+#include <cstdio>
+#include <cstring>
+#include <fstream>
+#include <iostream>
+#include <string>
+
+#include "base/arch_check.h"
#include "tracechild.hh"
using namespace std;
diff --git a/util/statetrace/base/tracechild.cc b/util/statetrace/base/tracechild.cc
index b5665ff37..d22f2fd43 100644
--- a/util/statetrace/base/tracechild.cc
+++ b/util/statetrace/base/tracechild.cc
@@ -28,13 +28,15 @@
* Authors: Gabe Black
*/
-#include "tracechild.hh"
-#include <cstring>
-#include <errno.h>
-#include <iostream>
#include <sys/ptrace.h>
#include <sys/wait.h>
+#include <cerrno>
+#include <cstring>
+#include <iostream>
+
+#include "tracechild.hh"
+
using namespace std;
bool
diff --git a/util/tap/tap.cc b/util/tap/tap.cc
index b026e0220..2cc7de4b5 100644
--- a/util/tap/tap.cc
+++ b/util/tap/tap.cc
@@ -32,25 +32,21 @@ extern "C" {
#include <pcap.h>
}
-#include <dnet.h>
-
#include <arpa/inet.h>
-
-#include <sys/ioctl.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-
#include <netinet/in.h>
#include <netinet/tcp.h>
-
-#include <errno.h>
+#include <sys/ioctl.h>
+#include <sys/socket.h>
+#include <sys/types.h>
+#include <dnet.h>
#include <fcntl.h>
#include <libgen.h>
#include <netdb.h>
#include <poll.h>
-#include <signal.h>
#include <unistd.h>
+#include <cerrno>
+#include <csignal>
#include <list>
#include <string>
diff --git a/util/term/term.c b/util/term/term.c
index 54924c0e1..ca88ad47e 100644
--- a/util/term/term.c
+++ b/util/term/term.c
@@ -26,17 +26,16 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <sys/types.h>
+#include <arpa/telnet.h>
+#include <netinet/in.h>
#include <sys/socket.h>
#include <sys/termios.h>
#include <sys/time.h>
+#include <sys/types.h>
#include <sys/un.h>
-
-#include <netinet/in.h>
-#include <arpa/telnet.h>
-
#include <err.h>
#include <errno.h>
+#include <fcntl.h>
#include <netdb.h>
#include <poll.h>
#include <stdarg.h>
@@ -44,7 +43,6 @@
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
-#include <fcntl.h>
ssize_t atomicio(ssize_t (*)(), int, void *, size_t);
void readwrite(int);