mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-08-03 21:21:39 +00:00
Fixed bad variable type
From: Daniel Lezcano <daniel.lezcano@free.fr> Fixed the type of the opt variable. On the powerpc architecture, that leads to an infinite loop in the getopt inspection because getopt returns 255 instead of -1 as expected. The opt variable should be an int and not a char. Signed-off-by: Daniel Lezcano <daniel.lezcano@free.fr> Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
This commit is contained in:
parent
6b621e0318
commit
64870cda2a
@ -80,7 +80,7 @@ setcap cap_net_admin,cap_net_raw,cap_sys_admin,cap_dac_override=ep \
|
||||
setcap cap_net_admin,cap_net_raw,cap_sys_admin,cap_dac_override=ep \
|
||||
%{_bindir}/lxc-unshare && \
|
||||
setcap cap_sys_admin=ep \
|
||||
%{_bindir}/lxc-init &&
|
||||
%{_bindir}/lxc-init && \
|
||||
setcap cap_sys_admin=ep \
|
||||
%{_bindir}/lxc-netstat
|
||||
|
||||
|
@ -37,7 +37,7 @@ void usage(char *cmd)
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
char opt;
|
||||
int opt;
|
||||
char *name = NULL, *subsystem = NULL, *value = NULL;
|
||||
int nbargs = 0;
|
||||
|
||||
|
@ -36,7 +36,7 @@ void usage(char *cmd)
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
char opt;
|
||||
int opt;
|
||||
char *name = NULL;
|
||||
int stop = 0;
|
||||
int nbargs = 0;
|
||||
|
@ -50,8 +50,8 @@ void usage(char *cmd)
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
char opt;
|
||||
char *name = NULL;
|
||||
int opt;
|
||||
int ttynum = 0;
|
||||
int nbargs = 0;
|
||||
int master = -1;
|
||||
|
@ -36,8 +36,8 @@ void usage(char *cmd)
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
char opt;
|
||||
char *name = NULL;
|
||||
int opt;
|
||||
int nbargs = 0;
|
||||
int err;
|
||||
|
||||
|
@ -43,10 +43,10 @@ void usage(char *cmd)
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
char opt;
|
||||
char *name = NULL, *file = NULL;
|
||||
static char **args;
|
||||
char path[MAXPATHLEN];
|
||||
int opt;
|
||||
int nbargs = 0;
|
||||
int autodestroy = 0;
|
||||
int ret = 1;
|
||||
|
@ -37,8 +37,8 @@ void usage(char *cmd)
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
char opt;
|
||||
char *name = NULL;
|
||||
int opt;
|
||||
int nbargs = 0;
|
||||
|
||||
while ((opt = getopt(argc, argv, "n:")) != -1) {
|
||||
|
@ -36,9 +36,8 @@ void usage(char *cmd)
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
char opt;
|
||||
char *name = NULL;
|
||||
int state, nbargs = 0;
|
||||
int opt, state, nbargs = 0;
|
||||
|
||||
while ((opt = getopt(argc, argv, "n:")) != -1) {
|
||||
switch (opt) {
|
||||
|
@ -38,11 +38,11 @@ void usage(char *cmd)
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
char opt, *name = NULL;
|
||||
char *name = NULL;
|
||||
char *regexp;
|
||||
struct lxc_msg msg;
|
||||
regex_t preg;
|
||||
int fd;
|
||||
int fd, opt;
|
||||
|
||||
while ((opt = getopt(argc, argv, "n:")) != -1) {
|
||||
switch (opt) {
|
||||
|
@ -38,9 +38,8 @@ void usage(char *cmd)
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
char opt;
|
||||
char *name = NULL, *priority = NULL;
|
||||
int prio, nbargs = 0;
|
||||
int opt, prio, nbargs = 0;
|
||||
|
||||
while ((opt = getopt(argc, argv, "p:n:")) != -1) {
|
||||
switch (opt) {
|
||||
|
@ -36,9 +36,8 @@ void usage(char *cmd)
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
char opt;
|
||||
char *name = NULL;
|
||||
int nbargs = 0;
|
||||
int opt, nbargs = 0;
|
||||
|
||||
while ((opt = getopt(argc, argv, "n:")) != -1) {
|
||||
switch (opt) {
|
||||
|
@ -45,10 +45,9 @@ void usage(char *cmd)
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
char opt;
|
||||
char *name = NULL;
|
||||
char **args;
|
||||
int err = LXC_ERROR_INTERNAL, nbargs = 0;
|
||||
int opt, err = LXC_ERROR_INTERNAL, nbargs = 0;
|
||||
struct termios tios;
|
||||
|
||||
char *default_args[] = {
|
||||
|
@ -36,9 +36,8 @@ void usage(char *cmd)
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
char opt;
|
||||
char *name = NULL;
|
||||
int err, nbargs = 0;
|
||||
int opt, err, nbargs = 0;
|
||||
|
||||
while ((opt = getopt(argc, argv, "n:")) != -1) {
|
||||
switch (opt) {
|
||||
|
@ -36,9 +36,8 @@ void usage(char *cmd)
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
char opt;
|
||||
char *name = NULL;
|
||||
int nbargs = 0;
|
||||
int opt, nbargs = 0;
|
||||
|
||||
while ((opt = getopt(argc, argv, "n:")) != -1) {
|
||||
switch (opt) {
|
||||
|
@ -50,8 +50,8 @@ void usage(char *cmd)
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
int nbargs = 0, status = 1, hastofork = 0;
|
||||
char **args, opt;
|
||||
int opt, nbargs = 0, status = 1, hastofork = 0;
|
||||
char **args;
|
||||
long flags = 0;
|
||||
uid_t uid;
|
||||
pid_t pid;
|
||||
|
@ -58,9 +58,9 @@ static int fillwaitedstates(char *strstates, int *states)
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
char opt, *name = NULL, *states = NULL;
|
||||
char *name = NULL, *states = NULL;
|
||||
struct lxc_msg msg;
|
||||
int s[MAX_STATE] = { }, fd;
|
||||
int s[MAX_STATE] = { }, fd, opt;
|
||||
|
||||
while ((opt = getopt(argc, argv, "s:n:")) != -1) {
|
||||
switch (opt) {
|
||||
|
Loading…
Reference in New Issue
Block a user