Skip to content

Commit

Permalink
Fix Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
dthain committed Dec 15, 2023
1 parent a02e02a commit a66d70e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ USER_PROGRAMS=$(USER_SOURCES:c=exe)
KERNEL_SOURCES=$(wildcard kernel/*.[chS])
WORDS=/usr/share/dict/words

.PHONY: build-kernel build-library build-userspace build-iso
.PHONY: build-kernel build-library build-userspace build-cdrom-image

all: build-iso
all: build-cdrom-image

build-kernel: kernel/basekernel.img

Expand Down
13 changes: 12 additions & 1 deletion user/sysstat.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,24 @@ See the file LICENSE for details.

#include "library/syscalls.h"
#include "library/string.h"
#include "library/stdio.h"

struct system_stats s = {0};

int main(int argc, char *argv[])
{
struct system_stats s = {0};
printf("a");
flush();

printf("b");
flush();

if (syscall_system_stats(&s)) {
return 1;
}
printf("c");
flush();


printf("System uptime: %u:%u:%u\n", s.time / (3600), (s.time % 3600) / 60, s.time % 60);
printf("Disk 0: %d blocks read, %d blocks written\n", s.blocks_read[0], s.blocks_written[0]);
Expand Down

0 comments on commit a66d70e

Please sign in to comment.