d75d85cc43
- tests/t1701-rescue-fs wait for the device to appear. (bcl) - Increase timeout for rmmod scsi_debug and make it a framework failure (bcl) - libparted/dasd: add test cases for the new fdasd functions (dongdwdw) - libparted/dasd: add an exception for changing DASD-LDL partition table (dongdwdw) - libpartd/dasd: improve flag processing for DASD-LDL (dongdwdw) - parted/ui: remove unneccesary information of command line (dongdwdw) - parted: check the name of partition first when to name a partition (dongdwdw) - Add support for RAM drives (sparschauer) - Fix crash when localized (psusi) - libparted: Fix typo in hfs error message (sebras) - libparted: Fix MacOS boot support (laurent) - mac: copy partition type and name correctly (saproj) - libparted: Add support for atari partition tables (glaubitz) - libparted:tests: Move get_sector_size() to common.c (glaubitz) - tests: Update t0220 and t0280 for the swap flag. (bcl) - libparted: set swap flag on GPT partitions (aschnell) - libparted/dasd: add test cases for the new fdasd functions (dongdwdw) - libparted/dasd: add new fdasd functions (dongdwdw) - libparted/dasd: update and improve fdasd functions (dongdwdw) - libparted/dasd: unify vtoc handling for cdl/ldl (dongdwdw) - libparted: Don't warn if no HDIO_GET_IDENTITY ioctl (sparschauer) - libparted: Fix starting CHS in protective MBR (petr.uzel) - tests: Stop timing t9040 (#1172675) (bcl)
45 lines
1.7 KiB
Diff
45 lines
1.7 KiB
Diff
From a6612fb6dd3746cfc9138ebc84210945a8fffa10 Mon Sep 17 00:00:00 2001
|
|
From: Sebastian Parschauer <sparschauer@suse.de>
|
|
Date: Tue, 4 Oct 2016 11:37:30 +0200
|
|
Subject: [PATCH 57/75] libparted: Don't warn if no HDIO_GET_IDENTITY ioctl
|
|
|
|
Fully virtualized Xen VMs (HVM) use Linux IDE devices which don't
|
|
support the HDIO_GET_IDENTITY ioctl. EINVAL is returned, a warning
|
|
is printed and the device model is set to "Generic IDE" in that
|
|
case. The problem is seeing the warning all the time. So drop it
|
|
for this case.
|
|
|
|
Signed-off-by: Brian C. Lane <bcl@redhat.com>
|
|
---
|
|
libparted/arch/linux.c | 7 ++++++-
|
|
1 file changed, 6 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/libparted/arch/linux.c b/libparted/arch/linux.c
|
|
index b7ba5de..2058697 100644
|
|
--- a/libparted/arch/linux.c
|
|
+++ b/libparted/arch/linux.c
|
|
@@ -931,6 +931,7 @@ init_ide (PedDevice* dev)
|
|
PedExceptionOption ex_status;
|
|
char hdi_buf[41];
|
|
int sector_multiplier = 0;
|
|
+ int r;
|
|
|
|
if (!_device_stat (dev, &dev_stat))
|
|
goto error;
|
|
@@ -938,7 +939,11 @@ init_ide (PedDevice* dev)
|
|
if (!_device_open_ro (dev))
|
|
goto error;
|
|
|
|
- if (ioctl (arch_specific->fd, HDIO_GET_IDENTITY, &hdi)) {
|
|
+ r = ioctl (arch_specific->fd, HDIO_GET_IDENTITY, &hdi);
|
|
+ if (r && errno == EINVAL) {
|
|
+ /* silently ignore unsupported ioctl */
|
|
+ dev->model = strdup(_("Generic IDE"));
|
|
+ } else if (r) {
|
|
ex_status = ped_exception_throw (
|
|
PED_EXCEPTION_WARNING,
|
|
PED_EXCEPTION_IGNORE_CANCEL,
|
|
--
|
|
2.9.3
|
|
|