diff options
author | Jay Freeman <saurik@saurik.com> | 2008-02-27 23:51:48 +0000 |
---|---|---|
committer | Jay Freeman <saurik@saurik.com> | 2008-02-27 23:51:48 +0000 |
commit | 038b4ff3a01fcb8289a1f4121e7372b1ed8c584d (patch) | |
tree | fde489951558f9bbe60e3fcf2116b82d9fd18841 | |
parent | 6227231071d60d6af66599f7c31ecafc637515e7 (diff) |
Added dmesg to system-cmds.
git-svn-id: http://svn.telesphoreo.org/trunk@123 514c082c-b64e-11dc-b46d-3d985efe055d
-rw-r--r-- | data/system-cmds/dmesg.diff | 20 | ||||
-rw-r--r-- | data/system-cmds/make.sh | 15 |
2 files changed, 32 insertions, 3 deletions
diff --git a/data/system-cmds/dmesg.diff b/data/system-cmds/dmesg.diff new file mode 100644 index 000000000..6c549c1ed --- /dev/null +++ b/data/system-cmds/dmesg.diff @@ -0,0 +1,20 @@ +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-02-27 23:48:08.000000000 +0000 +@@ -57,7 +57,6 @@ + #include <stdio.h> + #include <stdlib.h> + #include <vis.h> +-#include <libproc.h> + + void + usage() { +@@ -73,7 +72,7 @@ + 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(); + } diff --git a/data/system-cmds/make.sh b/data/system-cmds/make.sh index 2fc92eff5..8c7a28e90 100644 --- a/data/system-cmds/make.sh +++ b/data/system-cmds/make.sh @@ -12,11 +12,20 @@ cd .. arm-apple-darwin-gcc -o passwd passwd.tproj/!(od_passwd).c -I. -DTARGET_OS_EMBEDDED arm-apple-darwin-strip passwd +arm-apple-darwin-gcc -o dmesg dmesg.tproj/*.c -I. +arm-apple-darwin-strip dmesg + cp -va "${PKG_DATA}"/kextmanager* . -# dmesg shutdown +# XXX: shutdown for tproj in getconf getty hostinfo iostat login nvram reboot sync sysctl vipw zprint; do + cflags= + + case ${tproj} in (shutdown) + cflags="${cflags} -lbsm" + ;; esac + echo "${tproj}" - arm-apple-darwin-gcc -o "${tproj}" "${tproj}.tproj"/*.c -I. -D'__FBSDID(x)=' -DTARGET_OS_EMBEDDED -framework CoreFoundation -framework IOKit kextmanagerUser.c + arm-apple-darwin-gcc -o "${tproj}" "${tproj}.tproj"/*.c -I. -D'__FBSDID(x)=' -DTARGET_OS_EMBEDDED -framework CoreFoundation -framework IOKit kextmanagerUser.c ${cflags} arm-apple-darwin-strip "${tproj}" done @@ -25,6 +34,6 @@ chmod u+s passwd login pkg: mkdir -p /bin /sbin /usr/bin /usr/sbin pkg: cp -a sync /bin -pkg: cp -a reboot /sbin +pkg: cp -a reboot dmesg /sbin pkg: cp -a passwd zprint getty getconf hostinfo login /usr/bin pkg: cp -a sysctl nvram vipw iostat /usr/sbin |