aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaulo Alcantara <pcacjr@zytor.com>2012-09-02 19:49:21 -0300
committerPaulo Alcantara <pcacjr@zytor.com>2012-09-02 19:54:27 -0300
commit1e4d29ab0fde3f81701b3de206179e6ecd545420 (patch)
tree19e1a1f17c93a5201244fd1a16ce5802e65c7494
parent013e648cb3d715f671e5b656a6d5c3bbf73c5044 (diff)
downloadsyslinux-1e4d29ab0fde3f81701b3de206179e6ecd545420.tar.gz
syslinux-1e4d29ab0fde3f81701b3de206179e6ecd545420.tar.xz
syslinux-1e4d29ab0fde3f81701b3de206179e6ecd545420.zip
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@zytor.com>
-rw-r--r--core/fs/xfs/xfs.c36
-rw-r--r--core/fs/xfs/xfs_dir2.c4
2 files changed, 19 insertions, 21 deletions
diff --git a/core/fs/xfs/xfs.c b/core/fs/xfs/xfs.c
index bcb350d7..7102d7a1 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 a7b121df..45b4ff10 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;