Re: [PATCH 10/14] blkzone: correct the wording of an error message, from ioctl to function

Karel Zak <[email protected]>
Newsgroups org.kernel.vger.util-linux
Message-ID <2nhsnn5oqisd5zrqchbweiymdmloyw6p2arxuzgegiroxd3rmg@qf437ub6ehwk>
On Sun, Feb 09, 2025 at 09:23:26AM GMT, Benno Schulenberg wrote:
> Signed-off-by: Benno Schulenberg <[email protected]>
> ---
>  sys-utils/blkzone.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/sys-utils/blkzone.c b/sys-utils/blkzone.c
> index 843f3c7b0..9e648484b 100644
> --- a/sys-utils/blkzone.c
> +++ b/sys-utils/blkzone.c
> @@ -149,7 +149,7 @@ static int init_device(struct blkzone_control *ctl, int mode)
>  		errx(EXIT_FAILURE, _("%s: not a block device"), ctl->devname);
>  
>  	if (blkdev_get_sectors(fd, (unsigned long long *) &ctl->total_sectors))
> -		err(EXIT_FAILURE, _("%s: blkdev_get_sectors ioctl failed"), ctl->devname);
> +		err(EXIT_FAILURE, _("%s: blkdev_get_sectors() failed"), ctl->devname);

blkdev_get_sectors() is a local util-linux function. It should not be
used in error messages. It would be better to use something like
"failed to get sector size".

    Karel


-- 
 Karel Zak  <[email protected]>
 http://karelzak.blogspot.com
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.