pintos/src/examples/pwd.c File Reference

#include <syscall.h>
#include <stdbool.h>
#include <stdio.h>
#include <string.h>

Go to the source code of this file.

Defines

#define MAX_LEVEL   20

Functions

static bool getcwd (char *cwd, size_t cwd_size)
int main (void)
static bool get_inumber (const char *file_name, int *inum)
static bool prepend (const char *prefix, char *dst, size_t *dst_len, size_t dst_size)


Define Documentation

#define MAX_LEVEL   20

Referenced by getcwd().


Function Documentation

static bool get_inumber ( const char *  file_name,
int *  inum 
) [static]

Definition at line 33 of file pwd.c.

References close(), inumber(), and open().

Referenced by getcwd().

static bool getcwd ( char *  cwd,
size_t  cwd_size 
) [static]

Definition at line 73 of file pwd.c.

References close(), get_inumber(), inumber(), MAX_LEVEL, memmove(), name, open(), prepend(), readdir(), READDIR_MAX_LEN, and strlcpy().

Referenced by main().

int main ( void   ) 

Definition at line 14 of file pwd.c.

References EXIT_FAILURE, EXIT_SUCCESS, getcwd(), and printf().

static bool prepend ( const char *  prefix,
char *  dst,
size_t dst_len,
size_t  dst_size 
) [static]

Definition at line 53 of file pwd.c.

References memcpy(), and strlen().

Referenced by getcwd().


Generated on Mon Jan 10 16:43:58 2011 for Pintos by  doxygen 1.5.6