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
5a537be5
Commit
5a537be5
authored
Apr 28, 2016
by
Christian Brauner
Committed by
Stéphane Graber
May 11, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lxc-ls: non-functional changes
Signed-off-by:
Christian Brauner
<
christian.brauner@mailbox.org
>
parent
65fcb758
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
5 deletions
+11
-5
lxc_ls.c
src/lxc/lxc_ls.c
+11
-5
No files found.
src/lxc/lxc_ls.c
View file @
5a537be5
...
...
@@ -16,7 +16,8 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#define _GNU_SOURCE
#include "config.h"
#include <getopt.h>
#include <regex.h>
#include <stdbool.h>
...
...
@@ -24,18 +25,17 @@
#include <stdlib.h>
#include <string.h>
#include <strings.h>
#include <termios.h>
#include <unistd.h>
#include <sys/ioctl.h>
#include <sys/socket.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <termios.h>
#include <lxc/lxccontainer.h>
#include "arguments.h"
#include "conf.h"
#include "config.h"
#include "confile.h"
#include "log.h"
#include "lxc.h"
...
...
@@ -105,6 +105,7 @@ static char *ls_get_groups(struct lxc_container *c, bool running);
static
char
*
ls_get_ips
(
struct
lxc_container
*
c
,
const
char
*
inet
);
static
int
ls_recv_str
(
int
fd
,
char
**
buf
);
static
int
ls_send_str
(
int
fd
,
const
char
*
buf
);
struct
wrapargs
{
const
struct
lxc_arguments
*
args
;
char
**
grps_must
;
...
...
@@ -114,10 +115,12 @@ struct wrapargs {
const
char
*
parent
;
unsigned
int
nestlvl
;
};
/*
* Takes struct wrapargs as argument.
*/
static
int
ls_get_wrapper
(
void
*
wrap
);
/*
* To calculate swap usage we should not simply check memory.usage_in_bytes and
* memory.memsw.usage_in_bytes and then do:
...
...
@@ -130,21 +133,25 @@ static unsigned int ls_get_term_width(void);
static
char
*
ls_get_interface
(
struct
lxc_container
*
c
);
static
bool
ls_has_all_grps
(
const
char
*
has
,
char
**
must
,
size_t
must_len
);
static
struct
ls
*
ls_new
(
struct
ls
**
ls
,
size_t
*
size
);
/*
* Print user-specified fancy format.
*/
static
void
ls_print_fancy_format
(
struct
ls
*
l
,
struct
lengths
*
lht
,
size_t
size
,
const
char
*
fancy_fmt
);
/*
* Only print names of containers.
*/
static
void
ls_print_names
(
struct
ls
*
l
,
struct
lengths
*
lht
,
size_t
ls_arr
,
size_t
termwidth
);
/*
* Print default fancy format.
*/
static
void
ls_print_table
(
struct
ls
*
l
,
struct
lengths
*
lht
,
size_t
size
);
/*
* id can only be 79 + \0 chars long.
*/
...
...
@@ -309,9 +316,8 @@ static char *ls_get_config_item(struct lxc_container *c, const char *item,
static
void
ls_free_arr
(
char
**
arr
,
size_t
size
)
{
size_t
i
;
for
(
i
=
0
;
i
<
size
;
i
++
)
{
for
(
i
=
0
;
i
<
size
;
i
++
)
free
(
arr
[
i
]);
}
free
(
arr
);
}
...
...
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