PKUOS - Pintos
Pintos source browser for PKU Operating System course
|
Go to the source code of this file.
Functions | |
static void | usage (void) |
tar.c More... | |
static bool | make_tar_archive (const char *archive_name, char *files[], size_t file_cnt) |
int | main (int argc, char *argv[]) |
static bool | archive_file (char file_name[], size_t file_name_size, int archive_fd, bool *write_error) |
static bool | archive_ordinary_file (const char *file_name, int file_fd, int archive_fd, bool *write_error) |
static bool | archive_directory (char file_name[], size_t file_name_size, int file_fd, int archive_fd, bool *write_error) |
static bool | write_header (const char *file_name, enum ustar_type, int size, int archive_fd, bool *write_error) |
static bool | do_write (int fd, const char *buffer, int size, bool *write_error) |
|
static |
Definition at line 160 of file tar.c.
References archive_file(), file_name, printf(), readdir(), READDIR_MAX_LEN, strlen(), USTAR_DIRECTORY, and write_header().
Referenced by archive_file().
|
static |
Definition at line 89 of file tar.c.
References archive_directory(), archive_ordinary_file(), close(), file_name, inumber(), isdir(), open(), and printf().
Referenced by archive_directory(), and make_tar_archive().
|
static |
Definition at line 124 of file tar.c.
References buf, do_write(), file_name, filesize(), memset(), printf(), read(), USTAR_REGULAR, and write_header().
Referenced by archive_file().
Definition at line 195 of file tar.c.
References buffer, printf(), and write().
Referenced by archive_ordinary_file(), make_tar_archive(), and write_header().
int main | ( | int argc | , |
char * | argv[] | ||
) |
Definition at line 15 of file tar.c.
References EXIT_FAILURE, EXIT_SUCCESS, make_tar_archive(), and usage().
|
static |
|
static |
Definition at line 186 of file tar.c.
References do_write(), file_name, and ustar_make_header().
Referenced by archive_directory(), and archive_ordinary_file().