Skip to contentSkip to conversation

Improve error message of xm console command

PATCH Applied Masaki Kanno 2 participants 2 messages Sep 4, 2006 – Sep 5, 2006

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Improve error message of xm console command

Hi,

When I tested xm console command, I saw the following error message.

# xm console Domain-0
xenconsole: Could not read tty from store: No such file or directory

This error message made me think that an internal error occurred in xenconsole. After examining the source code, I found that it should be a message telling that Domain-0 was a wrong argument for xm console.

This patch improves error message of xm console command.

# xm console Domain-0
Can't specify Domain-0

Best regards,
Kan

tools/console/client/main.c +2 -1
diff -r 5fa9b746d24f tools/console/client/main.c
@@ -220,7 +220,8 @@ int main(int argc, char **argv)
 	   user friendly, we'll bail out here since no data will ever show
 	   up on domain-0. */
 	if (domid == 0) {
-		err(errno, "Could not read tty from store");
+		fprintf(stderr, "Can't specify Domain-0\n");
+		exit(EINVAL);
 	}
 
 	/* Wait a little bit for tty to appear.  There is a race

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

Applied
#1 lore raw

On Mon, Sep 04, 2006 at 05:12:05PM +0900, Masaki Kanno wrote:

Content-Description: Mail message body

Quoted 13 lines

Hi,

When I tested xm console command, I saw the following error message.

# xm console Domain-0
xenconsole: Could not read tty from store: No such file or directory

This error message made me think that an internal error occurred in xenconsole. After examining the source code, I found that it should be a message telling that Domain-0 was a wrong argument for xm console.

Quoted 6 lines

This patch improves error message of xm console command.

# xm console Domain-0
Can't specify Domain-0

Applied, thank you.

Ewan.