diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2007-07-05 18:01:52 +0200 |
---|---|---|
committer | Sascha Hauer <sha@octopus.labnet.pengutronix.de> | 2007-07-05 18:01:52 +0200 |
commit | e694adc6a4716fc589693eb8eb8e67bbf54e8edc (patch) | |
tree | f8af4d37d05c8f628ecc3abbe8c8d48a43794482 /fs/cramfs | |
parent | 2692aaeb76f66cc8fe2f1196697d9a75b06c4522 (diff) | |
download | barebox-e694adc6a4716fc589693eb8eb8e67bbf54e8edc.tar.gz barebox-e694adc6a4716fc589693eb8eb8e67bbf54e8edc.tar.xz |
svn_rev_420
- do more POSIX:
- use DIR instead of struct dirent
- use (struct dirent)->d_name instead of (struct dirent)->name
- switch to a new layout for U_BOOT_CMD:
- use C99 initializers to be able to add more fields to the
command struct
- add aliases for commands (needed mainly for help -> ? and test -> [
- This is not done for all commands yet, but the compiler will tell you ;)
Diffstat (limited to 'fs/cramfs')
-rw-r--r-- | fs/cramfs/cramfs.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/fs/cramfs/cramfs.c b/fs/cramfs/cramfs.c index b66c700bda..b37dd9842b 100644 --- a/fs/cramfs/cramfs.c +++ b/fs/cramfs/cramfs.c @@ -183,7 +183,7 @@ static int cramfs_fill_dirent (struct device_d *dev, unsigned long offset, struc if (!inode) return -EINVAL; - memset(d->name, 0, 256); + memset(d->d_name, 0, 256); /* * Namelengths on disk are shifted by two @@ -192,7 +192,7 @@ static int cramfs_fill_dirent (struct device_d *dev, unsigned long offset, struc */ namelen = CRAMFS_GET_NAMELEN (inode) << 2; - dev_read(dev, d->name, namelen, offset + sizeof(struct cramfs_inode), 0); + dev_read(dev, d->d_name, namelen, offset + sizeof(struct cramfs_inode), 0); free(inode); return namelen; } @@ -200,10 +200,10 @@ static int cramfs_fill_dirent (struct device_d *dev, unsigned long offset, struc struct cramfs_dir { unsigned long offset, size; unsigned long inodeoffset; - struct dir dir; + DIR dir; }; -struct dir* cramfs_opendir(struct device_d *_dev, const char *filename) +DIR* cramfs_opendir(struct device_d *_dev, const char *filename) { char *f; struct cramfs_priv *priv = _dev->priv; @@ -249,7 +249,7 @@ err_free: return NULL; } -static struct dirent* cramfs_readdir(struct device_d *_dev, struct dir *_dir) +static struct dirent* cramfs_readdir(struct device_d *_dev, DIR *_dir) { struct fs_device_d *fsdev = _dev->type_data; struct device_d *dev = fsdev->parent; @@ -266,7 +266,7 @@ static struct dirent* cramfs_readdir(struct device_d *_dev, struct dir *_dir) return NULL; } -static int cramfs_closedir(struct device_d *dev, struct dir *_dir) +static int cramfs_closedir(struct device_d *dev, DIR *_dir) { struct cramfs_dir *dir = _dir->priv; free(dir); |