Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
Please login to access the resource
SUSE:SLE-12-SP5:Update
parted.3441
libparted-dont-warn-if-no-HDIO_GET_IDENTITY.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File libparted-dont-warn-if-no-HDIO_GET_IDENTITY.patch of Package parted.3441
From: Sebastian Parschauer <sparschauer@suse.de> Date: Tue, 4 Oct 2016 10:30:37 +0200 Subject: libparted: Don't warn if no HDIO_GET_IDENTITY ioctl References: bsc#964012, bsc#1001967 Patch-mainline: Submitted, 2016-10-04 11:37 UTC+2 to parted-devel 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: Sebastian Parschauer <sparschauer@suse.de> --- Index: parted-3.1/libparted/arch/linux.c =================================================================== --- parted-3.1.orig/libparted/arch/linux.c +++ parted-3.1/libparted/arch/linux.c @@ -851,6 +851,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; @@ -858,7 +859,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,
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor