UDF: coding style conversion - lindent

This patch converts UDF coding style to kernel coding style using Lindent.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Cc: Jan Kara <jack@ucw.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
Cyrill Gorcunov
2007-07-19 01:47:43 -07:00
committed by Linus Torvalds
parent 95a631e2d9
commit cb00ea3528
23 changed files with 3789 additions and 3637 deletions

View File

@@ -33,41 +33,40 @@
#include <linux/buffer_head.h>
#include "udf_i.h"
static void udf_pc_to_char(struct super_block *sb, char *from, int fromlen, char *to)
static void udf_pc_to_char(struct super_block *sb, char *from, int fromlen,
char *to)
{
struct pathComponent *pc;
int elen = 0;
char *p = to;
while (elen < fromlen)
{
while (elen < fromlen) {
pc = (struct pathComponent *)(from + elen);
switch (pc->componentType)
{
case 1:
if (pc->lengthComponentIdent == 0)
{
p = to;
*p++ = '/';
}
break;
case 3:
memcpy(p, "../", 3);
p += 3;
break;
case 4:
memcpy(p, "./", 2);
p += 2;
/* that would be . - just ignore */
break;
case 5:
p += udf_get_filename(sb, pc->componentIdent, p, pc->lengthComponentIdent);
switch (pc->componentType) {
case 1:
if (pc->lengthComponentIdent == 0) {
p = to;
*p++ = '/';
break;
}
break;
case 3:
memcpy(p, "../", 3);
p += 3;
break;
case 4:
memcpy(p, "./", 2);
p += 2;
/* that would be . - just ignore */
break;
case 5:
p += udf_get_filename(sb, pc->componentIdent, p,
pc->lengthComponentIdent);
*p++ = '/';
break;
}
elen += sizeof(struct pathComponent) + pc->lengthComponentIdent;
}
if (p > to+1)
if (p > to + 1)
p[-1] = '\0';
else
p[0] = '\0';
@@ -84,8 +83,7 @@ static int udf_symlink_filler(struct file *file, struct page *page)
lock_kernel();
if (UDF_I_ALLOCTYPE(inode) == ICBTAG_FLAG_AD_IN_ICB)
symlink = UDF_I_DATA(inode) + UDF_I_LENEATTR(inode);
else
{
else {
bh = sb_bread(inode->i_sb, udf_block_map(inode, 0));
if (!bh)
@@ -102,7 +100,7 @@ static int udf_symlink_filler(struct file *file, struct page *page)
kunmap(page);
unlock_page(page);
return 0;
out:
out:
unlock_kernel();
SetPageError(page);
kunmap(page);
@@ -114,5 +112,5 @@ out:
* symlinks can't do much...
*/
const struct address_space_operations udf_symlink_aops = {
.readpage = udf_symlink_filler,
.readpage = udf_symlink_filler,
};