diff --git a/Makefile b/Makefile index 1cd47fe..60fc6b9 100644 --- a/Makefile +++ b/Makefile @@ -180,12 +180,6 @@ mx_flock.h += mx_flock.h mx_mysql.h += mx_mysql.h mx_mysql.h += $(mx_util.h) -### mxq.h -------------------------------------------------------------- - -mxq.h += mxq.h -mxq.h += $(mxq_group.h) -mxq.h += $(mxq_job.h) - ### mxq_mysql.h -------------------------------------------------------- mxq_mysql.h += mxq_mysql.h @@ -195,7 +189,6 @@ mxq_mysql.h += $(mxq_util.h) mxq_util.h += mxq_util.h mxq_util.h += $(mx_log.h) -mxq_util.h += $(mxq.h) ### mxq_group.h -------------------------------------------------------- @@ -317,7 +310,6 @@ clean: CLEAN += mxq_group.o mxq_job.o: $(mx_util.h) mxq_job.o: $(mx_log.h) -mxq_job.o: $(mxq.h) mxq_job.o: $(mxq_job.h) mxq_job.o: $(mxq_group.h) mxq_job.o: $(mxq_mysql.h) diff --git a/mxq.h b/mxq.h deleted file mode 100644 index 3bee99a..0000000 --- a/mxq.h +++ /dev/null @@ -1,74 +0,0 @@ -#ifndef __MXQ_H__ -#define __MXQ_H__ 1 - -#include -#include -#include - -#include "mxq_group.h" -#include "mxq_job.h" - -struct mxq_job_full { - u_int64_t job_id; - u_int8_t job_status; - u_int16_t job_priority; - - char group_id[512]; - u_int8_t group_status; - u_int16_t group_priority; - - uid_t user_uid; - char user_name[256]; - gid_t user_gid; - char user_group[256]; - - u_int16_t job_threads; - u_int64_t job_memory; - u_int32_t job_time; - - char job_workdir[4096]; - char job_command[4096]; - u_int16_t job_argc; - char job_argv[40960]; - - char job_stdout[4096]; - char job_stderr[4096]; - - char tmp_stdout[4096]; - char tmp_stderr[4096]; - - mode_t job_umask; - - char host_submit[1024]; - - char server_id[1024]; - - char host_hostname[1014]; - pid_t host_pid; - - char date_submit[256]; - char date_start[256]; - char date_end[256]; - - struct timeval stats_starttime; - - int stats_status; - struct timeval stats_realtime; - struct rusage stats_rusage; -}; - -struct mxq_job_full_list { - struct mxq_job_full_list_item *first; - struct mxq_job_full_list_item *last; - - int count; -}; - -struct mxq_job_full_list_item { - struct mxq_job_full_list_item *next; - struct mxq_job_full_list_item *prev; - - struct mxq_job_full *job; -}; - -#endif diff --git a/mxq_group.c b/mxq_group.c index bb4c7ba..46007fd 100644 --- a/mxq_group.c +++ b/mxq_group.c @@ -8,6 +8,7 @@ #include "mx_log.h" #include "mxq_group.h" +#include "mxq_job.h" #include "mxq_mysql.h" #define MXQ_GROUP_FIELDS "group_id," \ diff --git a/mxq_job.c b/mxq_job.c index b8ee941..6c73846 100644 --- a/mxq_job.c +++ b/mxq_job.c @@ -16,7 +16,6 @@ #include "mxq_group.h" #include "mxq_job.h" #include "mxq_mysql.h" -#include "mxq.h" #define MXQ_JOB_FIELDS "job_id, " \ "job_status, " \ diff --git a/mxq_job.h b/mxq_job.h index ff48a9b..ba191bf 100644 --- a/mxq_job.h +++ b/mxq_job.h @@ -4,6 +4,9 @@ #include #include +#include +#include + #include "mxq_group.h" struct mxq_job { diff --git a/mxq_job_dump.c b/mxq_job_dump.c index 352816a..604d077 100644 --- a/mxq_job_dump.c +++ b/mxq_job_dump.c @@ -12,6 +12,9 @@ #include "mxq_util.h" #include "mxq_mysql.h" +#include "mxq_group.h" +#include "mxq_job.h" + struct result { struct mxq_job job; diff --git a/mxq_util.c b/mxq_util.c index 055921f..a44335a 100644 --- a/mxq_util.c +++ b/mxq_util.c @@ -94,14 +94,6 @@ void *realloc_forever(void *ptr, size_t size) } while (1); } -void mxq_free_job(struct mxq_job_full *job) -{ - if (!job) - return; - - free(job); -} - char **strvec_new(void) { char **strvec; diff --git a/mxq_util.h b/mxq_util.h index 91a5b38..a0cb2a3 100644 --- a/mxq_util.h +++ b/mxq_util.h @@ -6,12 +6,8 @@ #include #include -#include "mxq.h" - char *mxq_hostname(void); -void mxq_free_job(struct mxq_job_full *job); - char **stringtostringvec(int argc, char *s); char *stringvectostring(int argc, char *argv[]); int chrcnt(char *s, char c); diff --git a/mxqd.c b/mxqd.c index f6985dc..de2b64d 100644 --- a/mxqd.c +++ b/mxqd.c @@ -30,7 +30,6 @@ #include "mx_util.h" #include "mx_log.h" -#include "mxq.h" #include "mxq_group.h" #include "mxq_job.h" #include "mxq_mysql.h" diff --git a/mxqdump.c b/mxqdump.c index ae54a61..4d1fb9f 100644 --- a/mxqdump.c +++ b/mxqdump.c @@ -14,6 +14,8 @@ #include "mxq_mysql.h" #include "mx_getopt.h" +#include "mxq_group.h" + #ifndef MXQ_VERSION #define MXQ_VERSION "0.00" #endif diff --git a/mxqkill.c b/mxqkill.c index 8093644..27db9c1 100644 --- a/mxqkill.c +++ b/mxqkill.c @@ -22,6 +22,9 @@ #include "mxq_mysql.h" #include "mx_getopt.h" +#include "mxq_group.h" +#include "mxq_job.h" + #ifndef MXQ_VERSION #define MXQ_VERSION "0.00" #endif