summaryrefslogtreecommitdiff
path: root/data/system-cmds/dmesg.diff
blob: fb15d0de1eec66aca1d4ed730ff98ac34cdee8e9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
diff -ru system_cmds-431/dmesg.tproj/dmesg.c system_cmds-431+iPhone/dmesg.tproj/dmesg.c
--- system_cmds-431/dmesg.tproj/dmesg.c	2006-05-05 04:12:18.000000000 +0000
+++ system_cmds-431+iPhone/dmesg.tproj/dmesg.c	2008-03-24 00:58:43.000000000 +0000
@@ -57,7 +57,6 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <vis.h>
-#include <libproc.h>
 
 void
 usage() {
@@ -67,13 +66,13 @@
 
 int
 main(int argc, char **argv) {
-	char msgbuf[16*1024], *visbuf;
+	char msgbuf[64*4*1024], *visbuf;
 	long data_size;
 
 	if (argc > 1)
 		usage();
 	
-	if ((data_size = proc_kmsgbuf(msgbuf, sizeof(msgbuf))) == 0){
+	if ((data_size = syscall(336, 4, 0, 0, (uint64_t) 0, msgbuf, sizeof(msgbuf))) == -1){
 		perror("Unable to obtain kernel buffer");
 		usage();
 	}