summaryrefslogtreecommitdiff
path: root/core/include/fs.h
diff options
context:
space:
mode:
authorFeng Tang <feng.tang@intel.com>2010-07-14 14:43:01 +0800
committerFeng Tang <feng.tang@intel.com>2010-07-20 11:10:04 +0800
commit29f87cf47dd49d5bb715722329c45260a571214c (patch)
tree980e5c14b5ffa6785e888707b10d8ad2609fa36a /core/include/fs.h
parent180fe1a0801a1fe9efa5c6bb0c6b7ac6b9ee98db (diff)
downloadsyslinux-29f87cf47dd49d5bb715722329c45260a571214c.tar.gz
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
Diffstat (limited to 'core/include/fs.h')
-rw-r--r--core/include/fs.h12
1 files changed, 7 insertions, 5 deletions
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 */