aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um/drivers/mconsole_user.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/um/drivers/mconsole_user.c')
-rw-r--r--arch/um/drivers/mconsole_user.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/arch/um/drivers/mconsole_user.c b/arch/um/drivers/mconsole_user.c
index 9bfd405c3bd8..5b2f5fe9e426 100644
--- a/arch/um/drivers/mconsole_user.c
+++ b/arch/um/drivers/mconsole_user.c
@@ -16,6 +16,7 @@
16#include "user.h" 16#include "user.h"
17#include "mconsole.h" 17#include "mconsole.h"
18#include "umid.h" 18#include "umid.h"
19#include "user_util.h"
19 20
20static struct mconsole_command commands[] = { 21static struct mconsole_command commands[] = {
21 /* With uts namespaces, uts information becomes process-specific, so 22 /* With uts namespaces, uts information becomes process-specific, so
@@ -65,14 +66,14 @@ static struct mconsole_command *mconsole_parse(struct mc_request *req)
65 struct mconsole_command *cmd; 66 struct mconsole_command *cmd;
66 int i; 67 int i;
67 68
68 for(i=0;i<sizeof(commands)/sizeof(commands[0]);i++){ 69 for(i = 0; i < ARRAY_SIZE(commands); i++){
69 cmd = &commands[i]; 70 cmd = &commands[i];
70 if(!strncmp(req->request.data, cmd->command, 71 if(!strncmp(req->request.data, cmd->command,
71 strlen(cmd->command))){ 72 strlen(cmd->command))){
72 return(cmd); 73 return cmd;
73 } 74 }
74 } 75 }
75 return(NULL); 76 return NULL;
76} 77}
77 78
78#define MIN(a,b) ((a)<(b) ? (a):(b)) 79#define MIN(a,b) ((a)<(b) ? (a):(b))