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

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

 



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@xxxxxxxxxxxxxx>
+++ 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@xxxxxxxxxx    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]