lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 31 Jul 2012 11:34:38 -0700
From:	Andreas Dilger <adilger@...mcloud.com>
To:	Theodore Ts'o <tytso@....edu>
Cc:	Ext4 Developers List <linux-ext4@...r.kernel.org>,
	"tony@...eyournoodle.com" <tony@...eyournoodle.com>,
	Theodore Ts'o <tytso@....edu>
Subject: Re: [PATCH 2/7] libext2fs: use abort() instead of perror()/exit()

On 2012-07-30, at 14:47, Theodore Ts'o <tytso@....edu> wrote:

> This simplifies the number of C library symbols needed by boot loader
> systems such as yaboot.

This doesn't improve the debugability of the code at all. Instead of getting an error message (as cryptic as it was), now there is no error and the process will just die.

I'm guessing from the original coding that there is no error handling for this case? 

Cheers, Andreas

> Signed-off-by: "Theodore Ts'o" <tytso@....edu>
> ---
> lib/ext2fs/blkmap64_rb.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/lib/ext2fs/blkmap64_rb.c b/lib/ext2fs/blkmap64_rb.c
> index e6b7e04..74140ec 100644
> --- a/lib/ext2fs/blkmap64_rb.c
> +++ b/lib/ext2fs/blkmap64_rb.c
> @@ -134,10 +134,8 @@ static void rb_get_new_extent(struct bmap_rb_extent **ext, __u64 start,
> 
>    retval = ext2fs_get_mem(sizeof (struct bmap_rb_extent),
>                &new_ext);
> -    if (retval) {
> -        perror("ext2fs_get_mem");
> -        exit(1);
> -    }
> +    if (retval)
> +        abort();
> 
>    new_ext->start = start;
>    new_ext->count = count;
> -- 
> 1.7.12.rc0.22.gcdd159b
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ