Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP4:Update
lvm2
bug-1164718_20-cov-check-result-of-dev_get_bloc...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File bug-1164718_20-cov-check-result-of-dev_get_block_size.patch of Package lvm2
From 82e7426028a90fff891e0b3fafa15826758e18e8 Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac <zkabelac@redhat.com> Date: Tue, 25 Jun 2019 14:56:07 +0200 Subject: [PATCH] cov: check result of dev_get_block_size --- lib/label/label.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/label/label.c b/lib/label/label.c index 9a3f8df..6d8156e 100644 --- a/lib/label/label.c +++ b/lib/label/label.c @@ -1498,7 +1498,10 @@ void dev_set_last_byte(struct device *dev, uint64_t offset) unsigned int phys_block_size = 0; unsigned int block_size = 0; - dev_get_block_size(dev, &phys_block_size, &block_size); + if (!dev_get_block_size(dev, &phys_block_size, &block_size)) { + stack; + return; /* FIXME: error path ? */ + } bcache_set_last_byte(scan_bcache, dev->bcache_fd, offset, phys_block_size); } -- 1.8.3.1
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