From f4d9b6252bd2b2b5a3c70a3869ce49a3a9e1a9cc Mon Sep 17 00:00:00 2001 Message-Id: From: Michal Privoznik Date: Fri, 6 Mar 2020 15:51:47 +0100 Subject: [PATCH] RHEL: virutil: Accept non-block devices in virGetDeviceID() If a caller wants to learn major or minor number for a device, let them. There's no need to check if the device is a block device here. https://bugzilla.redhat.com/show_bug.cgi?id=1808388 Signed-off-by: Michal Privoznik Signed-off-by: Andrea Bolognani Message-Id: <20200306145149.1610286-5-abologna@redhat.com> Reviewed-by: Jiri Denemark --- src/util/virutil.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/util/virutil.c b/src/util/virutil.c index cd67f54bc2..2448eba073 100644 --- a/src/util/virutil.c +++ b/src/util/virutil.c @@ -1693,9 +1693,6 @@ virGetDeviceID(const char *path, int *maj, int *min) if (stat(path, &sb) < 0) return -errno; - if (!S_ISBLK(sb.st_mode)) - return -EINVAL; - if (maj) *maj = major(sb.st_rdev); if (min) -- 2.25.1