]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - release/dumpnlist.c
Add the missing rerelease target back.
[FreeBSD/FreeBSD.git] / release / dumpnlist.c
1 #include <sys/types.h>
2 #include <sys/fcntl.h>
3 #include <unistd.h>
4 #include <stdlib.h>
5 #include <nlist.h>
6 #include <stdio.h>
7
8 struct nlist    nl[] = {
9     {"_isa_devtab_bio"},
10     {"_isa_devtab_tty"},
11     {"_isa_devtab_net"},
12     {"_isa_devtab_null"},
13     {"_isa_biotab_wdc"},
14     {"_isa_biotab_fdc"},
15     {"_eisadriver_set"},
16     {"_eisa_dev_list"},
17     {"_pcidevice_set"},
18     {"_device_list"},
19     {"_scbusses"},
20     {"_scsi_cinit"},
21     {"_scsi_dinit"},
22     {"_scsi_tinit"},
23     {""},
24 };
25
26 int
27 main(int ac, char **av)
28 {
29     int i;
30
31     i = nlist(av[1], nl);
32     if (i == -1) {
33         fprintf(stderr, "nlist returns error for %s\n", av[1]);
34         perror("nlist");
35         return 1;
36     }
37     printf("%d\n", sizeof(nl) / sizeof(struct nlist));
38     for (i = 0; nl[i].n_name; i++) {
39         printf("%s\n", nl[i].n_name);
40         printf("%d %d %d %ld\n",
41                nl[i].n_type, nl[i].n_other, nl[i].n_desc, nl[i].n_value);
42     }
43     return 0;
44 }