[syslinux:elflink] xfs: Cleanup previous commit
syslinux-bot for Paulo Alcantara
pcacjr at zytor.com
Tue Nov 27 12:57:27 PST 2012
Commit-ID: 1e4d29ab0fde3f81701b3de206179e6ecd545420
Gitweb: http://www.syslinux.org/commit/1e4d29ab0fde3f81701b3de206179e6ecd545420
Author: Paulo Alcantara <pcacjr at zytor.com>
AuthorDate: Sun, 2 Sep 2012 19:49:21 -0300
Committer: Paulo Alcantara <pcacjr at zytor.com>
CommitDate: Sun, 2 Sep 2012 19:54:27 -0300
xfs: Cleanup previous commit
Please Baozi, fix your editor! You keep putting f*cking trailing
whitespaces in almost all patches yours.
This patch cleanups, fixes some typo, fixes indentation and removes some
trailing whitespaces from previous commit.
Signed-off-by: Paulo Alcantara <pcacjr at zytor.com>
---
core/fs/xfs/xfs.c | 36 +++++++++++++++++-------------------
core/fs/xfs/xfs_dir2.c | 4 ++--
2 files changed, 19 insertions(+), 21 deletions(-)
diff --git a/core/fs/xfs/xfs.c b/core/fs/xfs/xfs.c
index bcb350d..7102d7a 100644
--- a/core/fs/xfs/xfs.c
+++ b/core/fs/xfs/xfs.c
@@ -268,38 +268,36 @@ static int xfs_readlink(struct inode *inode, char *buf)
block_t db;
char *dir_buf;
- xfs_debug("in");
-
core = xfs_dinode_get_core(fs, inode->ino);
if (!core) {
- xfs_error("Failed to get dinode from disk (ino 0x%llx)", inode->ino);
- goto out;
+ xfs_error("Failed to get dinode from disk (ino 0x%llx)", inode->ino);
+ goto out;
}
pathlen = be64_to_cpu(core->di_size);
if (!pathlen)
- goto out;
+ goto out;
if (pathlen < 0 || pathlen > MAXPATHLEN) {
- xfs_error("inode (%llu) bad symlink length (%ldd)",
- inode->ino, pathlen);
- goto out;
+ xfs_error("inode (%llu) bad symlink length (%d)",
+ inode->ino, pathlen);
+ goto out;
}
if (core->di_format == XFS_DINODE_FMT_LOCAL) {
- memcpy(buf, (char *)&core->di_literal_area[0], pathlen);
+ memcpy(buf, (char *)&core->di_literal_area[0], pathlen);
} else if (core->di_format == XFS_DINODE_FMT_EXTENTS) {
- bmbt_irec_get(&rec, (xfs_bmbt_rec_t *)&core->di_literal_area[0]);
- db = fsblock_to_bytes(fs, rec.br_startblock) >> BLOCK_SHIFT(fs);
- dir_buf = xfs_dir2_get_dirblks(fs, db, rec.br_blockcount);
-
- /*
- * Syslinux only supports filesystem block size larger than 4K.
- * Thus, one directory block is far enough to hold the maxium symbolic
- * link file content, which is only 1024 bytes.
+ bmbt_irec_get(&rec, (xfs_bmbt_rec_t *)&core->di_literal_area[0]);
+ db = fsblock_to_bytes(fs, rec.br_startblock) >> BLOCK_SHIFT(fs);
+ dir_buf = xfs_dir2_get_dirblks(fs, db, rec.br_blockcount);
+
+ /*
+ * Syslinux only supports filesystem block size larger than or equal to
+ * 4 KiB. Thus, one directory block is far enough to hold the maximum
+ * symbolic link file content, which is only 1024 bytes long.
*/
- memcpy(buf, dir_buf, pathlen);
- free(dir_buf);
+ memcpy(buf, dir_buf, pathlen);
+ free(dir_buf);
}
out:
diff --git a/core/fs/xfs/xfs_dir2.c b/core/fs/xfs/xfs_dir2.c
index a7b121d..45b4ff1 100644
--- a/core/fs/xfs/xfs_dir2.c
+++ b/core/fs/xfs/xfs_dir2.c
@@ -166,8 +166,8 @@ found:
xfs_debug("Found a file inode!");
xfs_debug("inode size %llu", inode->size);
} else if (be16_to_cpu(ncore->di_mode) & S_IFLNK) {
- inode->mode = DT_LNK;
- xfs_debug("Found a symbolic link inode!");
+ inode->mode = DT_LNK;
+ xfs_debug("Found a symbolic link inode!");
}
return inode;
More information about the Syslinux-commits
mailing list