#include "filesys/fsutil.h"#include <debug.h>#include <stdio.h>#include <stdlib.h>#include <string.h>#include <ustar.h>#include "filesys/directory.h"#include "filesys/file.h"#include "filesys/filesys.h"#include "threads/malloc.h"#include "threads/palloc.h"#include "threads/vaddr.h"Go to the source code of this file.
Functions | |
| void | fsutil_ls (char **argv UNUSED) |
| void | fsutil_cat (char **argv) |
| void | fsutil_rm (char **argv) |
| void | fsutil_extract (char **argv UNUSED) |
| void | fsutil_append (char **argv) |
| void fsutil_append | ( | char ** | argv | ) |
Definition at line 168 of file fsutil.c.
References block_get_role(), BLOCK_SCRATCH, BLOCK_SECTOR_SIZE, block_size(), block_write(), buffer, dst, file_close(), file_length(), file_name, file_read(), filesys_open(), free(), malloc(), memset(), NULL, PANIC, printf(), PROTd, block::size, ustar_make_header(), and USTAR_REGULAR.
Referenced by run_actions().
| void fsutil_cat | ( | char ** | argv | ) |
Definition at line 34 of file fsutil.c.
References buffer, file_close(), file_name, file_read(), file_tell(), filesys_open(), hex_dump(), NULL, PAL_ASSERT, palloc_free_page(), palloc_get_page(), PANIC, PGSIZE, file::pos, and printf().
Referenced by run_actions().
| void fsutil_extract | ( | char **argv | UNUSED | ) |
Definition at line 73 of file fsutil.c.
References block_get_role(), block_name(), block_read(), BLOCK_SCRATCH, BLOCK_SECTOR_SIZE, block_write(), dst, file_close(), file_name, file_write(), filesys_create(), filesys_open(), free(), malloc(), memset(), NULL, PANIC, PRDSNu, printf(), PROTd, block::size, block::type, USTAR_DIRECTORY, USTAR_EOF, ustar_parse_header(), and USTAR_REGULAR.
Referenced by run_actions().
| void fsutil_ls | ( | char **argv | UNUSED | ) |
Definition at line 17 of file fsutil.c.
References dir_open_root(), dir_readdir(), name, NAME_MAX, NULL, PANIC, and printf().
Referenced by run_actions().
| void fsutil_rm | ( | char ** | argv | ) |
Definition at line 61 of file fsutil.c.
References file_name, filesys_remove(), PANIC, and printf().
Referenced by run_actions().
1.5.6