Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
lxc
Project
Overview
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
Chen Yisong
lxc
Commits
3dba1ad7
Unverified
Commit
3dba1ad7
authored
Nov 28, 2017
by
AustinReichert
Committed by
Christian Brauner
Dec 17, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tools/lxc_monitor: removed internal logging
Signed-off-by:
AustinReichert
<
austinskyreichert@utexas.edu
>
parent
62aebd99
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
8 deletions
+6
-8
lxc_monitor.c
src/lxc/tools/lxc_monitor.c
+6
-8
No files found.
src/lxc/tools/lxc_monitor.c
View file @
3dba1ad7
...
@@ -37,8 +37,6 @@
...
@@ -37,8 +37,6 @@
#include "arguments.h"
#include "arguments.h"
#include "lxccontainer.h"
#include "lxccontainer.h"
lxc_log_define
(
lxc_monitor_ui
,
lxc
);
static
bool
quit_monitord
;
static
bool
quit_monitord
;
static
int
my_parser
(
struct
lxc_arguments
*
args
,
int
c
,
char
*
arg
)
static
int
my_parser
(
struct
lxc_arguments
*
args
,
int
c
,
char
*
arg
)
...
@@ -120,12 +118,12 @@ int main(int argc, char *argv[])
...
@@ -120,12 +118,12 @@ int main(int argc, char *argv[])
fd
=
lxc_monitor_open
(
my_args
.
lxcpath
[
i
]);
fd
=
lxc_monitor_open
(
my_args
.
lxcpath
[
i
]);
if
(
fd
<
0
)
{
if
(
fd
<
0
)
{
ERROR
(
"Unable to open monitor on path: %s
"
,
my_args
.
lxcpath
[
i
]);
fprintf
(
stderr
,
"Unable to open monitor on path: %s
\n
"
,
my_args
.
lxcpath
[
i
]);
ret
=
EXIT_FAILURE
;
ret
=
EXIT_FAILURE
;
continue
;
continue
;
}
}
if
(
write
(
fd
,
"quit"
,
4
)
<
0
)
{
if
(
write
(
fd
,
"quit"
,
4
)
<
0
)
{
SYSERROR
(
"Unable to close monitor on path: %s
"
,
my_args
.
lxcpath
[
i
]);
fprintf
(
stderr
,
"Unable to close monitor on path: %s
\n
"
,
my_args
.
lxcpath
[
i
]);
ret
=
EXIT_FAILURE
;
ret
=
EXIT_FAILURE
;
close
(
fd
);
close
(
fd
);
continue
;
continue
;
...
@@ -138,23 +136,23 @@ int main(int argc, char *argv[])
...
@@ -138,23 +136,23 @@ int main(int argc, char *argv[])
len
=
strlen
(
my_args
.
name
)
+
3
;
len
=
strlen
(
my_args
.
name
)
+
3
;
regexp
=
malloc
(
len
+
3
);
regexp
=
malloc
(
len
+
3
);
if
(
!
regexp
)
{
if
(
!
regexp
)
{
ERROR
(
"failed to allocate memory
"
);
fprintf
(
stderr
,
"failed to allocate memory
\n
"
);
exit
(
rc_main
);
exit
(
rc_main
);
}
}
rc_snp
=
snprintf
(
regexp
,
len
,
"^%s$"
,
my_args
.
name
);
rc_snp
=
snprintf
(
regexp
,
len
,
"^%s$"
,
my_args
.
name
);
if
(
rc_snp
<
0
||
rc_snp
>=
len
)
{
if
(
rc_snp
<
0
||
rc_snp
>=
len
)
{
ERROR
(
"Name too long
"
);
fprintf
(
stderr
,
"Name too long
\n
"
);
goto
error
;
goto
error
;
}
}
if
(
regcomp
(
&
preg
,
regexp
,
REG_NOSUB
|
REG_EXTENDED
))
{
if
(
regcomp
(
&
preg
,
regexp
,
REG_NOSUB
|
REG_EXTENDED
))
{
ERROR
(
"failed to compile the regex '%s'
"
,
my_args
.
name
);
fprintf
(
stderr
,
"failed to compile the regex '%s'
\n
"
,
my_args
.
name
);
goto
error
;
goto
error
;
}
}
fds
=
malloc
(
my_args
.
lxcpath_cnt
*
sizeof
(
struct
pollfd
));
fds
=
malloc
(
my_args
.
lxcpath_cnt
*
sizeof
(
struct
pollfd
));
if
(
!
fds
)
{
if
(
!
fds
)
{
SYSERROR
(
"out of memory
"
);
fprintf
(
stderr
,
"out of memory
\n
"
);
goto
cleanup
;
goto
cleanup
;
}
}
...
...
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