diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 13:49:04 -0700 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 17:38:18 -0700 |
commit | 56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch) | |
tree | 3f91093cdb475e565ae857f1c5a7fd339e2d781e /app-laptop/easy-slow-down-manager | |
download | gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2 gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip |
proj/gentoo: Initial commit
This commit represents a new era for Gentoo:
Storing the gentoo-x86 tree in Git, as converted from CVS.
This commit is the start of the NEW history.
Any historical data is intended to be grafted onto this point.
Creation process:
1. Take final CVS checkout snapshot
2. Remove ALL ChangeLog* files
3. Transform all Manifests to thin
4. Remove empty Manifests
5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$
5.1. Do not touch files with -kb/-ko keyword flags.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests
X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project
X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration
X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn
X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts
X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration
X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging
X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'app-laptop/easy-slow-down-manager')
5 files changed, 265 insertions, 0 deletions
diff --git a/app-laptop/easy-slow-down-manager/Manifest b/app-laptop/easy-slow-down-manager/Manifest new file mode 100644 index 000000000000..eec1f21b4c16 --- /dev/null +++ b/app-laptop/easy-slow-down-manager/Manifest @@ -0,0 +1 @@ +DIST easy-slow-down-manager-0.3.tar.gz 5636 SHA256 c9296226d4e0d41955988d0dbd7f143ff2e06a40744705c78f89f9a51c1c0253 SHA512 9974fb3af48a529f050aa5730988614a91b615e3fd2e5b6edc5b70ac6a1faffb4f4a1423cb634aff671dc7228bb70be8ef150c274bf57895048fae5566aac77a WHIRLPOOL 8820c937e308b940f58fe7c0132394a17b0d6e78844b0b72757f8f8f76c000a548fb291a508b8e803460ba75c745ce045f54541480f25756c976129d64236ff0 diff --git a/app-laptop/easy-slow-down-manager/easy-slow-down-manager-0.3.ebuild b/app-laptop/easy-slow-down-manager/easy-slow-down-manager-0.3.ebuild new file mode 100644 index 000000000000..9f55f7f06a9a --- /dev/null +++ b/app-laptop/easy-slow-down-manager/easy-slow-down-manager-0.3.ebuild @@ -0,0 +1,33 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 +inherit eutils linux-mod + +DESCRIPTION="provides Linux users with functionality similar to Samsung Easy Speed Up Manager" +HOMEPAGE="http://code.google.com/p/easy-slow-down-manager/" +SRC_URI="http://${PN}.googlecode.com/files/${P}.tar.gz" + +LICENSE="GPL-1" +SLOT="0" +KEYWORDS="amd64 x86" +IUSE="" + +S=${WORKDIR} + +BUILD_TARGETS="all" +MODULE_NAMES="samsung-backlight() easy_slow_down_manager()" + +src_prepare() { + get_version + if kernel_is -ge 3 10; then + epatch "${FILESDIR}"/${P}-kernel-3.10-1.patch + fi + epatch "${FILESDIR}"/${P}-kv_dir.patch +} + +src_compile() { + BUILD_PARAMS="KERN_DIR=${KV_DIR}" + linux-mod_src_compile +} diff --git a/app-laptop/easy-slow-down-manager/files/easy-slow-down-manager-0.3-kernel-3.10-1.patch b/app-laptop/easy-slow-down-manager/files/easy-slow-down-manager-0.3-kernel-3.10-1.patch new file mode 100644 index 000000000000..272143eeea3b --- /dev/null +++ b/app-laptop/easy-slow-down-manager/files/easy-slow-down-manager-0.3-kernel-3.10-1.patch @@ -0,0 +1,205 @@ +diff --git a/easy_slow_down_manager.c b/easy_slow_down_manager.c +index 7b2d1e9..1336557 100644 +--- a/easy_slow_down_manager.c ++++ b/easy_slow_down_manager.c +@@ -4,6 +4,7 @@ + #include <linux/proc_fs.h> + #include <linux/pci.h> + #include <linux/delay.h> ++#include <linux/version.h> + #include <asm/uaccess.h> + #include <linux/dmi.h> + +@@ -101,7 +102,7 @@ MODULE_PARM_DESC(debug, "Verbose output"); + int sabi_exec_command(u8 command, u8 data, struct sabi_retval *sretval) + { + int retval = 0; +- ++ + mutex_lock(&sabi_mutex); + + /* enable memory to be able to write to it */ +@@ -141,22 +142,25 @@ int sabi_exec_command(u8 command, u8 data, struct sabi_retval *sretval) + return retval; + } + +-int easy_slow_down_read(char *page, char **start, off_t off, +- int count, int *eof, void *data) { ++ssize_t easy_slow_down_read(struct file *filp, char __user *buffer, ++ size_t length, loff_t *off) { + struct sabi_retval sretval; +- +- if (off > 0) { +- *eof = 1; +- } +- else if (!sabi_exec_command(SABI_GET_ETIQUETTE_MODE, 0, &sretval)) { +- page[0] = sretval.retval[0] + '0'; ++ ++ if (*off > 0) ++ return 0; ++ ++ if (!sabi_exec_command(SABI_GET_ETIQUETTE_MODE, 0, &sretval)) { ++ char mode = sretval.retval[0] + '0'; ++ if (copy_to_user(buffer, &mode, 1)) ++ return -EFAULT; ++ (*off)++; + return 1; + } + return 0; + } + +-int easy_slow_down_write(struct file *file, const char __user *buffer, +- unsigned long count, void *data) { ++ssize_t easy_slow_down_write(struct file *filp, const char __user *buffer, ++ size_t count, loff_t *off) { + char mode = '0'; + if (copy_from_user(&mode, buffer, 1)) { + return -EFAULT; +@@ -167,22 +171,25 @@ int easy_slow_down_write(struct file *file, const char __user *buffer, + return count; + } + +-int easy_backlight_read(char *page, char **start, off_t off, +- int count, int *eof, void *data) { ++ssize_t easy_backlight_read(struct file *filp, char __user *buffer, ++ size_t length, loff_t *off) { + struct sabi_retval sretval; +- +- if (off > 0) { +- *eof = 1; +- } +- else if (!sabi_exec_command(SABI_GET_BACKLIGHT, 0, &sretval)) { +- page[0] = sretval.retval[0] + '0'; ++ ++ if (*off > 0) ++ return 0; ++ ++ if (!sabi_exec_command(SABI_GET_BACKLIGHT, 0, &sretval)) { ++ char mode = sretval.retval[0] + '0'; ++ if (copy_to_user(buffer, &mode, 1)) ++ return -EFAULT; ++ (*off)++; + return 1; + } + return 0; + } + +-int easy_backlight_write(struct file *file, const char __user *buffer, +- unsigned long count, void *data) { ++ssize_t easy_backlight_write(struct file *file, const char __user *buffer, ++ size_t count, loff_t *off) { + char mode = '0'; + if (copy_from_user(&mode, buffer, 1)) { + return -EFAULT; +@@ -193,22 +200,25 @@ int easy_backlight_write(struct file *file, const char __user *buffer, + return count; + } + +-int easy_wifi_kill_read(char *page, char **start, off_t off, +- int count, int *eof, void *data) { ++ssize_t easy_wifi_kill_read(struct file *filp, char __user *buffer, ++ size_t length, loff_t *off) { + struct sabi_retval sretval; +- +- if (off > 0) { +- *eof = 1; +- } +- else if (!sabi_exec_command(SABI_GET_WIRELESS_BUTTON, 0, &sretval)) { +- page[0] = sretval.retval[0] + '0'; ++ ++ if (*off > 0) ++ return 0; ++ ++ if (!sabi_exec_command(SABI_GET_WIRELESS_BUTTON, 0, &sretval)) { ++ char mode = sretval.retval[0] + '0'; ++ if (copy_to_user(buffer, &mode, 1)) ++ return -EFAULT; ++ (*off)++; + return 1; + } + return 0; + } + +-int easy_wifi_kill_write(struct file *file, const char __user *buffer, +- unsigned long count, void *data) { ++ssize_t easy_wifi_kill_write(struct file *file, const char __user *buffer, ++ size_t count, loff_t *off) { + char mode = '0'; + if (copy_from_user(&mode, buffer, 1)) { + return -EFAULT; +@@ -219,8 +229,26 @@ int easy_wifi_kill_write(struct file *file, const char __user *buffer, + return count; + } + ++static const struct file_operations proc_fops_slow_down = { ++ .owner = THIS_MODULE, ++ .read = easy_slow_down_read, ++ .write = easy_slow_down_write ++}; ++ ++static const struct file_operations proc_fops_wifi_kill = { ++ .owner = THIS_MODULE, ++ .read = easy_wifi_kill_read, ++ .write = easy_wifi_kill_write ++}; ++ ++static const struct file_operations proc_fops_backlight = { ++ .owner = THIS_MODULE, ++ .read = easy_backlight_read, ++ .write = easy_backlight_write ++}; ++ + int __init easy_slow_down_init(void) { +- ++ + const char *test_str = "SwSmi@"; + int pos; + int index = 0; +@@ -290,19 +318,15 @@ int __init easy_slow_down_init(void) { + } + + +- proc_entry_slow_down = create_proc_entry("easy_slow_down_manager", 0666, NULL); ++ proc_entry_slow_down = proc_create("easy_slow_down_manager", 0666, NULL, &proc_fops_slow_down); + if (proc_entry_slow_down == NULL) { + printk(KERN_INFO "Easy slow down manager: Couldn't create proc entry\n"); + iounmap(sabi_iface); + iounmap(f0000_segment); + return -ENOMEM; + } +- else { +- proc_entry_slow_down->read_proc = easy_slow_down_read; +- proc_entry_slow_down->write_proc = easy_slow_down_write; +- } + +- proc_entry_wifi_kill = create_proc_entry("easy_wifi_kill", 0666, NULL); ++ proc_entry_wifi_kill = proc_create("easy_wifi_kill", 0666, NULL, &proc_fops_wifi_kill); + if (proc_entry_wifi_kill == NULL) { + printk(KERN_INFO "Easy slow down manager: Couldn't create proc entry\n"); + remove_proc_entry("easy_slow_down_manager", NULL); +@@ -310,12 +334,8 @@ int __init easy_slow_down_init(void) { + iounmap(f0000_segment); + return -ENOMEM; + } +- else { +- proc_entry_wifi_kill->read_proc = easy_wifi_kill_read; +- proc_entry_wifi_kill->write_proc = easy_wifi_kill_write; +- } +- +- proc_entry_backlight = create_proc_entry("easy_backlight", 0666, NULL); ++ ++ proc_entry_backlight = proc_create("easy_backlight", 0666, NULL, &proc_fops_backlight); + if (proc_entry_backlight == NULL) { + printk(KERN_INFO "Easy slow down manager: Couldn't create proc entry\n"); + remove_proc_entry("easy_slow_down_manager", NULL); +@@ -324,10 +344,6 @@ int __init easy_slow_down_init(void) { + iounmap(f0000_segment); + return -ENOMEM; + } +- else { +- proc_entry_backlight->read_proc = easy_backlight_read; +- proc_entry_backlight->write_proc = easy_backlight_write; +- } + return 0; + } + diff --git a/app-laptop/easy-slow-down-manager/files/easy-slow-down-manager-0.3-kv_dir.patch b/app-laptop/easy-slow-down-manager/files/easy-slow-down-manager-0.3-kv_dir.patch new file mode 100644 index 000000000000..1f8ab6fbb46f --- /dev/null +++ b/app-laptop/easy-slow-down-manager/files/easy-slow-down-manager-0.3-kv_dir.patch @@ -0,0 +1,16 @@ +diff --git a/Makefile b/Makefile +index 60a649c..fbdc332 100644 +--- a/Makefile ++++ b/Makefile +@@ -1,8 +1,8 @@ + obj-m := easy_slow_down_manager.o samsung-backlight.o +-KVERSION = $(shell uname -r) ++KERN_DIR=/usr/src/linux + + all: +- $(MAKE) -C /lib/modules/$(KVERSION)/build M=$(PWD) modules ++ $(MAKE) -C /$(KERN_DIR) M=$(PWD) modules + + clean: +- $(MAKE) -C /lib/modules/$(KVERSION)/build M=$(PWD) clean ++ $(MAKE) -C /$(KERN_DIR) M=$(PWD) clean diff --git a/app-laptop/easy-slow-down-manager/metadata.xml b/app-laptop/easy-slow-down-manager/metadata.xml new file mode 100644 index 000000000000..b3ced0ed9e9a --- /dev/null +++ b/app-laptop/easy-slow-down-manager/metadata.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer> + <email>maintainer-needed@gentoo.org</email> + </maintainer> + <upstream> + <remote-id type="google-code">easy-slow-down-manager</remote-id> + </upstream> +</pkgmetadata> |