summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJamey Sharp <jamey@minilop.net>2010-05-21 14:21:52 -0700
committerJamey Sharp <jamey@minilop.net>2011-09-18 20:11:43 -0500
commitd423012e776a81a197cde86be5c6bd471a593c39 (patch)
tree3a47063586b8bf2268847ef670f322159cd5d486
parentd8d99e14b1241fd8c099d69b8d0ed0817585fe8d (diff)
dmx: Fix a non-constant printf format string warning.
Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r--hw/dmx/input/lnx-keyboard.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/dmx/input/lnx-keyboard.c b/hw/dmx/input/lnx-keyboard.c
index 5bfb8813c..5b92f3b8f 100644
--- a/hw/dmx/input/lnx-keyboard.c
+++ b/hw/dmx/input/lnx-keyboard.c
@@ -429,11 +429,11 @@ static int kbdLinuxOpenVT(int vtno)
{
int fd = -1;
int i;
- const char *vcs[] = { "/dev/vc/%d", "/dev/tty%d", NULL };
+ const char *vcs[] = { "/dev/vc/", "/dev/tty", NULL };
char name[64]; /* RATS: Only used in XmuSnprintf */
for (i = 0; vcs[i]; i++) {
- XmuSnprintf(name, sizeof(name), vcs[i], vtno);
+ XmuSnprintf(name, sizeof(name), "%s%d", vcs[i], vtno);
if ((fd = open(name, O_RDWR | O_NONBLOCK, 0)) >= 0) break;
}
if (fd < 0)