[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [PATCH 2/4 V4] util: add virtkey



On 07/13/2011 09:32 PM, Lai Jiangshan wrote:
Add virtkey lib for usage-improvment and keycode translating.
Add 4 internal API for the aim

const char *virKeycodeSetTypeToString(int codeset);
int virKeycodeSetTypeFromString(const char *name);
int virParseKeyName(virKeycodeSet codeset, const char *keyname);
int virTranslateKeyCode(virKeycodeSet from_codeset,
                         virKeycodeSet to_offset,
                         int key_value);

Signed-off-by: Lai Jiangshan<laijs cn fujitsu com>
+++ b/src/util/virtkey.c
@@ -0,0 +1,117 @@
+
+/*
+ * Copyright (c) 2011 Lai Jiangshan
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 as published by
+ * the Free Software Foundation.
+ */

Incomplete copyright header.

+
+#include "virtkey.h"

C files should include <config.h> first, themselves.

--- /dev/null
+++ b/src/util/virtkey.h
@@ -0,0 +1,41 @@
+#ifndef __UTIL_VIRTKEY_H__
+#define __UTIL_VIRTKEY_H__

Copyright header should come before double-inclusion guard.

+
+/*
+ * Copyright (c) 2011 Lai Jiangshan
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 as published by
+ * the Free Software Foundation.
+ */

Incomplete header.

+
+#include<config.h>

No header should include <config.h> - it should have already been included by every .c file.

diff --git a/src/util/virtkeymap-gen.py b/src/util/virtkeymap-gen.py
new file mode 100644

.py files should be mode 100755 (basically, chmod +x).

--
Eric Blake   eblake redhat com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]