version 1.64, 2010/03/23 19:19:53 |
version 1.65, 2010/04/20 19:05:03 |
|
|
int send_file(const char *, int); |
int send_file(const char *, int); |
int sendmail(const char *); |
int sendmail(const char *); |
void template(FILE *); |
void template(FILE *); |
|
void usbdevs(FILE *); |
|
|
const char *categories = "system user library documentation kernel " |
const char *categories = "system user library documentation kernel " |
"alpha amd64 arm hppa i386 m68k m88k mips64 powerpc sh sparc sparc64 vax"; |
"alpha amd64 arm hppa i386 m68k m88k mips64 powerpc sh sparc sparc64 vax"; |
|
|
fclose(dfp); |
fclose(dfp); |
} |
} |
|
|
|
void |
|
usbdevs(FILE *ofp) |
|
{ |
|
char buf[BUFSIZ]; |
|
FILE *ifp; |
|
size_t len; |
|
|
|
if ((ifp = popen("usbdevs -v", "r")) != NULL) { |
|
while (!feof(ifp)) { |
|
len = fread(buf, 1, sizeof buf, ifp); |
|
if (len == 0) |
|
break; |
|
if (fwrite(buf, 1, len, ofp) != len) |
|
break; |
|
} |
|
pclose(ofp); |
|
} |
|
pclose(ifp); |
|
} |
|
|
/* |
/* |
* Execute an editor on the specified pathname, which is interpreted |
* Execute an editor on the specified pathname, which is interpreted |
* from the shell. This means flags may be included. |
* from the shell. This means flags may be included. |
|
|
if (!root) |
if (!root) |
fprintf(fp, "SENDBUG: Run sendbug as root " |
fprintf(fp, "SENDBUG: Run sendbug as root " |
"if this is an ACPI report!\n"); |
"if this is an ACPI report!\n"); |
fprintf(fp, "SENDBUG: dmesg%s attached.\n" |
fprintf(fp, "SENDBUG: dmesg%s and usbdevs are attached.\n" |
"SENDBUG: Feel free to delete or use the -D flag if it " |
"SENDBUG: Feel free to delete or use the -D flag if they " |
"contains sensitive information.\n", |
"contain sensitive information.\n", |
root ? ", pcidump, and acpidump are" : " is"); |
root ? ", pcidump, acpidump" : ""); |
fputs("\ndmesg:\n", fp); |
fputs("\ndmesg:\n", fp); |
dmesg(fp); |
dmesg(fp); |
|
fputs("\nusbdevs:\n", fp); |
|
usbdevs(fp); |
if (root) |
if (root) |
hwdump(fp); |
hwdump(fp); |
} |
} |