cleanup: remove trailing whitespace

This patch just removes trailing whitespace.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
This commit is contained in:
Jeff Mahoney committed 2013-08-26 17:15:32 -04:00
1 parent 47cff72748
commit 290bb8c378
50 files changed
+319 -319

No files matched your search

+25 -25
View File
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2004 by Hans Reiser, licensing governed by
* Copyright 2000-2004 by Hans Reiser, licensing governed by
* reiserfsprogs/README
*/
@@ -405,7 +405,7 @@ static int have_to_append(struct item_head *ih)
tail_start = (off & ~(fs->fs_blocksize - 1)) + 1;
// find correct tail first
// find correct tail first
for (i = 0; i < map.tail_nr; i++) {
if (map.tails[i].offset == tail_start) {
if (map.tails[i].offset + map.tails[i].len <=
@@ -414,7 +414,7 @@ static int have_to_append(struct item_head *ih)
return 0;
}
}
// there was no this tail yet
// there was no this tail yet
return 1;
}
return 0;
@@ -442,7 +442,7 @@ static void do_append(struct item_head *ih, void *data)
} else if (is_direct_ih(ih)) {
unsigned int tail_start, skip;
// find correct tail first
// find correct tail first
tail_start = (off & ~(fs->fs_blocksize - 1)) + 1;
skip = (off - 1) & (fs->fs_blocksize - 1);
for (i = 0; i < map.tail_nr; i++) {
@@ -463,7 +463,7 @@ static void do_append(struct item_head *ih, void *data)
return;
}
}
// allocate memory for new tail
// allocate memory for new tail
map.tails =
realloc(map.tails, (map.tail_nr + 1) * sizeof(struct tail));
if (!map.tails)
@@ -480,7 +480,7 @@ static void do_append(struct item_head *ih, void *data)
}
}
// map contains
// map contains
static void do_overwrite(struct item_head *ih, void *data)
{
unsigned long long off, skip;
@@ -517,11 +517,11 @@ static void do_overwrite(struct item_head *ih, void *data)
unsigned int tail_start;
int i;
// find correct tail first
// find correct tail first
tail_start = (off & ~(fs->fs_blocksize - 1)) + 1;
for (i = 0; i < map.tail_nr; i++) {
if (map.tails[i].offset == tail_start) {
// ih is a part of this tail
// ih is a part of this tail
skip = (off - 1) & (fs->fs_blocksize - 1);
to_compare =
(map.tails[i].len - skip >
@@ -560,7 +560,7 @@ static void map_one_item(struct saved_item *item)
struct item_head *ih;
void *data;
// read the block containing the item
// read the block containing the item
bh = bread(fs->fs_dev, item->si_block, fs->fs_blocksize);
if (!bh) {
reiserfs_warning(stderr, "bread failed\n");
@@ -580,7 +580,7 @@ static void map_one_item(struct saved_item *item)
brelse(bh);
}
// flush map which is in variable map
// flush map which is in variable map
static void flush_map(reiserfs_filsys_t *fs,
struct reiserfs_key *dir,
char *name, struct reiserfs_key *key)
@@ -602,30 +602,30 @@ static void flush_map(reiserfs_filsys_t *fs,
v32 = MAP_MAGIC;
fwrite(&v32, sizeof(v32), 1, fp);
// device name
// device name
v32 = strlen(device_name(fs)) + 1;
fwrite(&v32, sizeof(v32), 1, fp);
fwrite(device_name(fs), v32, 1, fp);
// name length and the name itself
// name length and the name itself
v32 = strlen(name) + 1;
fwrite(&v32, sizeof(v32), 1, fp);
fwrite(name, v32, 1, fp);
// short key of a directory
// short key of a directory
fwrite(dir, SHORT_KEY_SIZE, 1, fp);
// short key of file
// short key of file
fwrite(key, SHORT_KEY_SIZE, 1, fp);
// list of data block pointers
// list of data block pointers
fwrite(&map.head_len, sizeof(map.head_len), 1, fp);
fwrite(map.head, map.head_len * 4, 1, fp);
// find correct tail first
// find correct tail first
for (i = 0; i < map.tail_nr; i++) {
if (map.tails[i].offset == map.head_len * fs->fs_blocksize) {
// tail length and the tail itself
// tail length and the tail itself
fwrite(&map.tails[i].len, sizeof(map.tails[i].len), 1,
fp);
fwrite(map.tails[i].data, map.tails[i].len, 1, fp);
@@ -633,7 +633,7 @@ static void flush_map(reiserfs_filsys_t *fs,
}
}
if (i == map.tail_nr) {
// no tail
// no tail
v32 = 0;
fwrite(&v32, sizeof(v32), 1, fp);
}
@@ -644,7 +644,7 @@ static void flush_map(reiserfs_filsys_t *fs,
fclose(fp);
}
// write map of file to a map file
// write map of file to a map file
/*
static void map_item_list (const void *nodep, VISIT value, int level)
@@ -657,7 +657,7 @@ static void map_item_list (const void *nodep, VISIT value, int level)
item = *(struct saved_item **)nodep;
// 1. find the longest item
// 1. find the longest item
max_bytes = get_bytes_number (&item->si_ih, fs->fs_blocksize);
longest = item;
while (item->si_next) {
@@ -671,7 +671,7 @@ static void map_item_list (const void *nodep, VISIT value, int level)
map_one_item (longest);
// map other items
// map other items
item = *(struct saved_item **)nodep;
while (item) {
if (item != longest)
@@ -691,15 +691,15 @@ static void make_file_map (const void *nodep, VISIT value, int level)
while (name) {
reiserfs_warning (stdout, "%d - (%d): [%K]:\"%s\":\n", ++nr, name->count,
&name->parent_dirid, name->name);
if (name->items) {
// initialize the map
// initialize the map
memset (&map, 0, sizeof (struct file_map));
// make a map of file
// make a map of file
twalk (name->items, map_item_list);
// write map to a file
// write map to a file
flush_map (fs, (struct reiserfs_key *)&name->parent_dirid, name->name,
(struct reiserfs_key *)&name->dirid);