Skip to content

Commit

Permalink
Remove trailing whitespace for the entire source tree
Browse files Browse the repository at this point in the history
Signed-off-by: "Theodore Ts'o" <[email protected]>
  • Loading branch information
tytso committed Aug 28, 2008
1 parent 4690e62 commit efc6f62
Show file tree
Hide file tree
Showing 233 changed files with 2,691 additions and 2,691 deletions.
134 changes: 67 additions & 67 deletions debugfs/debugfs.c

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion debugfs/debugfs.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ extern void do_set_block_group_descriptor(int argc, char **);
extern void do_dump_unused(int argc, char **argv);

/* debugfs.c */
extern void internal_dump_inode(FILE *, const char *, ext2_ino_t,
extern void internal_dump_inode(FILE *, const char *, ext2_ino_t,
struct ext2_inode *, int);

extern void do_dirty_filesys(int argc, char **argv);
Expand Down
22 changes: 11 additions & 11 deletions debugfs/dump.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* dump.c --- dump the contents of an inode out to a file
*
*
* Copyright (C) 1994 Theodore Ts'o. This file may be redistributed
* under the terms of the GNU Public License.
*/
Expand All @@ -22,7 +22,7 @@
#include <utime.h>
#ifdef HAVE_GETOPT_H
#include <getopt.h>
#else
#else
extern int optind;
extern char *optarg;
#endif
Expand Down Expand Up @@ -51,7 +51,7 @@ static struct {
{ LINUX_S_IXOTH, S_IXOTH },
{ 0, 0 }
};

static mode_t mode_xlate(__u16 lmode)
{
mode_t mode = 0;
Expand Down Expand Up @@ -106,7 +106,7 @@ static void dump_file(const char *cmdname, ext2_ino_t ino, int fd,
ext2_file_t e2_file;
int nbytes;
unsigned int got;

if (debugfs_read_inode(ino, &inode, cmdname))
return;

Expand All @@ -117,7 +117,7 @@ static void dump_file(const char *cmdname, ext2_ino_t ino, int fd,
}
while (1) {
retval = ext2fs_file_read(e2_file, buf, sizeof(buf), &got);
if (retval)
if (retval)
com_err(cmdname, retval, "while reading ext2 file");
if (got == 0)
break;
Expand All @@ -130,12 +130,12 @@ static void dump_file(const char *cmdname, ext2_ino_t ino, int fd,
com_err(cmdname, retval, "while closing ext2 file");
return;
}

if (preserve)
fix_perms("dump_file", &inode, fd, outname);
else if (fd != 1)
close(fd);

return;
}

Expand All @@ -147,7 +147,7 @@ void do_dump(int argc, char **argv)
int preserve = 0;
const char *dump_usage = "Usage: dump_inode [-p] <file> <output_file>";
char *in_fn, *out_fn;

reset_getopt();
while ((c = getopt (argc, argv, "p")) != EOF) {
switch (c) {
Expand All @@ -171,7 +171,7 @@ void do_dump(int argc, char **argv)
out_fn = argv[optind+1];

inode = string_to_inode(in_fn);
if (!inode)
if (!inode)
return;

fd = open(out_fn, O_CREAT | O_WRONLY | O_TRUNC | O_LARGEFILE, 0666);
Expand Down Expand Up @@ -289,7 +289,7 @@ static void rdump_inode(ext2_ino_t ino, struct ext2_inode *inode,
free(fullname);
}

static int rdump_dirent(struct ext2_dir_entry *dirent,
static int rdump_dirent(struct ext2_dir_entry *dirent,
int offset EXT2FS_ATTR((unused)),
int blocksize EXT2FS_ATTR((unused)),
char *buf EXT2FS_ATTR((unused)), void *private)
Expand Down Expand Up @@ -360,7 +360,7 @@ void do_cat(int argc, char **argv)

fflush(stdout);
fflush(stderr);
dump_file(argv[0], inode, 1, 0, argv[2]);
dump_file(argv[0], inode, 1, 0, argv[2]);

return;
}
Expand Down
28 changes: 14 additions & 14 deletions debugfs/htree.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* htree.c --- hash tree routines
*
*
* Copyright (C) 2002 Theodore Ts'o. This file may be redistributed
* under the terms of the GNU Public License.
*/
Expand All @@ -17,7 +17,7 @@
#include <sys/types.h>
#ifdef HAVE_GETOPT_H
#include <getopt.h>
#else
#else
extern int optind;
extern char *optarg;
#endif
Expand All @@ -40,7 +40,7 @@ static void htree_dump_leaf_node(ext2_filsys fs, ext2_ino_t ino,
blk_t pblk;
ext2_dirhash_t hash, minor_hash;
int rec_len, hash_alg;

errcode = ext2fs_bmap(fs, ino, inode, buf, 0, blk, &pblk);
if (errcode) {
com_err("htree_dump_leaf_node", errcode,
Expand Down Expand Up @@ -105,13 +105,13 @@ static void htree_dump_int_block(ext2_filsys fs, ext2_ino_t ino,
static void htree_dump_int_node(ext2_filsys fs, ext2_ino_t ino,
struct ext2_inode *inode,
struct ext2_dx_root_info * rootnode,
struct ext2_dx_entry *ent,
struct ext2_dx_entry *ent,
char *buf, int level)
{
struct ext2_dx_countlimit limit;
struct ext2_dx_entry e;
int hash, i;


limit = *((struct ext2_dx_countlimit *) ent);
limit.count = ext2fs_le16_to_cpu(limit.count);
Expand Down Expand Up @@ -159,7 +159,7 @@ static void htree_dump_int_block(ext2_filsys fs, ext2_ino_t ino,
fprintf(pager, "Couldn't allocate child block.\n");
return;
}

errcode = ext2fs_bmap(fs, ino, inode, buf, 0, blk, &pblk);
if (errcode) {
com_err("htree_dump_int_block", errcode,
Expand Down Expand Up @@ -232,7 +232,7 @@ void do_htree_dump(int argc, char *argv[])
com_err(argv[0], 0, "Not a directory");
goto errout;
}

if ((inode.i_flags & EXT2_BTREE_FL) == 0) {
com_err(argv[0], 0, "Not a hash-indexed directory");
goto errout;
Expand All @@ -251,7 +251,7 @@ void do_htree_dump(int argc, char *argv[])
goto errout;
}

errcode = io_channel_read_blk(current_fs->io, blk,
errcode = io_channel_read_blk(current_fs->io, blk,
1, buf);
if (errcode) {
com_err(argv[0], errcode, "Error reading root node");
Expand Down Expand Up @@ -290,7 +290,7 @@ void do_dx_hash(int argc, char *argv[])
int c;
int hash_version = 0;
__u32 hash_seed[4];

hash_seed[0] = hash_seed[1] = hash_seed[2] = hash_seed[3] = 0;

reset_getopt();
Expand Down Expand Up @@ -330,14 +330,14 @@ struct process_block_struct {
};

static int search_dir_block(ext2_filsys fs, blk_t *blocknr,
e2_blkcnt_t blockcnt, blk_t ref_blk,
e2_blkcnt_t blockcnt, blk_t ref_blk,
int ref_offset, void *priv_data);

void do_dirsearch(int argc, char *argv[])
{
ext2_ino_t inode;
struct process_block_struct pb;

if (check_fs_open(argv[0]))
return;

Expand All @@ -357,7 +357,7 @@ void do_dirsearch(int argc, char *argv[])
}
pb.search_name = argv[2];
pb.len = strlen(pb.search_name);

ext2fs_block_iterate2(current_fs, inode, BLOCK_FLAG_READ_ONLY, 0,
search_dir_block, &pb);

Expand All @@ -366,7 +366,7 @@ void do_dirsearch(int argc, char *argv[])


static int search_dir_block(ext2_filsys fs, blk_t *blocknr,
e2_blkcnt_t blockcnt,
e2_blkcnt_t blockcnt,
blk_t ref_blk EXT2FS_ATTR((unused)),
int ref_offset EXT2FS_ATTR((unused)),
void *priv_data)
Expand Down Expand Up @@ -394,7 +394,7 @@ static int search_dir_block(ext2_filsys fs, blk_t *blocknr,
rec_len = (dirent->rec_len || fs->blocksize < 65536) ?
dirent->rec_len : 65536;
if (dirent->inode &&
p->len == (dirent->name_len & 0xFF) &&
p->len == (dirent->name_len & 0xFF) &&
strncmp(p->search_name, dirent->name,
p->len) == 0) {
printf("Entry found at logical block %lld, "
Expand Down
8 changes: 4 additions & 4 deletions debugfs/icheck.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* icheck.c --- given a list of blocks, generate a list of inodes
*
*
* Copyright (C) 1994 Theodore Ts'o. This file may be redistributed
* under the terms of the GNU Public License.
*/
Expand Down Expand Up @@ -48,7 +48,7 @@ static int icheck_proc(ext2_filsys fs EXT2FS_ATTR((unused)),
}
if (!bw->blocks_left)
return BLOCK_ABORT;

return 0;
}

Expand All @@ -62,7 +62,7 @@ void do_icheck(int argc, char **argv)
struct ext2_inode inode;
errcode_t retval;
char *block_buf;

if (argc < 2) {
com_err(argv[0], 0, "Usage: icheck <block number> ...");
return;
Expand Down Expand Up @@ -104,7 +104,7 @@ void do_icheck(int argc, char **argv)
com_err("icheck", retval, "while starting inode scan");
goto error_out;
}

while (ino) {
if (!inode.i_links_count)
goto next;
Expand Down
Loading

0 comments on commit efc6f62

Please sign in to comment.