a5bd9f6
From 2e6bc59b479c674f58216d153a6bdd92bcb5d1c7 Mon Sep 17 00:00:00 2001
a5bd9f6
From: Vladimir 'phcoder' Serbinenko <phcoder@gmail.com>
a5bd9f6
Date: Wed, 24 Apr 2013 14:47:14 +0200
a5bd9f6
Subject: [PATCH 338/364] 	* grub-core/disk/ata.c (grub_ata_real_open):
a5bd9f6
 Use grub_error properly.
a5bd9f6
a5bd9f6
---
a5bd9f6
 ChangeLog            | 4 ++++
a5bd9f6
 grub-core/disk/ata.c | 2 ++
a5bd9f6
 2 files changed, 6 insertions(+)
a5bd9f6
a5bd9f6
diff --git a/ChangeLog b/ChangeLog
a5bd9f6
index d863bb3..6d9ffdc 100644
a5bd9f6
--- a/ChangeLog
a5bd9f6
+++ b/ChangeLog
a5bd9f6
@@ -1,5 +1,9 @@
a5bd9f6
 2013-04-24  Vladimir Serbinenko  <phcoder@gmail.com>
a5bd9f6
 
a5bd9f6
+	* grub-core/disk/ata.c (grub_ata_real_open): Use grub_error properly.
a5bd9f6
+
a5bd9f6
+2013-04-24  Vladimir Serbinenko  <phcoder@gmail.com>
a5bd9f6
+
a5bd9f6
 	Add missing video ids to coreboot and ieee1275 video.
a5bd9f6
 
a5bd9f6
 2013-04-24  Vladimir Serbinenko  <phcoder@gmail.com>
a5bd9f6
diff --git a/grub-core/disk/ata.c b/grub-core/disk/ata.c
a5bd9f6
index c84d316..dada56d 100644
a5bd9f6
--- a/grub-core/disk/ata.c
a5bd9f6
+++ b/grub-core/disk/ata.c
a5bd9f6
@@ -382,6 +382,8 @@ grub_ata_real_open (int id, int bus)
a5bd9f6
       err = grub_ata_identify (ata);
a5bd9f6
       if (err)
a5bd9f6
 	{
a5bd9f6
+	  if (!grub_errno)
a5bd9f6
+	    grub_error (GRUB_ERR_UNKNOWN_DEVICE, "no such ATA device");
a5bd9f6
 	  grub_free (ata);
a5bd9f6
 	  return NULL;
a5bd9f6
 	}
a5bd9f6
-- 
a5bd9f6
1.8.1.4
a5bd9f6