Skip to content

Commit

Permalink
Add a detailed message when tap device add fails
Browse files Browse the repository at this point in the history
Added a more detailed error message when adding a tap devices fails and
the kernel is missing tun support.

Signed-off-by: Doug Goldstein <[email protected]>
  • Loading branch information
cardoe authored and ebblake committed Aug 10, 2010
1 parent c0b0e8d commit efdd0ff
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/uml/uml_conf.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* uml_conf.c: UML driver configuration
*
* Copyright (C) 2006-2009 Red Hat, Inc.
* Copyright (C) 2006-2010 Red Hat, Inc.
* Copyright (C) 2006 Daniel P. Berrange
*
* This library is free software; you can redistribute it and/or
Expand Down Expand Up @@ -146,6 +146,11 @@ umlConnectTapDevice(virDomainNetDefPtr net,
umlReportError(VIR_ERR_INTERNAL_ERROR,
_("Failed to add tap interface to bridge. "
"%s is not a bridge device"), bridge);
} else if (err == ENOENT) {
virReportSystemError(err, "%s",
_("Failed to add tap interface to bridge. Your kernel "
"is missing the 'tun' module or CONFIG_TUN, or you need "
"to add the /dev/net/tun device node."));
} else if (template_ifname) {
virReportSystemError(err,
_("Failed to add tap interface to bridge '%s'"),
Expand Down

0 comments on commit efdd0ff

Please sign in to comment.