mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-11-17 19:59:25 +02:00
[package] hotplug2: Refresh patches
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@20685 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
6c5b5ef769
commit
f0469e5857
@ -1,7 +1,6 @@
|
|||||||
diff -x '*~' -Naur hotplug2-201/rules/command.c hotplug2-201.patched/rules/command.c
|
--- a/rules/command.c
|
||||||
--- hotplug2-201/rules/command.c 2009-12-09 20:44:13.000000000 +0200
|
+++ b/rules/command.c
|
||||||
+++ hotplug2-201.patched/rules/command.c 2010-03-31 17:24:09.000000000 +0300
|
@@ -374,9 +374,9 @@ RULES_COMMAND_F(cmd_firmware) {
|
||||||
@@ -374,9 +374,9 @@
|
|
||||||
if (firmware == NULL)
|
if (firmware == NULL)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
diff -x '*~' -Naur hotplug2-201/rules/command.c hotplug2-201.patched/rules/command.c
|
--- a/rules/command.c
|
||||||
--- hotplug2-201/rules/command.c 2010-03-31 17:14:44.000000000 +0300
|
+++ b/rules/command.c
|
||||||
+++ hotplug2-201.patched/rules/command.c 2010-03-31 17:14:51.000000000 +0300
|
@@ -385,13 +385,13 @@ RULES_COMMAND_F(cmd_firmware) {
|
||||||
@@ -385,13 +385,13 @@
|
|
||||||
|
|
||||||
infp = fopen(firmware_path, "r");
|
infp = fopen(firmware_path, "r");
|
||||||
if (infp == NULL) {
|
if (infp == NULL) {
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
diff -x '*~' -Naur hotplug2-201/action.c hotplug2-201.patched/action.c
|
--- a/action.c
|
||||||
--- hotplug2-201/action.c 2010-04-01 04:48:10.000000000 +0300
|
+++ b/action.c
|
||||||
+++ hotplug2-201.patched/action.c 2010-04-01 04:53:49.000000000 +0300
|
@@ -39,7 +39,7 @@ static void action_dumb(const struct set
|
||||||
@@ -39,7 +39,7 @@
|
|
||||||
* Returns: Newly allocated string in "key=value" form
|
* Returns: Newly allocated string in "key=value" form
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@ -10,9 +9,8 @@ diff -x '*~' -Naur hotplug2-201/action.c hotplug2-201.patched/action.c
|
|||||||
size_t keylen, vallen;
|
size_t keylen, vallen;
|
||||||
char *combined;
|
char *combined;
|
||||||
|
|
||||||
diff -x '*~' -Naur hotplug2-201/action.h hotplug2-201.patched/action.h
|
--- a/action.h
|
||||||
--- hotplug2-201/action.h 2009-12-09 20:44:14.000000000 +0200
|
+++ b/action.h
|
||||||
+++ hotplug2-201.patched/action.h 2010-04-01 04:54:14.000000000 +0300
|
|
||||||
@@ -12,5 +12,6 @@
|
@@ -12,5 +12,6 @@
|
||||||
#include "settings.h"
|
#include "settings.h"
|
||||||
|
|
||||||
@ -20,10 +18,9 @@ diff -x '*~' -Naur hotplug2-201/action.h hotplug2-201.patched/action.h
|
|||||||
+char* alloc_env(const char *, const char *);
|
+char* alloc_env(const char *, const char *);
|
||||||
#endif /* ifndef ACTION_H */
|
#endif /* ifndef ACTION_H */
|
||||||
|
|
||||||
diff -x '*~' -Naur hotplug2-201/workers/worker_fork.c hotplug2-201.patched/workers/worker_fork.c
|
--- a/workers/worker_fork.c
|
||||||
--- hotplug2-201/workers/worker_fork.c 2010-04-01 04:52:26.000000000 +0300
|
+++ b/workers/worker_fork.c
|
||||||
+++ hotplug2-201.patched/workers/worker_fork.c 2010-04-01 04:51:49.000000000 +0300
|
@@ -380,6 +380,7 @@ static void worker_fork_deinit(void *in_
|
||||||
@@ -380,6 +380,7 @@
|
|
||||||
|
|
||||||
|
|
||||||
static int worker_fork_process(void *in_ctx, struct uevent_t *uevent) {
|
static int worker_fork_process(void *in_ctx, struct uevent_t *uevent) {
|
||||||
@ -31,7 +28,7 @@ diff -x '*~' -Naur hotplug2-201/workers/worker_fork.c hotplug2-201.patched/worke
|
|||||||
int i;
|
int i;
|
||||||
struct worker_fork_child_t *child;
|
struct worker_fork_child_t *child;
|
||||||
struct worker_fork_ctx_t *ctx = in_ctx;
|
struct worker_fork_ctx_t *ctx = in_ctx;
|
||||||
@@ -406,6 +407,12 @@
|
@@ -406,6 +407,12 @@ static int worker_fork_process(void *in_
|
||||||
* No child process is currently available.
|
* No child process is currently available.
|
||||||
*/
|
*/
|
||||||
if (child == NULL) {
|
if (child == NULL) {
|
||||||
@ -44,7 +41,7 @@ diff -x '*~' -Naur hotplug2-201/workers/worker_fork.c hotplug2-201.patched/worke
|
|||||||
/*
|
/*
|
||||||
* Are the matching rules trivial enough that we
|
* Are the matching rules trivial enough that we
|
||||||
* can execute them in the main process?
|
* can execute them in the main process?
|
||||||
@@ -421,6 +428,12 @@
|
@@ -421,6 +428,12 @@ static int worker_fork_process(void *in_
|
||||||
*/
|
*/
|
||||||
if (ctx->children_count < ctx->max_children)
|
if (ctx->children_count < ctx->max_children)
|
||||||
child = worker_fork_spawn(ctx);
|
child = worker_fork_spawn(ctx);
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
diff -x '*~' -ur hotplug2-201/uevent.c hotplug2-201.patched/uevent.c
|
--- a/uevent.c
|
||||||
--- hotplug2-201/uevent.c 2009-12-09 20:44:14.000000000 +0200
|
+++ b/uevent.c
|
||||||
+++ hotplug2-201.patched/uevent.c 2010-04-02 23:03:11.000000000 +0300
|
@@ -132,6 +132,8 @@ struct uevent_t *uevent_dup(const struct
|
||||||
@@ -132,6 +132,8 @@
|
|
||||||
|
|
||||||
dest = xmalloc(sizeof(struct uevent_t));
|
dest = xmalloc(sizeof(struct uevent_t));
|
||||||
dest->action = src->action;
|
dest->action = src->action;
|
||||||
@ -10,9 +9,8 @@ diff -x '*~' -ur hotplug2-201/uevent.c hotplug2-201.patched/uevent.c
|
|||||||
dest->env_vars_c = src->env_vars_c;
|
dest->env_vars_c = src->env_vars_c;
|
||||||
dest->env_vars = xmalloc(sizeof(struct env_var_t) * dest->env_vars_c);
|
dest->env_vars = xmalloc(sizeof(struct env_var_t) * dest->env_vars_c);
|
||||||
dest->plain_s = src->plain_s;
|
dest->plain_s = src->plain_s;
|
||||||
diff -x '*~' -ur hotplug2-201/workers/worker_fork.c hotplug2-201.patched/workers/worker_fork.c
|
--- a/workers/worker_fork.c
|
||||||
--- hotplug2-201/workers/worker_fork.c 2010-04-03 17:02:15.000000000 +0300
|
+++ b/workers/worker_fork.c
|
||||||
+++ hotplug2-201.patched/workers/worker_fork.c 2010-04-03 17:04:27.000000000 +0300
|
|
||||||
@@ -1,6 +1,69 @@
|
@@ -1,6 +1,69 @@
|
||||||
#include "worker_fork.h"
|
#include "worker_fork.h"
|
||||||
|
|
||||||
@ -83,7 +81,7 @@ diff -x '*~' -ur hotplug2-201/workers/worker_fork.c hotplug2-201.patched/workers
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Destroys data structures related to the given child ID (not PID).
|
* Destroys data structures related to the given child ID (not PID).
|
||||||
@@ -315,6 +378,8 @@
|
@@ -315,6 +378,8 @@ static void *worker_fork_init(struct set
|
||||||
struct worker_fork_ctx_t *ctx;
|
struct worker_fork_ctx_t *ctx;
|
||||||
PRINTFUNC();
|
PRINTFUNC();
|
||||||
|
|
||||||
@ -92,7 +90,7 @@ diff -x '*~' -ur hotplug2-201/workers/worker_fork.c hotplug2-201.patched/workers
|
|||||||
ctx = malloc(sizeof(struct worker_fork_ctx_t));
|
ctx = malloc(sizeof(struct worker_fork_ctx_t));
|
||||||
ctx->children = NULL;
|
ctx->children = NULL;
|
||||||
ctx->children_count = 0;
|
ctx->children_count = 0;
|
||||||
@@ -376,6 +441,7 @@
|
@@ -376,6 +441,7 @@ static void worker_fork_deinit(void *in_
|
||||||
free(ctx->children);
|
free(ctx->children);
|
||||||
free(ctx);
|
free(ctx);
|
||||||
global_ctx = NULL;
|
global_ctx = NULL;
|
||||||
@ -100,7 +98,7 @@ diff -x '*~' -ur hotplug2-201/workers/worker_fork.c hotplug2-201.patched/workers
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -384,15 +450,26 @@
|
@@ -384,15 +450,26 @@ static int worker_fork_process(void *in_
|
||||||
int i;
|
int i;
|
||||||
struct worker_fork_child_t *child;
|
struct worker_fork_child_t *child;
|
||||||
struct worker_fork_ctx_t *ctx = in_ctx;
|
struct worker_fork_ctx_t *ctx = in_ctx;
|
||||||
@ -128,7 +126,7 @@ diff -x '*~' -ur hotplug2-201/workers/worker_fork.c hotplug2-201.patched/workers
|
|||||||
worker_fork_update_children(ctx);
|
worker_fork_update_children(ctx);
|
||||||
|
|
||||||
child = NULL;
|
child = NULL;
|
||||||
@@ -407,9 +484,9 @@
|
@@ -407,9 +484,9 @@ static int worker_fork_process(void *in_
|
||||||
* No child process is currently available.
|
* No child process is currently available.
|
||||||
*/
|
*/
|
||||||
if (child == NULL) {
|
if (child == NULL) {
|
||||||
@ -141,7 +139,7 @@ diff -x '*~' -ur hotplug2-201/workers/worker_fork.c hotplug2-201.patched/workers
|
|||||||
putenv(env[i]);
|
putenv(env[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -418,8 +495,11 @@
|
@@ -418,8 +495,11 @@ static int worker_fork_process(void *in_
|
||||||
* can execute them in the main process?
|
* can execute them in the main process?
|
||||||
*/
|
*/
|
||||||
if (ctx->always_fork == 0 && ctx->settings->dumb == 0 &&
|
if (ctx->always_fork == 0 && ctx->settings->dumb == 0 &&
|
||||||
@ -155,7 +153,7 @@ diff -x '*~' -ur hotplug2-201/workers/worker_fork.c hotplug2-201.patched/workers
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -427,11 +507,11 @@
|
@@ -427,11 +507,11 @@ static int worker_fork_process(void *in_
|
||||||
* We have to fork off a new child.
|
* We have to fork off a new child.
|
||||||
*/
|
*/
|
||||||
if (ctx->children_count < ctx->max_children ||
|
if (ctx->children_count < ctx->max_children ||
|
||||||
@ -170,7 +168,7 @@ diff -x '*~' -ur hotplug2-201/workers/worker_fork.c hotplug2-201.patched/workers
|
|||||||
free(env[i]);
|
free(env[i]);
|
||||||
}
|
}
|
||||||
free(env);
|
free(env);
|
||||||
@@ -442,9 +522,14 @@
|
@@ -442,9 +522,14 @@ static int worker_fork_process(void *in_
|
||||||
*/
|
*/
|
||||||
if (child != NULL) {
|
if (child != NULL) {
|
||||||
child->busy = 1;
|
child->busy = 1;
|
||||||
@ -188,10 +186,9 @@ diff -x '*~' -ur hotplug2-201/workers/worker_fork.c hotplug2-201.patched/workers
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
diff -x '*~' -ur hotplug2-201/workers/worker_fork.h hotplug2-201.patched/workers/worker_fork.h
|
--- a/workers/worker_fork.h
|
||||||
--- hotplug2-201/workers/worker_fork.h 2009-12-09 20:44:13.000000000 +0200
|
+++ b/workers/worker_fork.h
|
||||||
+++ hotplug2-201.patched/workers/worker_fork.h 2010-04-03 01:00:24.000000000 +0300
|
@@ -35,4 +35,9 @@ struct worker_fork_ctx_t {
|
||||||
@@ -35,4 +35,9 @@
|
|
||||||
struct settings_t *settings;
|
struct settings_t *settings;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user