From 7d93298ff6d2de8264310490584b7644e0e7e8e9 Mon Sep 17 00:00:00 2001 From: Vladimir 'phcoder' Serbinenko Date: Thu, 3 Oct 2013 23:20:00 +0200 Subject: [PATCH] * grub-core/disk/uboot/ubootdisk.c (uboot_disk_open): Use grub_error properly in case of missing block size. --- ChangeLog | 5 +++++ grub-core/disk/uboot/ubootdisk.c | 5 +---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1c1bb8a65..1b8e704a7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2013-10-03 Vladimir Serbinenko + + * grub-core/disk/uboot/ubootdisk.c (uboot_disk_open): Use grub_error + properly in case of missing block size. + 2013-10-03 Vladimir Serbinenko * grub-core/lib/arm/setjmp.S: Add missing license section. diff --git a/grub-core/disk/uboot/ubootdisk.c b/grub-core/disk/uboot/ubootdisk.c index 9b9fc6b4a..f2c7a6acd 100644 --- a/grub-core/disk/uboot/ubootdisk.c +++ b/grub-core/disk/uboot/ubootdisk.c @@ -183,10 +183,7 @@ uboot_disk_open (const char *name, struct grub_disk *disk) d->block_size = devinfo->di_stor.block_size; if (d->block_size == 0) - { - grub_printf ("%s: no block size!\n", __FUNCTION__); - return GRUB_ERR_IO; - } + return grub_error (GRUB_ERR_IO, "no block size"); for (disk->log_sector_size = 0; (1U << disk->log_sector_size) < d->block_size;