43 entry_fd =
open (full_name);
68main (
int argc,
char *argv[])
73 if (argc > 1 && !
strcmp (argv[1],
"-l"))
85 for (i = 1; i < argc; i++)
int snprintf(char *buffer, size_t buf_size, const char *format,...)
Like printf(), except that output is stored into BUFFER, which must have space for BUF_SIZE character...
int printf(const char *format,...)
Writes formatted output to the console.
bool readdir(int fd, char name[READDIR_MAX_LEN+1])
int open(const char *file)
int inumber(int fd)
lib/user/syscall.h
#define EXIT_SUCCESS
Typical return values from main() and arguments to exit().
#define EXIT_FAILURE
Unsuccessful execution.
#define READDIR_MAX_LEN
Maximum characters in a filename written by readdir().
static bool list_dir(const char *dir, bool verbose)
ls.c
int main(int argc, char *argv[])
int strcmp(const char *a_, const char *b_)
Finds the first differing characters in strings A and B.