From 29f87cf47dd49d5bb715722329c45260a571214c Mon Sep 17 00:00:00 2001 From: Feng Tang Date: Wed, 14 Jul 2010 14:43:01 +0800 Subject: elflink: merge 4.01 fs part changes including: modified: core/cmdline.inc modified: core/comboot.inc modified: core/fs/btrfs/btrfs.c modified: core/fs/chdir.c modified: core/fs/diskio.c modified: core/fs/fat/fat.c modified: core/fs/fs.c modified: core/fs/getfssec.c modified: core/fs/iso9660/iso9660.c modified: core/fs/lib/loadconfig.c modified: core/fs/pxe/dhcp_option.c modified: core/fs/pxe/dnsresolv.c modified: core/fs/pxe/idle.c modified: core/fs/pxe/pxe.c modified: core/fs/pxe/pxe.h modified: core/fs/readdir.c modified: core/include/fs.h modified: core/pxelinux.asm --- core/include/fs.h | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'core/include/fs.h') diff --git a/core/include/fs.h b/core/include/fs.h index f1d35bbb..da247a98 100644 --- a/core/include/fs.h +++ b/core/include/fs.h @@ -94,6 +94,7 @@ struct extent { */ struct inode { struct fs_info *fs; /* The filesystem this inode is associated with */ + struct inode *parent; /* Parent directory, if any */ int refcnt; int mode; /* FILE , DIR or SYMLINK */ uint32_t size; @@ -157,11 +158,8 @@ static inline struct inode *get_inode(struct inode *inode) inode->refcnt++; return inode; } -static inline void put_inode(struct inode *inode) -{ - if (! --inode->refcnt) - free(inode); -} + +void put_inode(struct inode *inode); static inline void malloc_error(char *obj) { @@ -204,6 +202,9 @@ DIR *opendir(const char *pathname); struct dirent *readdir(DIR *dir); int closedir(DIR *dir); +/* getcwd.c */ +char *getcwd(char *buf, size_t size); + /* * Generic functions that filesystem drivers may choose to use */ @@ -212,6 +213,7 @@ int closedir(DIR *dir); void generic_mangle_name(char *, const char *); /* loadconfig.c */ +int search_config(const char *search_directores[], const char *filenames[]); int generic_load_config(void); /* close.c */ -- cgit v1.2.1