fprintf(fd, "#ifndef _LTT_FACILITY_%s_H_\n", fac->capname);
fprintf(fd, "#define _LTT_FACILITY_%s_H_\n\n", fac->capname);
fprintf(fd, "#include <linux/types.h>\n");
- fprintf(fd, "#include <linux/ltt/ltt-facility-id-%s.h>\n", fac->name);
+ if(!fac->arch)
+ fprintf(fd, "#include <linux/ltt/ltt-facility-id-%s.h>\n", fac->name);
+ else
+ fprintf(fd, "#include <asm/ltt/ltt-facility-id-%s_%s.h>\n",
+ fac->name,
+ fac->arch);
fprintf(fd, "#include <linux/ltt-core.h>\n");
fprintf(fd, "\n");
}
strncat(filename, fac->name, PATH_MAX - filename_size);
filename_size = strlen(filename);
+ if(fac->arch) {
+ strncat(filename, "_", PATH_MAX - filename_size);
+ filename_size = strlen(filename);
+
+ strncat(filename, fac->arch, PATH_MAX - filename_size);
+ filename_size = strlen(filename);
+ }
+
strncat(filename, ".h", PATH_MAX - filename_size);
filename_size = strlen(filename);
strncat(filename, fac->name, PATH_MAX - filename_size);
filename_size = strlen(filename);
+ if(fac->arch) {
+ strncat(filename, "_", PATH_MAX - filename_size);
+ filename_size = strlen(filename);
+
+ strncat(filename, fac->arch, PATH_MAX - filename_size);
+ filename_size = strlen(filename);
+ }
+
strncat(filename, ".h", PATH_MAX - filename_size);
filename_size = strlen(filename);
strncat(filename, fac->name, PATH_MAX - filename_size);
filename_size = strlen(filename);
+ if(fac->arch) {
+ strncat(filename, "_", PATH_MAX - filename_size);
+ filename_size = strlen(filename);
+
+ strncat(filename, fac->arch, PATH_MAX - filename_size);
+ filename_size = strlen(filename);
+ }
+
strncat(filename, ".h", PATH_MAX - filename_size);
filename_size = strlen(filename);
fprintf(fd, "#define _LTT_FACILITY_LOADER_%s_H_\n\n", fac->capname);
fprintf(fd, "#ifdef CONFIG_LTT\n\n");
fprintf(fd,"#include <linux/ltt-facilities.h>\n");
- fprintf(fd,"#include <linux/ltt/ltt-facility-id-%s.h>\n\n",
- fac->name);
+ if(!fac->arch)
+ fprintf(fd,"#include <linux/ltt/ltt-facility-id-%s.h>\n\n",
+ fac->name);
+ else
+ fprintf(fd,"#include <asm/ltt/ltt-facility-id-%s_%s.h>\n\n",
+ fac->name,
+ fac->arch);
fprintf(fd,"ltt_facility_t\tltt_facility_%s;\n", fac->name);
fprintf(fd,"ltt_facility_t\tltt_facility_%s_%X;\n\n",
fac->name, fac->checksum);
strncat(filename, fac->name, PATH_MAX - filename_size);
filename_size = strlen(filename);
+ if(fac->arch) {
+ strncat(filename, "_", PATH_MAX - filename_size);
+ filename_size = strlen(filename);
+
+ strncat(filename, fac->arch, PATH_MAX - filename_size);
+ filename_size = strlen(filename);
+ }
+
strncat(filename, ".c", PATH_MAX - filename_size);
filename_size = strlen(filename);
}
fprintf(fd, "/*\n");
- fprintf(fd, " * ltt-facility-loader-%s.c\n", fac->name);
+ if(!fac->arch)
+ fprintf(fd, " * ltt-facility-loader-%s.c\n", fac->name);
+ else
+ fprintf(fd, " * ltt-facility-loader-%s_%s.c\n", fac->name, fac->arch);
fprintf(fd, " *\n");
fprintf(fd, " * (C) Copyright 2005 - \n");
fprintf(fd, " * Mathieu Desnoyers (mathieu.desnoyers@polymtl.ca)\n");
fprintf(fd, "#include <linux/module.h>\n");
fprintf(fd, "#include <linux/init.h>\n");
fprintf(fd, "#include <linux/config.h>\n");
- fprintf(fd, "#include \"ltt-facility-loader-%s.h\"\n", fac->name);
+ if(!fac->arch)
+ fprintf(fd, "#include \"ltt-facility-loader-%s.h\"\n", fac->name);
+ else
+ fprintf(fd, "#include \"ltt-facility-loader-%s_%s.h\"\n",
+ fac->name, fac->arch);
fprintf(fd, "\n");
fprintf(fd, "\n");
fprintf(fd, "#ifdef CONFIG_LTT\n");