diff options
Diffstat (limited to 'arch/um/drivers/mconsole_user.c')
-rw-r--r-- | arch/um/drivers/mconsole_user.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/arch/um/drivers/mconsole_user.c b/arch/um/drivers/mconsole_user.c index 310c1f823f26..4b109fe7fff8 100644 --- a/arch/um/drivers/mconsole_user.c +++ b/arch/um/drivers/mconsole_user.c | |||
@@ -122,12 +122,12 @@ int mconsole_get_request(int fd, struct mc_request *req) | |||
122 | return(1); | 122 | return(1); |
123 | } | 123 | } |
124 | 124 | ||
125 | int mconsole_reply(struct mc_request *req, char *str, int err, int more) | 125 | int mconsole_reply_len(struct mc_request *req, const char *str, int total, |
126 | int err, int more) | ||
126 | { | 127 | { |
127 | struct mconsole_reply reply; | 128 | struct mconsole_reply reply; |
128 | int total, len, n; | 129 | int len, n; |
129 | 130 | ||
130 | total = strlen(str); | ||
131 | do { | 131 | do { |
132 | reply.err = err; | 132 | reply.err = err; |
133 | 133 | ||
@@ -155,6 +155,12 @@ int mconsole_reply(struct mc_request *req, char *str, int err, int more) | |||
155 | return(0); | 155 | return(0); |
156 | } | 156 | } |
157 | 157 | ||
158 | int mconsole_reply(struct mc_request *req, const char *str, int err, int more) | ||
159 | { | ||
160 | return mconsole_reply_len(req, str, strlen(str), err, more); | ||
161 | } | ||
162 | |||
163 | |||
158 | int mconsole_unlink_socket(void) | 164 | int mconsole_unlink_socket(void) |
159 | { | 165 | { |
160 | unlink(mconsole_socket_name); | 166 | unlink(mconsole_socket_name); |