32 {
33 const char *file_name = argv[1];
34
37
38 printf (
"Printing '%s' to the console...\n", file_name);
41 PANIC (
"%s: open failed", file_name);
43 for (;;) {
46 if (n == 0)
47 break;
48
50 }
53}
#define PANIC(...)
Definition: debug.h:14
void file_close(struct file *file)
Definition: file.c:53
off_t file_read(struct file *file, void *buffer, off_t size)
Definition: file.c:73
off_t file_tell(struct file *file)
Definition: file.c:158
struct file * filesys_open(const char *name)
Definition: filesys.c:81
int32_t off_t
Definition: off_t.h:9
@ PAL_ASSERT
Definition: palloc.h:9
void * palloc_get_page(enum palloc_flags)
Definition: palloc.c:301
void palloc_free_page(void *)
Definition: palloc.c:333
#define NULL
Definition: stddef.h:4
void hex_dump(uintptr_t ofs, const void *, size_t size, bool ascii)
Definition: stdio.c:553
int printf(const char *,...) PRINTF_FORMAT(1
off_t pos
Definition: file.c:9
#define PGSIZE
Definition: vaddr.h:20