=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/modstat/Attic/modstat.c,v retrieving revision 1.1 retrieving revision 1.2 diff -c -r1.1 -r1.2 *** src/usr.bin/modstat/Attic/modstat.c 1995/10/18 08:45:48 1.1 --- src/usr.bin/modstat/Attic/modstat.c 1996/06/21 11:40:09 1.2 *************** *** 29,35 **** * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ! * $Id: modstat.c,v 1.1 1995/10/18 08:45:48 deraadt Exp $ */ #include --- 29,35 ---- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ! * $Id: modstat.c,v 1.2 1996/06/21 11:40:09 mickey Exp $ */ #include *************** *** 71,82 **** char *modname; { struct lmc_stat sbuf; if (modname != NULL) strcpy(sbuf.name, modname); - sbuf.id = modnum; - if (ioctl(devfd, LMSTAT, &sbuf) == -1) { switch (errno) { case EINVAL: /* out of range */ --- 71,84 ---- char *modname; { struct lmc_stat sbuf; + char name[MAXLKMNAME] = ""; + sbuf.id = modnum; + sbuf.name = name; + if (modname != NULL) strcpy(sbuf.name, modname); if (ioctl(devfd, LMSTAT, &sbuf) == -1) { switch (errno) { case EINVAL: /* out of range */ *************** *** 92,98 **** /* * Decode this stat buffer... */ ! printf("%-7s %3d %3d %08x %04x %8x %3d %s\n", type_names[sbuf.type], sbuf.id, /* module id */ sbuf.offset, /* offset into modtype struct */ --- 94,100 ---- /* * Decode this stat buffer... */ ! printf("%-7s %3d %3d %08x %04x %8x %3d s\n", type_names[sbuf.type], sbuf.id, /* module id */ sbuf.offset, /* offset into modtype struct */