Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-15-SP5:GA
s390-tools.30980
s390-tools-sles15sp4-zdump-fix-dev-mem-reading....
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File s390-tools-sles15sp4-zdump-fix-dev-mem-reading.patch of Package s390-tools.30980
From 455ad953a91be08229837b10c3ee63c9615a4001 Mon Sep 17 00:00:00 2001 From: Alexander Egorenkov <egorenar@linux.ibm.com> Date: Fri, 28 Jan 2022 15:12:01 +0100 Subject: [PATCH] zdump: Fix /dev/mem reading MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit makes zgetdump work with /dev/mem again. zg_seek() should not attempt to verify the given offset for devices before issuing lseek() because special devices like /dev/mem report 0 in stat.sb_size. $ zgetdump -i /dev/mem zgetdump: Trying to seek past file end "/dev/mem" Fixes: 11e78cada516 ("zdump: catch attempts to seek past end of file in zg_seek()") Signed-off-by: Alexander Egorenkov <egorenar@linux.ibm.com> Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com> --- zdump/zg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zdump/zg.c b/zdump/zg.c index 8f41793..082167f 100644 --- a/zdump/zg.c +++ b/zdump/zg.c @@ -280,7 +280,7 @@ off_t zg_seek(struct zg_fh *zg_fh, off_t off, enum zg_check check) { off_t rc; - if (off >= zg_fh->sb.st_size) + if (S_ISREG(zg_fh->sb.st_mode) && off >= zg_fh->sb.st_size) ERR_EXIT("Trying to seek past file end \"%s\"", zg_fh->path); rc = lseek(zg_fh->fh, off, SEEK_SET); -- 2.35.3
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