Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
criu
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhul
criu
Commits
90d0a6a0
Commit
90d0a6a0
authored
May 11, 2012
by
Pavel Emelyanov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mount: Collect mount root as well when parsing proc
Signed-off-by:
Pavel Emelyanov
<
xemul@parallels.com
>
parent
79da5384
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
proc_parse.h
include/proc_parse.h
+1
-0
proc_parse.c
proc_parse.c
+1
-2
No files found.
include/proc_parse.h
View file @
90d0a6a0
...
@@ -89,6 +89,7 @@ struct proc_mountinfo {
...
@@ -89,6 +89,7 @@ struct proc_mountinfo {
int
mnt_id
;
int
mnt_id
;
int
parent_mnt_id
;
int
parent_mnt_id
;
unsigned
int
s_dev
;
unsigned
int
s_dev
;
char
root
[
64
];
char
mountpoint
[
64
];
char
mountpoint
[
64
];
};
};
...
...
proc_parse.c
View file @
90d0a6a0
...
@@ -485,7 +485,6 @@ int parse_mountinfo(pid_t pid, struct proc_mountinfo *mi, int nr_elems)
...
@@ -485,7 +485,6 @@ int parse_mountinfo(pid_t pid, struct proc_mountinfo *mi, int nr_elems)
while
(
fgets
(
str
,
sizeof
(
str
),
f
))
{
while
(
fgets
(
str
,
sizeof
(
str
),
f
))
{
unsigned
int
kmaj
,
kmin
,
parent_mnt_id
;
unsigned
int
kmaj
,
kmin
,
parent_mnt_id
;
char
mnt_root
[
63
];
int
ret
;
int
ret
;
if
((
i
+
1
)
>=
nr_elems
)
{
if
((
i
+
1
)
>=
nr_elems
)
{
...
@@ -495,7 +494,7 @@ int parse_mountinfo(pid_t pid, struct proc_mountinfo *mi, int nr_elems)
...
@@ -495,7 +494,7 @@ int parse_mountinfo(pid_t pid, struct proc_mountinfo *mi, int nr_elems)
ret
=
sscanf
(
str
,
"%i %i %u:%u %63s %63s"
,
ret
=
sscanf
(
str
,
"%i %i %u:%u %63s %63s"
,
&
mi
[
i
].
mnt_id
,
&
parent_mnt_id
,
&
mi
[
i
].
mnt_id
,
&
parent_mnt_id
,
&
kmaj
,
&
kmin
,
m
nt_
root
,
&
kmaj
,
&
kmin
,
m
i
[
i
].
root
,
mi
[
i
].
mountpoint
);
mi
[
i
].
mountpoint
);
if
(
ret
!=
6
)
{
if
(
ret
!=
6
)
{
pr_err
(
"Bad format in %d mountinfo
\n
"
,
pid
);
pr_err
(
"Bad format in %d mountinfo
\n
"
,
pid
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment