btrfs-progs/convert
Qu Wenruo 389c959d6d btrfs-progs: implement arg_strtou64_with_suffix() with a new helper
This patch introduces a new parser helper, parse_u64_with_suffix(),
which has a better error handling, following all the parse_*()
helpers to return non-zero value for errors.

This new helper is going to replace parse_size_from_string(), which
would directly call exit(1) to stop the whole program.

Furthermore most callers of parse_size_from_string() are expecting
exit(1) for error, so that they can skip the error handling.

For those call sites, introduce a wrapper, arg_strtou64_with_suffix(),
to do that.  The only disadvantage is a little less detailed error
report for why the parse failed, but for most cases the generic error
string should be enough.

Signed-off-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2024-01-18 02:14:23 +01:00
..
Makefile
common.c btrfs-progs: clean up includes, using include-what-you-use 2023-10-03 01:11:57 +02:00
common.h btrfs-progs: convert: move simple_range into common.h 2022-10-11 09:08:08 +02:00
main.c btrfs-progs: implement arg_strtou64_with_suffix() with a new helper 2024-01-18 02:14:23 +01:00
source-ext2.c btrfs-progs: convert: insert a dummy inode item before inode ref for ext2/4 2024-01-17 01:47:39 +01:00
source-ext2.h btrfs-progs: convert: update include lists 2022-10-11 09:06:12 +02:00
source-fs.c btrfs-progs: convert: insert a dummy inode item before inode ref for ext2/4 2024-01-17 01:47:39 +01:00
source-fs.h btrfs-progs: clean up includes, using include-what-you-use 2023-10-03 01:11:57 +02:00
source-reiserfs.c btrfs-progs: move btrfs_record_file_extent and code into a new file 2023-10-03 01:11:56 +02:00
source-reiserfs.h btrfs-progs: convert: update include lists 2022-10-11 09:06:12 +02:00