* [PATCH 1/4] e2p: Fix 's' handling in parse_num_blocks2()
2013-02-25 15:55 [PATCH 0/4] Compilation fixes for e2fsprogs Jan Kara
@ 2013-02-25 15:55 ` Jan Kara
2013-03-01 1:13 ` [1/4] " Theodore Ts'o
2013-02-25 15:55 ` [PATCH 2/4] libext2fs: Fix return value in ext2fs_test_block_bitmap_range2() Jan Kara
` (2 subsequent siblings)
3 siblings, 1 reply; 9+ messages in thread
From: Jan Kara @ 2013-02-25 15:55 UTC (permalink / raw)
To: Ted Tso; +Cc: linux-ext4, Jan Kara
parse_num_blocks2() wrongly did:
num << 1;
when log_block_size < 0. That is obviously wrong as such statement has
no effect (and the compiler properly warns about it). Callers expect
returned value to be in bytes when log_block_size < 0 so fix the
statement accordingly.
Signed-off-by: Jan Kara <jack@suse.cz>
---
lib/e2p/parse_num.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/lib/e2p/parse_num.c b/lib/e2p/parse_num.c
index cb0dc5b..e8d6283 100644
--- a/lib/e2p/parse_num.c
+++ b/lib/e2p/parse_num.c
@@ -42,7 +42,7 @@ unsigned long long parse_num_blocks2(const char *arg, int log_block_size)
break;
case 's':
if (log_block_size < 0)
- num << 1;
+ num <<= 9;
else
num >>= (1+log_block_size);
break;
--
1.7.1
^ permalink raw reply related [flat|nested] 9+ messages in thread* [PATCH 2/4] libext2fs: Fix return value in ext2fs_test_block_bitmap_range2()
2013-02-25 15:55 [PATCH 0/4] Compilation fixes for e2fsprogs Jan Kara
2013-02-25 15:55 ` [PATCH 1/4] e2p: Fix 's' handling in parse_num_blocks2() Jan Kara
@ 2013-02-25 15:55 ` Jan Kara
2013-03-01 1:06 ` [2/4] " Theodore Ts'o
2013-02-25 15:55 ` [PATCH 3/4] libext2fs: Provide prototype for ext2fs_symlink() Jan Kara
2013-02-25 15:55 ` [PATCH 4/4] resize: bigalloc_check() should have return type void Jan Kara
3 siblings, 1 reply; 9+ messages in thread
From: Jan Kara @ 2013-02-25 15:55 UTC (permalink / raw)
To: Ted Tso; +Cc: linux-ext4, Jan Kara
We used return without a return value in
ext2fs_test_block_bitmap_range2() despite the fuction returns int.
Signed-off-by: Jan Kara <jack@suse.cz>
---
lib/ext2fs/gen_bitmap64.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/lib/ext2fs/gen_bitmap64.c b/lib/ext2fs/gen_bitmap64.c
index 42a97d4..44ac499 100644
--- a/lib/ext2fs/gen_bitmap64.c
+++ b/lib/ext2fs/gen_bitmap64.c
@@ -658,7 +658,7 @@ int ext2fs_test_block_bitmap_range2(ext2fs_block_bitmap bmap,
if ((block < bmap->start) || (block+num-1 > bmap->end)) {
ext2fs_warn_bitmap(EXT2_ET_BAD_BLOCK_TEST, block,
bmap->description);
- return;
+ return EINVAL;
}
return bmap->bitmap_ops->test_clear_bmap_extent(bmap, block, num);
--
1.7.1
^ permalink raw reply related [flat|nested] 9+ messages in thread* [PATCH 3/4] libext2fs: Provide prototype for ext2fs_symlink()
2013-02-25 15:55 [PATCH 0/4] Compilation fixes for e2fsprogs Jan Kara
2013-02-25 15:55 ` [PATCH 1/4] e2p: Fix 's' handling in parse_num_blocks2() Jan Kara
2013-02-25 15:55 ` [PATCH 2/4] libext2fs: Fix return value in ext2fs_test_block_bitmap_range2() Jan Kara
@ 2013-02-25 15:55 ` Jan Kara
2013-03-01 1:13 ` [3/4] " Theodore Ts'o
2013-02-25 15:55 ` [PATCH 4/4] resize: bigalloc_check() should have return type void Jan Kara
3 siblings, 1 reply; 9+ messages in thread
From: Jan Kara @ 2013-02-25 15:55 UTC (permalink / raw)
To: Ted Tso; +Cc: linux-ext4, Jan Kara
New function ext2fs_symlink() doesn't have a prototype in ext2fs.h and
thus debugfs compilation gives warning:
debugfs.c:2219:2: warning: implicit declaration of function 'ext2fs_symlink'
Signed-off-by: Jan Kara <jack@suse.cz>
---
lib/ext2fs/ext2fs.h | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/lib/ext2fs/ext2fs.h b/lib/ext2fs/ext2fs.h
index 7139b4d..cd59473 100644
--- a/lib/ext2fs/ext2fs.h
+++ b/lib/ext2fs/ext2fs.h
@@ -1449,6 +1449,10 @@ errcode_t ext2fs_link(ext2_filsys fs, ext2_ino_t dir, const char *name,
errcode_t ext2fs_unlink(ext2_filsys fs, ext2_ino_t dir, const char *name,
ext2_ino_t ino, int flags);
+/* symlink.c */
+errcode_t ext2fs_symlink(ext2_filsys fs, ext2_ino_t parent, ext2_ino_t ino,
+ const char *name, char *target);
+
/* mmp.c */
errcode_t ext2fs_mmp_read(ext2_filsys fs, blk64_t mmp_blk, void *buf);
errcode_t ext2fs_mmp_write(ext2_filsys fs, blk64_t mmp_blk, void *buf);
--
1.7.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 4/4] resize: bigalloc_check() should have return type void
2013-02-25 15:55 [PATCH 0/4] Compilation fixes for e2fsprogs Jan Kara
` (2 preceding siblings ...)
2013-02-25 15:55 ` [PATCH 3/4] libext2fs: Provide prototype for ext2fs_symlink() Jan Kara
@ 2013-02-25 15:55 ` Jan Kara
2013-03-01 1:07 ` [4/4] " Theodore Ts'o
3 siblings, 1 reply; 9+ messages in thread
From: Jan Kara @ 2013-02-25 15:55 UTC (permalink / raw)
To: Ted Tso; +Cc: linux-ext4, Jan Kara
Signed-off-by: Jan Kara <jack@suse.cz>
---
resize/main.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/resize/main.c b/resize/main.c
index 4cbfe69..b648a15 100644
--- a/resize/main.c
+++ b/resize/main.c
@@ -147,7 +147,7 @@ static void determine_fs_stride(ext2_filsys fs)
#endif
}
-static bigalloc_check(ext2_filsys fs, int force)
+static void bigalloc_check(ext2_filsys fs, int force)
{
if (!force && EXT2_HAS_RO_COMPAT_FEATURE(fs->super,
EXT4_FEATURE_RO_COMPAT_BIGALLOC)) {
--
1.7.1
^ permalink raw reply related [flat|nested] 9+ messages in thread