pintos/src/filesys/directory.h File Reference

#include <stdbool.h>
#include <stddef.h>
#include "devices/block.h"

Go to the source code of this file.

Defines

#define NAME_MAX   14

Functions

bool dir_create (block_sector_t sector, size_t entry_cnt)
struct dirdir_open (struct inode *)
struct dirdir_open_root (void)
struct dirdir_reopen (struct dir *)
void dir_close (struct dir *)
struct inodedir_get_inode (struct dir *)
bool dir_lookup (const struct dir *, const char *name, struct inode **)
bool dir_add (struct dir *, const char *name, block_sector_t)
bool dir_remove (struct dir *, const char *name)
bool dir_readdir (struct dir *, char name[NAME_MAX+1])


Define Documentation

#define NAME_MAX   14

Definition at line 13 of file directory.h.

Referenced by dir_add(), dir_readdir(), and fsutil_ls().


Function Documentation

bool dir_add ( struct dir ,
const char *  name,
block_sector_t   
)

void dir_close ( struct dir  ) 

Definition at line 71 of file directory.c.

References free(), dir::inode, inode_close(), and NULL.

Referenced by filesys_create(), filesys_open(), and filesys_remove().

bool dir_create ( block_sector_t  sector,
size_t  entry_cnt 
)

Definition at line 28 of file directory.c.

References inode_create().

Referenced by do_format().

struct inode* dir_get_inode ( struct dir  )  [read]

Definition at line 82 of file directory.c.

References dir::inode.

bool dir_lookup ( const struct dir ,
const char *  name,
struct inode **   
)

Definition at line 120 of file directory.c.

References ASSERT, inode_open(), dir_entry::inode_sector, lookup(), and NULL.

Referenced by filesys_open().

struct dir* dir_open ( struct inode  )  [read]

Definition at line 36 of file directory.c.

References calloc(), free(), dir::inode, inode_close(), NULL, and dir::pos.

Referenced by dir_open_root(), and dir_reopen().

struct dir* dir_open_root ( void   )  [read]

Definition at line 56 of file directory.c.

References dir_open(), inode_open(), and ROOT_DIR_SECTOR.

Referenced by filesys_create(), filesys_open(), filesys_remove(), and fsutil_ls().

bool dir_readdir ( struct dir ,
char  name[NAME_MAX+1] 
)

Definition at line 223 of file directory.c.

References dir_entry::in_use, dir::inode, inode_read_at(), dir_entry::name, name, NAME_MAX, dir::pos, and strlcpy().

Referenced by fsutil_ls().

bool dir_remove ( struct dir ,
const char *  name 
)

struct dir* dir_reopen ( struct dir  )  [read]

Definition at line 64 of file directory.c.

References dir_open(), dir::inode, and inode_reopen().


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