Add bin/uname, fix disk buidling

Disk will now rebuild when userspace/*.c are updated.
Make sure you build in userspace/ first!
This commit is contained in:
Kevin Lange 2012-01-28 17:10:03 -06:00
parent c9d5e735ed
commit fd77e36013
2 changed files with 16 additions and 1 deletions

View File

@ -132,7 +132,7 @@ initrd/boot/kernel: toaruos-kernel
hdd:
@mkdir hdd
toaruos-disk.img: hdd hdd/bs.bmp
toaruos-disk.img: hdd hdd/bs.bmp userspace/*.c
@${BEG} "hdd" "Generating a Hard Disk image..."
@-rm -f toaruos-disk.img
@${GENEXT} -d hdd -q -b 131072 -N 4096 toaruos-disk.img ${ERRORS}

15
userspace/uname.c Normal file
View File

@ -0,0 +1,15 @@
/* vim: tabstop=4 shiftwidth=4 noexpandtab
*
* uname
*/
#include <stdio.h>
#include <syscall.h>
DEFN_SYSCALL1(kernel_string_XXX, 25, char *);
int main(int argc, char * argv[]) {
char _uname[1024];
syscall_kernel_string_XXX(_uname);
fprintf(stdout, "%s\n", _uname);
}