From 8158e9052afbf2ee47de645167b90b6e7fc7d86d Mon Sep 17 00:00:00 2001 From: John Crispin Date: Sun, 10 Mar 2013 00:55:36 +0100 Subject: [PATCH] add license headers --- instance.c | 16 +++++++++++++++- instance.h | 14 ++++++++++++++ md5.h | 14 ++++++++++++++ service.c | 24 +++++++++++++++++++----- service.h | 14 ++++++++++++++ ubus.c | 18 ++++++++++++++++-- utils.c | 14 ++++++++++++++ utils.h | 14 ++++++++++++++ 8 files changed, 120 insertions(+), 8 deletions(-) diff --git a/instance.c b/instance.c index 2a648d7..b2cdfa1 100644 --- a/instance.c +++ b/instance.c @@ -1,3 +1,17 @@ +/* + * Copyright (C) 2013 Felix Fietkau + * Copyright (C) 2013 John Crispin + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 2.1 + * as published by the Free Software Foundation + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + #include #include #include @@ -90,7 +104,7 @@ instance_start(struct service_instance *in) return; } - LOG("Started instance %s::%s\n", in->srv->name, in->name); + DEBUG(1, "Started instance %s::%s\n", in->srv->name, in->name); in->proc.pid = pid; uloop_process_add(&in->proc); } diff --git a/instance.h b/instance.h index 097f73c..530041c 100644 --- a/instance.h +++ b/instance.h @@ -1,3 +1,17 @@ +/* + * Copyright (C) 2013 Felix Fietkau + * Copyright (C) 2013 John Crispin + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 2.1 + * as published by the Free Software Foundation + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + #ifndef __PROCD_INSTANCE_H #define __PROCD_INSTANCE_H diff --git a/md5.h b/md5.h index 2b9081e..e1731ef 100644 --- a/md5.h +++ b/md5.h @@ -1,3 +1,17 @@ +/* + * Copyright (C) 2013 Felix Fietkau + * Copyright (C) 2013 John Crispin + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 2.1 + * as published by the Free Software Foundation + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + #ifndef __PROCD_MD5_H #define __PROCD_MD5_H diff --git a/service.c b/service.c index e51e399..8083e93 100644 --- a/service.c +++ b/service.c @@ -1,3 +1,17 @@ +/* + * Copyright (C) 2013 Felix Fietkau + * Copyright (C) 2013 John Crispin + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 2.1 + * as published by the Free Software Foundation + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + #include #include "procd.h" #include "service.h" @@ -35,15 +49,15 @@ service_instance_update(struct vlist_tree *tree, struct vlist_node *node_new, in_n = container_of(node_new, struct service_instance, node); if (in_o && in_n) { - LOG("Update instance %s::%s\n", in_o->srv->name, in_o->name); + DEBUG(1, "Update instance %s::%s\n", in_o->srv->name, in_o->name); instance_update(in_o, in_n); instance_free(in_n); } else if (in_o) { - LOG("Free instance %s::%s\n", in_o->srv->name, in_o->name); + DEBUG(1, "Free instance %s::%s\n", in_o->srv->name, in_o->name); instance_stop(in_o, false); instance_free(in_o); } else if (in_n) { - LOG("Create instance %s::%s\n", in_n->srv->name, in_n->name); + DEBUG(1, "Create instance %s::%s\n", in_n->srv->name, in_n->name); instance_start(in_n); } } @@ -148,11 +162,11 @@ service_handle_set(struct ubus_context *ctx, struct ubus_object *obj, s = avl_find_element(&services, name, s, avl); if (s) { - LOG("Update service %s\n", name); + DEBUG(1, "Update service %s\n", name); return service_update(s, msg, tb, add); } - LOG("Create service %s\n", name); + DEBUG(1, "Create service %s\n", name); s = service_alloc(name); if (!s) return UBUS_STATUS_UNKNOWN_ERROR; diff --git a/service.h b/service.h index 527e511..4e68eed 100644 --- a/service.h +++ b/service.h @@ -1,3 +1,17 @@ +/* + * Copyright (C) 2013 Felix Fietkau + * Copyright (C) 2013 John Crispin + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 2.1 + * as published by the Free Software Foundation + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + #ifndef __PROCD_SERVICE_H #define __PROCD_SERVICE_H diff --git a/ubus.c b/ubus.c index e6f9922..e87543a 100644 --- a/ubus.c +++ b/ubus.c @@ -1,3 +1,17 @@ +/* + * Copyright (C) 2013 Felix Fietkau + * Copyright (C) 2013 John Crispin + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 2.1 + * as published by the Free Software Foundation + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + #include #include #include @@ -42,7 +56,7 @@ static void procd_restart_ubus(void) return; } - LOG("Launched new ubus instance, pid=%d\n", (int) ubus_proc.pid); + DEBUG(1, "Launched new ubus instance, pid=%d\n", (int) ubus_proc.pid); uloop_process_add(&ubus_proc); } @@ -77,7 +91,7 @@ static void procd_ubus_connection_lost(struct ubus_context *old_ctx) procd_ubus_try_connect(); } - LOG("Connected to ubus, id=%08x\n", ctx->local_id); + DEBUG(1, "Connected to ubus, id=%08x\n", ctx->local_id); ubus_add_uloop(ctx); } diff --git a/utils.c b/utils.c index 628136f..59d02f1 100644 --- a/utils.c +++ b/utils.c @@ -1,3 +1,17 @@ +/* + * Copyright (C) 2013 Felix Fietkau + * Copyright (C) 2013 John Crispin + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 2.1 + * as published by the Free Software Foundation + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + #include #include #include "utils.h" diff --git a/utils.h b/utils.h index fba7417..37fa216 100644 --- a/utils.h +++ b/utils.h @@ -1,3 +1,17 @@ +/* + * Copyright (C) 2013 Felix Fietkau + * Copyright (C) 2013 John Crispin + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 2.1 + * as published by the Free Software Foundation + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + #ifndef __PROCD_UTILS_H #define __PROCD_UTILS_H -- 2.25.1