summaryrefslogtreecommitdiff
path: root/meta-moblin/packages/sreadahead/sreadahead-0.02
diff options
context:
space:
mode:
Diffstat (limited to 'meta-moblin/packages/sreadahead/sreadahead-0.02')
-rw-r--r--meta-moblin/packages/sreadahead/sreadahead-0.02/readahead_c.patch29
-rw-r--r--meta-moblin/packages/sreadahead/sreadahead-0.02/set_to_idle.patch39
-rw-r--r--meta-moblin/packages/sreadahead/sreadahead-0.02/sreadahead-0.02-make.patch27
3 files changed, 0 insertions, 95 deletions
diff --git a/meta-moblin/packages/sreadahead/sreadahead-0.02/readahead_c.patch b/meta-moblin/packages/sreadahead/sreadahead-0.02/readahead_c.patch
deleted file mode 100644
index a65c1088f..000000000
--- a/meta-moblin/packages/sreadahead/sreadahead-0.02/readahead_c.patch
+++ /dev/null
@@ -1,29 +0,0 @@
----
- readahead.c | 7 +++++--
- 1 file changed, 5 insertions(+), 2 deletions(-)
-
-Index: sreadahead-0.02/readahead.c
-===================================================================
---- sreadahead-0.02.orig/readahead.c 2008-09-23 22:35:20.000000000 +0200
-+++ sreadahead-0.02/readahead.c 2008-10-27 16:27:52.000000000 +0100
-@@ -69,7 +69,11 @@ void *one_thread(void *ptr)
- int main(int argc, char **argv)
- {
- FILE *file = fopen("/etc/readahead.packed", "r");
--
-+ if (!file) {
-+ perror("Couldnt open /etc/readahead.packed");
-+ return -errno;
-+ }
-+
- daemon(0,0);
-
- total_files = fread(&files, sizeof(struct readahead), MAXR, file);
-@@ -81,7 +85,6 @@ int main(int argc, char **argv)
- pthread_create(&three, NULL, one_thread, NULL);
- pthread_create(&four, NULL, one_thread, NULL);
-
-- printf("Waiting\n");
- pthread_join(one, NULL);
- pthread_join(two, NULL);
- pthread_join(three, NULL);
diff --git a/meta-moblin/packages/sreadahead/sreadahead-0.02/set_to_idle.patch b/meta-moblin/packages/sreadahead/sreadahead-0.02/set_to_idle.patch
deleted file mode 100644
index b48659048..000000000
--- a/meta-moblin/packages/sreadahead/sreadahead-0.02/set_to_idle.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-diff -Naurp sreadahead-0.02/readahead.c sreadahead-0.02-nice/readahead.c
---- sreadahead-0.02/readahead.c 2008-11-06 00:57:17.000000000 -0500
-+++ sreadahead-0.02-nice/readahead.c 2008-11-06 02:28:29.000000000 -0500
-@@ -26,7 +26,18 @@
- #include <errno.h>
-
- #include "readahead.h"
-+#include <sys/syscall.h>
-
-+# if defined(__i386__)
-+# define __NR_ioprio_set 289
-+# elif defined(__x86_64__)
-+# define __NR_ioprio_set 251
-+# else
-+# error "Unsupported arch"
-+# endif
-+
-+#define IOPRIO_WHO_PROCESS 1
-+#define IOPRIO_CLASS_SHIFT 13
- #define MAXR 1024
- static struct readahead files[MAXR];
- static unsigned int total_files = 0;
-@@ -68,7 +79,15 @@ void *one_thread(void *ptr)
-
- int main(int argc, char **argv)
- {
-- FILE *file = fopen("/etc/readahead.packed", "r");
-+ int iopriority = 7; /* hard code for idle */
-+ int iopriority_class = 3; /* 3 stands for idle */
-+ int pid = 0;
-+ FILE *file;
-+
-+ if (syscall(__NR_ioprio_set, IOPRIO_WHO_PROCESS, pid, iopriority | iopriority_class << IOPRIO_CLASS_SHIFT) == -1)
-+ perror("Can not set priority to idle class");
-+
-+ file = fopen("/etc/readahead.packed", "r");
- if (!file) {
- perror("Couldnt open /etc/readahead.packed");
- return -errno;
diff --git a/meta-moblin/packages/sreadahead/sreadahead-0.02/sreadahead-0.02-make.patch b/meta-moblin/packages/sreadahead/sreadahead-0.02/sreadahead-0.02-make.patch
deleted file mode 100644
index d0ece663b..000000000
--- a/meta-moblin/packages/sreadahead/sreadahead-0.02/sreadahead-0.02-make.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-diff -Nrup sreadahead-0.02.orig/Makefile sreadahead-0.02/Makefile
---- sreadahead-0.02.orig/Makefile 2008-09-23 22:36:24.000000000 +0200
-+++ sreadahead-0.02/Makefile 2008-09-26 07:43:19.000000000 +0200
-@@ -1,11 +1,18 @@
--all: generate_filelist sreadahead
-+CFLAGS=-Os -g -Wall
-+PROGS=generate_filelist sreadahead
-+
-+all: $(PROGS)
-
-
- generate_filelist: readahead.h filelist.c Makefile
-- gcc -Os -g -Wall -W filelist.c -o generate_filelist
-+ $(CC) $(CFLAGS) -W filelist.c -o generate_filelist
-
- sreadahead: readahead.h readahead.c Makefile
-- gcc -Os -g -Wall -lpthread -W readahead.c -o sreadahead
-+ $(CC) $(CFLAGS) -lpthread -W readahead.c -o sreadahead
-
- clean:
-- rm -f *~ sreadahead generate_filelist
-\ No newline at end of file
-+ rm -f *~ sreadahead generate_filelist
-+
-+install: all
-+ mkdir -p $(DESTDIR)/sbin
-+ install -p -m 755 $(PROGS) $(DESTDIR)/sbin