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
8097a8dc
Commit
8097a8dc
authored
Aug 02, 2012
by
Pavel Emelyanov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
signalfd: Add proc fdinfo parsing facility
Signed-off-by:
Pavel Emelyanov
<
xemul@parallels.com
>
parent
04016641
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
0 deletions
+18
-0
proc_parse.h
include/proc_parse.h
+2
-0
proc_parse.c
proc_parse.c
+16
-0
No files found.
include/proc_parse.h
View file @
8097a8dc
...
@@ -8,6 +8,7 @@
...
@@ -8,6 +8,7 @@
#include "../protobuf/eventfd.pb-c.h"
#include "../protobuf/eventfd.pb-c.h"
#include "../protobuf/eventpoll.pb-c.h"
#include "../protobuf/eventpoll.pb-c.h"
#include "../protobuf/signalfd.pb-c.h"
#include "../protobuf/inotify.pb-c.h"
#include "../protobuf/inotify.pb-c.h"
#define PROC_TASK_COMM_LEN 32
#define PROC_TASK_COMM_LEN 32
...
@@ -124,6 +125,7 @@ extern int parse_pid_status(pid_t pid, struct proc_status_creds *);
...
@@ -124,6 +125,7 @@ extern int parse_pid_status(pid_t pid, struct proc_status_creds *);
union
fdinfo_entries
{
union
fdinfo_entries
{
EventfdFileEntry
efd
;
EventfdFileEntry
efd
;
EventpollTfdEntry
epl
;
EventpollTfdEntry
epl
;
SignalfdEntry
sfd
;
InotifyWdEntry
ify
;
InotifyWdEntry
ify
;
};
};
...
...
proc_parse.c
View file @
8097a8dc
...
@@ -762,6 +762,22 @@ int parse_fdinfo(int fd, int type,
...
@@ -762,6 +762,22 @@ int parse_fdinfo(int fd, int type,
entry_met
=
true
;
entry_met
=
true
;
continue
;
continue
;
}
}
if
(
fdinfo_field
(
str
,
"sigmask"
))
{
signalfd_entry__init
(
&
entry
.
sfd
);
if
(
type
!=
FD_TYPES__SIGNALFD
)
goto
parse_err
;
ret
=
sscanf
(
str
,
"sigmask: %Lx"
,
(
unsigned
long
long
*
)
&
entry
.
sfd
.
sigmask
);
if
(
ret
!=
1
)
goto
parse_err
;
ret
=
cb
(
&
entry
,
arg
);
if
(
ret
)
return
ret
;
entry_met
=
true
;
continue
;
}
if
(
fdinfo_field
(
str
,
"inotify wd"
))
{
if
(
fdinfo_field
(
str
,
"inotify wd"
))
{
FhEntry
f_handle
=
FH_ENTRY__INIT
;
FhEntry
f_handle
=
FH_ENTRY__INIT
;
int
hoff
;
int
hoff
;
...
...
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