diff options
author | Russell King <rmk+kernel@armlinux.org.uk> | 2019-06-04 14:49:57 +0100 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2019-06-26 20:14:14 -0400 |
commit | 5ed70bb47767d1f57a5e85e585a327917ded0373 (patch) | |
tree | 26f11c56c91e796486d08ef92dd4e53c29882612 /fs/adfs/dir.c | |
parent | ceb3b10613eba86ddf043345338e32673a27f87a (diff) |
fs/adfs: clean up indirect disc addresses and fragment IDs
We use a variety of different names for the indirect disc address of
the current object, use a variety of different types, and print it in
a variety of different ways. Bring some consistency to this by naming
it "indaddr", use u32 or __u32 as the type since it fits in 32-bits,
and always print it with %06x (with no leading hex prefix.)
When printing it was a directory identifer, use "dir %06x" otherwise
use "object %06x".
Do the same for fragment IDs and the parent indirect disc addresses.
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/adfs/dir.c')
-rw-r--r-- | fs/adfs/dir.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/fs/adfs/dir.c b/fs/adfs/dir.c index fe39310c1a0a..01ffd47c7461 100644 --- a/fs/adfs/dir.c +++ b/fs/adfs/dir.c @@ -95,7 +95,7 @@ adfs_readdir(struct file *file, struct dir_context *ctx) goto unlock_out; while (ops->getnext(&dir, &obj) == 0) { if (!dir_emit(ctx, obj.name, obj.name_len, - obj.file_id, DT_UNKNOWN)) + obj.indaddr, DT_UNKNOWN)) break; ctx->pos++; } @@ -116,8 +116,8 @@ adfs_dir_update(struct super_block *sb, struct object_info *obj, int wait) const struct adfs_dir_ops *ops = ADFS_SB(sb)->s_dir; struct adfs_dir dir; - printk(KERN_INFO "adfs_dir_update: object %06X in dir %06X\n", - obj->file_id, obj->parent_id); + printk(KERN_INFO "adfs_dir_update: object %06x in dir %06x\n", + obj->indaddr, obj->parent_id); if (!ops->update) { ret = -EINVAL; @@ -181,7 +181,8 @@ static int adfs_dir_lookup_byname(struct inode *inode, const struct qstr *qstr, goto out; if (ADFS_I(inode)->parent_id != dir.parent_id) { - adfs_error(sb, "parent directory changed under me! (%lx but got %x)\n", + adfs_error(sb, + "parent directory changed under me! (%06x but got %06x)\n", ADFS_I(inode)->parent_id, dir.parent_id); ret = -EIO; goto free_out; |