Projects
Mega:23.03
util-linux
_service:tar_scm:backport-libblkid-src-topology...
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:tar_scm:backport-libblkid-src-topology-dm-close-redundant-write-file-.patch of Package util-linux
From 3f5dd5fa812120764312a2326285e88b2be82c2f Mon Sep 17 00:00:00 2001 From: jiayi0118 <1398871225@qq.com> Date: Wed, 17 Aug 2022 22:25:27 +0800 Subject: [PATCH] libblkid/src/topology/dm: close redundant write file description for pipe before reading data. Reference:https://github.com/util-linux/util-linux/commit/1d5d50c277e459f4ccbb6e3db416dcb6eb2e2bc4 Conflict:NA --- libblkid/src/topology/dm.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/libblkid/src/topology/dm.c b/libblkid/src/topology/dm.c index b210a805b..1a1cb8ac0 100644 --- a/libblkid/src/topology/dm.c +++ b/libblkid/src/topology/dm.c @@ -103,6 +103,10 @@ static int probe_dm_tp(blkid_probe pr, if (!stream) goto nothing; + if (dmpipe[1] != -1) { + close(dmpipe[1]); + } + if (fscanf(stream, "%lld %lld striped %d %d ", &offset, &size, &stripes, &stripesize) != 0) goto nothing; @@ -111,7 +115,6 @@ static int probe_dm_tp(blkid_probe pr, blkid_topology_set_optimal_io_size(pr, (stripes * stripesize) << 9); fclose(stream); - close(dmpipe[1]); return 0; nothing: @@ -119,8 +122,6 @@ nothing: fclose(stream); else if (dmpipe[0] != -1) close(dmpipe[0]); - if (dmpipe[1] != -1) - close(dmpipe[1]); return 1; } -- 2.31.1
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2