diff -Nur modutils-2.4.0/ChangeLog modutils-2.4.1/ChangeLog --- modutils-2.4.0/ChangeLog Fri Jan 5 12:45:19 2001 +++ modutils-2.4.1/ChangeLog Tue Jan 9 02:16:00 2001 @@ -1,3 +1,12 @@ +2001-01-09 Keith Owens + + modutils 2.4.1 + + * Cast 2*sizeof to int in printf, new gcc warns about this. + * Add an optional version number to kernel tables. + * Handle version 1 and 2 usb device tables. + * man lsmod documents use count -1. + 2001-01-05 Keith Owens modutils 2.4.0 diff -Nur modutils-2.4.0/depmod/depmod.c modutils-2.4.1/depmod/depmod.c --- modutils-2.4.0/depmod/depmod.c Fri Jan 5 12:45:19 2001 +++ modutils-2.4.1/depmod/depmod.c Tue Jan 9 01:27:37 2001 @@ -23,21 +23,7 @@ * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ - /* - Fixes: - - Add -r flag: Keith Owens October 1999. - - Rationalize common code for 32/64 bit architectures. - Fix error message for modules.dep. - Keith Owens December 1999 - Add arch64(). - Keith Owens December 1999. - Ignore any genksyms suffix when using -F. - Keith Owens April 2000. - */ - -#ident "$Id: depmod.c 1.1 Fri, 05 Jan 2001 12:45:19 +1100 kaos $" +#ident "$Id: depmod.c 1.2 Tue, 09 Jan 2001 01:27:37 +1100 kaos $" #include #include @@ -77,6 +63,9 @@ } SYMBOL; /* Extracted from 2.4.0-test6-pre6/include/linux/pci.h */ + +unsigned int pci_device_id_ver; + struct pci_device_id { unsigned int vendor, device; /* Vendor and device ID or PCI_ANY_ID */ unsigned int subvendor, subdevice; /* Subsystem ID's or PCI_ANY_ID */ @@ -85,6 +74,9 @@ }; /* Extracted from 2.4.0-test10-pre1 /include/linux/isapnp.h */ + +unsigned int isapnp_device_id_ver; + struct isapnp_device_id { unsigned short card_vendor, card_device; unsigned short vendor, function; @@ -101,13 +93,18 @@ } devs[ISAPNP_CARD_DEVS]; /* logical devices */ }; -/* Extracted from 2.4.0-test10-pre3 + David Brownell usb-device_id patch 2 */ +/* Version 1 table extracted from 2.4.0-test10-pre3 + David Brownell + * usb-device_id patch 2. + * Version 2 table extracted from 2.4.0 + Keith Owens 2.4.0-depmod patch. + */ + #ifndef __u16 #define __u16 u_int16_t #endif #ifndef __u8 #define __u8 u_int8_t #endif + /* * Device table entry for "new style" table-driven USB drivers. * User mode code can read these tables to choose which modules to load. @@ -116,10 +113,18 @@ * With a device table provide bind() instead of probe(). Then the * third bind() parameter will point to a matching entry from this * table. (Null value reserved.) - * + * * Terminate the driver's table with an all-zeroes entry. * Init the fields you care about; zeroes are not used in comparisons. + * + * match_flags was added in kernel 2.4.0 but it was incorrectly put at the start + * of the structure. KAO moved it to before driver_info and defined that format + * as a version 2 table for kernel 2.4.1 and modutils 2.4.1. USB modules will + * not be supported in standard kernel 2.4.0, with any version of modutils. */ + +unsigned int usb_device_id_ver; + struct usb_device_id { /* * vendor/product codes are checked, if vendor is nonzero @@ -146,6 +151,11 @@ __u8 bInterfaceSubClass; __u8 bInterfaceProtocol; + /* This bitmask is used to determine which of the preceding fields + * are to be used for matching. + */ + __u16 match_flags; /* New in version 2 */ + /* * for driver's use; not involved in driver matching. */ @@ -156,6 +166,9 @@ * Although the kernel defines pattern as char *, define it as ElfW(Addr) * to make combined 32/64 code work. */ + +unsigned int parport_device_id_ver; + struct parport_device_id { ElfW(Addr) pattern; }; @@ -374,7 +387,7 @@ { struct obj_section *sec; char *p, *ep, *s, **latest; - + sec = obj_find_section(f, ".modstring"); if (sec == NULL) return; @@ -397,6 +410,42 @@ } /* + * Extract the table version, if any, from the module. Only call + * this routine when you know that the module contains a table. + * Note: assumes same machine and arch for depmod and module. + */ +static void extract_version(struct obj_file *f, void *image, unsigned long m_size, + const char *table, unsigned int *version, int max_version) +{ + ElfW(Addr) ref_ver; + unsigned tgt_long ver; + char name[2000]; /* grossly oversized */ + strcpy(name, "__module_"); + strcat(name, table); + strcat(name, "_ver"); + ref_ver = obj_symbol_final_value(f, obj_find_symbol(f, name)); + /* Kernels before 2.4.1 do not have __module__ver, default to version 1 */ + if (ref_ver) { + if (!in_range(f, m_size, ref_ver, sizeof(ver))) + return; + memcpy(&ver, (char *)image + ref_ver - f->baseaddr, sizeof(ver)); + } + else + ver = 1; + if (*version && *version != ver) { + error("Modules have a mixture of version %d and version %" tgt_long_fmt "d %s tables", + *version, ver, table); + exit(-1); + } + if (ver > max_version) { + error("Module %s has an unknown version (%" tgt_long_fmt "d) %s table%s", + f->filename, ver, table, has_kernel_changed); + exit(-1); + } + *version = ver; +} + +/* * Extract any pci_device_table from the module. * Note: assumes same machine and arch for depmod and module. */ @@ -415,18 +464,20 @@ } else pci_device_size = sizeof(pci_device); + ref_ref_pci = obj_symbol_final_value(f, obj_find_symbol(f, "__module_pci_device_table")); + if (!in_range(f, m_size, ref_ref_pci, sizeof(ref_pci))) + return; + memcpy(&ref_pci, (char *)image + ref_ref_pci - f->baseaddr, sizeof(ref_pci)); + extract_version(f, image, m_size, "pci_device", &pci_device_id_ver, 1); if (pci_device_size != sizeof(pci_device)) { error("Unexpected value (%" tgt_long_fmt "d) in '%s' for pci_device_size%s", pci_device_size, f->filename, has_kernel_changed); exit(-1); } - ref_ref_pci = obj_symbol_final_value(f, obj_find_symbol(f, "__module_pci_device_table")); - if (!in_range(f, m_size, ref_ref_pci, sizeof(ref_pci))) - return; - memcpy(&ref_pci, (char *)image + ref_ref_pci - f->baseaddr, sizeof(ref_pci)); - while (in_range(f, m_size, ref_pci, sizeof(pci_device))) { - memcpy(&pci_device, (char *)image + ref_pci - f->baseaddr, sizeof(pci_device)); - ref_pci += sizeof(pci_device); + while (in_range(f, m_size, ref_pci, pci_device_size)) { + memset(&pci_device, 0, sizeof(pci_device)); + memcpy(&pci_device, (char *)image + ref_pci - f->baseaddr, pci_device_size); + ref_pci += pci_device_size; if (!pci_device.vendor) break; mod->pci_device = xrealloc(mod->pci_device, ++(mod->n_pci_device)*sizeof(*(mod->pci_device))); @@ -448,18 +499,20 @@ if (!in_range(f, m_size, ref_isapnp, sizeof(isapnp_device_size))) return; memcpy(&isapnp_device_size, (char *)image + ref_isapnp - f->baseaddr, sizeof(isapnp_device_size)); + ref_ref_isapnp = obj_symbol_final_value(f, obj_find_symbol(f, "__module_isapnp_device_table")); + if (!in_range(f, m_size, ref_ref_isapnp, sizeof(ref_isapnp))) + return; + memcpy(&ref_isapnp, (char *)image + ref_ref_isapnp - f->baseaddr, sizeof(ref_isapnp)); + extract_version(f, image, m_size, "isapnp_device", &isapnp_device_id_ver, 1); if (isapnp_device_size != sizeof(isapnp_device)) { error("Unexpected value (%" tgt_long_fmt "d) in '%s' for isapnp_device_size%s", isapnp_device_size, f->filename, has_kernel_changed); exit(-1); } - ref_ref_isapnp = obj_symbol_final_value(f, obj_find_symbol(f, "__module_isapnp_device_table")); - if (!in_range(f, m_size, ref_ref_isapnp, sizeof(ref_isapnp))) - return; - memcpy(&ref_isapnp, (char *)image + ref_ref_isapnp - f->baseaddr, sizeof(ref_isapnp)); - while (in_range(f, m_size, ref_isapnp, sizeof(isapnp_device))) { - memcpy(&isapnp_device, (char *)image + ref_isapnp - f->baseaddr, sizeof(isapnp_device)); - ref_isapnp += sizeof(isapnp_device); + while (in_range(f, m_size, ref_isapnp, isapnp_device_size)) { + memset(&isapnp_device, 0, sizeof(isapnp_device)); + memcpy(&isapnp_device, (char *)image + ref_isapnp - f->baseaddr, isapnp_device_size); + ref_isapnp += isapnp_device_size; if (!isapnp_device.card_vendor) break; mod->isapnp_device = xrealloc(mod->isapnp_device, ++(mod->n_isapnp_device)*sizeof(*(mod->isapnp_device))); @@ -481,18 +534,19 @@ if (!in_range(f, m_size, ref_isapnp, sizeof(isapnp_card_size))) return; memcpy(&isapnp_card_size, (char *)image + ref_isapnp - f->baseaddr, sizeof(isapnp_card_size)); + ref_ref_isapnp = obj_symbol_final_value(f, obj_find_symbol(f, "__module_isapnp_card_table")); + if (!in_range(f, m_size, ref_ref_isapnp, sizeof(ref_isapnp))) + return; + memcpy(&ref_isapnp, (char *)image + ref_ref_isapnp - f->baseaddr, sizeof(ref_isapnp)); if (isapnp_card_size != sizeof(isapnp_card)) { error("Unexpected value (%" tgt_long_fmt "d) in '%s' for isapnp_card_size%s", isapnp_card_size, f->filename, has_kernel_changed); exit(-1); } - ref_ref_isapnp = obj_symbol_final_value(f, obj_find_symbol(f, "__module_isapnp_card_table")); - if (!in_range(f, m_size, ref_ref_isapnp, sizeof(ref_isapnp))) - return; - memcpy(&ref_isapnp, (char *)image + ref_ref_isapnp - f->baseaddr, sizeof(ref_isapnp)); - while (in_range(f, m_size, ref_isapnp, sizeof(isapnp_card))) { - memcpy(&isapnp_card, (char *)image + ref_isapnp - f->baseaddr, sizeof(isapnp_card)); - ref_isapnp += sizeof(isapnp_card); + while (in_range(f, m_size, ref_isapnp, isapnp_card_size)) { + memset(&isapnp_card, 0, sizeof(isapnp_card)); + memcpy(&isapnp_card, (char *)image + ref_isapnp - f->baseaddr, isapnp_card_size); + ref_isapnp += isapnp_card_size; if (!isapnp_card.card_vendor) break; mod->isapnp_card = xrealloc(mod->isapnp_card, ++(mod->n_isapnp_card)*sizeof(*(mod->isapnp_card))); @@ -514,20 +568,23 @@ if (!in_range(f, m_size, ref_usb, sizeof(usb_device_size))) return; memcpy(&usb_device_size, (char *)image + ref_usb - f->baseaddr, sizeof(usb_device_size)); - if (usb_device_size != sizeof(usb_device)) { - error("Unexpected value (%" tgt_long_fmt "d) in '%s' for usb_device_size%s", - usb_device_size, f->filename, has_kernel_changed); - exit(-1); - } ref_ref_usb = obj_symbol_final_value(f, obj_find_symbol(f, "__module_usb_device_table")); if (!in_range(f, m_size, ref_ref_usb, sizeof(ref_usb))) return; memcpy(&ref_usb, (char *)image + ref_ref_usb - f->baseaddr, sizeof(ref_usb)); - while (in_range(f, m_size, ref_usb, sizeof(usb_device))) { - memcpy(&usb_device, (char *)image + ref_usb - f->baseaddr, sizeof(usb_device)); - ref_usb += sizeof(usb_device); - if (!usb_device.idVendor && !usb_device.bDeviceClass && !usb_device.bInterfaceClass && !usb_device.driver_info) - break; + extract_version(f, image, m_size, "usb_device", &usb_device_id_ver, 2); + if (usb_device_size != sizeof(usb_device)) { + error("Unexpected value (%" tgt_long_fmt "d) in '%s' for usb_device_size%s", + usb_device_size, f->filename, has_kernel_changed); + exit(-1); + } + while (in_range(f, m_size, ref_usb, usb_device_size)) { + memset(&usb_device, 0, sizeof(usb_device)); + memcpy(&usb_device, (char *)image + ref_usb - f->baseaddr, usb_device_size); + ref_usb += usb_device_size; + if (!usb_device.idVendor && !usb_device.bDeviceClass && + !usb_device.bInterfaceClass && !usb_device.driver_info) + break; mod->usb_device = xrealloc(mod->usb_device, ++(mod->n_usb_device)*sizeof(*(mod->usb_device))); latest = mod->usb_device + mod->n_usb_device-1; *latest = usb_device; @@ -547,18 +604,20 @@ if (!in_range(f, m_size, ref_parport, sizeof(parport_device_size))) return; memcpy(&parport_device_size, (char *)image + ref_parport - f->baseaddr, sizeof(parport_device_size)); + ref_ref_parport = obj_symbol_final_value(f, obj_find_symbol(f, "__module_parport_device_table")); + if (!in_range(f, m_size, ref_ref_parport, sizeof(ref_parport))) + return; + memcpy(&ref_parport, (char *)image + ref_ref_parport - f->baseaddr, sizeof(ref_parport)); + extract_version(f, image, m_size, "parport_device", &parport_device_id_ver, 1); if (parport_device_size != sizeof(parport_device)) { error("Unexpected value (%" tgt_long_fmt "d) in '%s' for parport_device_size%s", parport_device_size, f->filename, has_kernel_changed); exit(-1); } - ref_ref_parport = obj_symbol_final_value(f, obj_find_symbol(f, "__module_parport_device_table")); - if (!in_range(f, m_size, ref_ref_parport, sizeof(ref_parport))) - return; - memcpy(&ref_parport, (char *)image + ref_ref_parport - f->baseaddr, sizeof(ref_parport)); - while (in_range(f, m_size, ref_parport, sizeof(parport_device))) { - memcpy(&parport_device, (char *)image + ref_parport - f->baseaddr, sizeof(parport_device)); - ref_parport += sizeof(parport_device); + while (in_range(f, m_size, ref_parport, parport_device_size)) { + memset(&parport_device, 0, sizeof(parport_device)); + memcpy(&parport_device, (char *)image + ref_parport - f->baseaddr, parport_device_size); + ref_parport += parport_device_size; if (!parport_device.pattern) break; mod->parport_device = xrealloc(mod->parport_device, ++(mod->n_parport_device)*sizeof(*(mod->parport_device))); @@ -569,7 +628,7 @@ xstrdup("Start address of out range")); else latest->pattern = obj_native_ptr_to_addr( - xstrdup((char*)image + parport_device.pattern - f->baseaddr)); + xstrdup((char*)image + parport_device.pattern - f->baseaddr)); } } @@ -601,7 +660,7 @@ p = strrchr(objname, '/'); len = 1 + (int)(p - objname); - if ((fp = gzf_open(objname, O_RDONLY)) < 0) + if ((fp = gzf_open(objname, O_RDONLY)) < 0) return 1; if (!(f = obj_load(fp, ET_REL, objname))) { @@ -933,7 +992,14 @@ * Print the pcimap in the pcimapfile (or stdout if nflag is true). * Print the isapnpmap in the isapnpmapfile (or stdout if nflag is true). * Print the usbmap in the usbmapfile (or stdout if nflag is true). + * + * Documented limits which utilities can rely on. + * No field name on a header line will be longer than 20 characters. The + * data in a field can be longer than 20 characters but the name will not. + * No single line in a generated file will be longer than PATH_MAX-1 + * characters. */ + static void prtdepend(char *base_dir, int nflag) { FILE *dep = stdout; @@ -1016,8 +1082,16 @@ char **pstr = ptmod->generic_string; if (!ptmod->n_generic_string) continue; - for (j = 0; j < ptmod->n_generic_string; j++, ++pstr) - fprintf(generic_string, "%-20s %s\n", shortname(ptmod->name), *pstr); + for (j = 0; j < ptmod->n_generic_string; j++, ++pstr) { + int l, l1; + fprintf(generic_string, "%-20s ", shortname(ptmod->name)); + l = PATH_MAX-1; + l1 = strlen(shortname(ptmod->name)); + if (l1 < 20) + l1 = 20; + l -= (l1+1); + fprintf(generic_string, "%*s\n", l, *pstr); + } } ptmod = modules; @@ -1030,13 +1104,13 @@ for (j = 0; j < ptmod->n_pci_device; j++, pci_device++) { fprintf(pcimap, "%-20s 0x%0*x 0x%0*x 0x%0*x 0x%0*x 0x%0*x 0x%0*x 0x%0*" tgt_long_fmt "x\n", shortname(ptmod->name), - 2*sizeof(pci_device->vendor), pci_device->vendor, - 2*sizeof(pci_device->device), pci_device->device, - 2*sizeof(pci_device->subvendor), pci_device->subvendor, - 2*sizeof(pci_device->subdevice), pci_device->subdevice, - 2*sizeof(pci_device->class), pci_device->class, - 2*sizeof(pci_device->class_mask), pci_device->class_mask, - 2*sizeof(pci_device->driver_data), pci_device->driver_data); + (int)(2*sizeof(pci_device->vendor)), pci_device->vendor, + (int)(2*sizeof(pci_device->device)), pci_device->device, + (int)(2*sizeof(pci_device->subvendor)), pci_device->subvendor, + (int)(2*sizeof(pci_device->subdevice)), pci_device->subdevice, + (int)(2*sizeof(pci_device->class)), pci_device->class, + (int)(2*sizeof(pci_device->class_mask)), pci_device->class_mask, + (int)(2*sizeof(pci_device->driver_data)), pci_device->driver_data); } } @@ -1051,23 +1125,23 @@ for (j = 0; j < ptmod->n_isapnp_device; j++, isapnp_device++) { fprintf(isapnpmap, "%-20s 0x%0*x 0x%0*x 0x%0*" tgt_long_fmt "x 0x%0*x 0x%0*x\n", shortname(ptmod->name), - 2*sizeof(isapnp_device->card_vendor), isapnp_device->card_vendor, - 2*sizeof(isapnp_device->card_device), isapnp_device->card_device, - 2*sizeof(isapnp_device->driver_data), isapnp_device->driver_data, - 2*sizeof(isapnp_device->vendor), isapnp_device->vendor, - 2*sizeof(isapnp_device->function), isapnp_device->function); + (int)(2*sizeof(isapnp_device->card_vendor)), isapnp_device->card_vendor, + (int)(2*sizeof(isapnp_device->card_device)), isapnp_device->card_device, + (int)(2*sizeof(isapnp_device->driver_data)), isapnp_device->driver_data, + (int)(2*sizeof(isapnp_device->vendor)), isapnp_device->vendor, + (int)(2*sizeof(isapnp_device->function)), isapnp_device->function); } for (j = 0; j < ptmod->n_isapnp_card; j++, isapnp_card++) { fprintf(isapnpmap, "%-20s 0x%0*x 0x%0*x 0x%0*" tgt_long_fmt "x ", shortname(ptmod->name), - 2*sizeof(isapnp_card->card_vendor), isapnp_card->card_vendor, - 2*sizeof(isapnp_card->card_device), isapnp_card->card_device, - 2*sizeof(isapnp_card->driver_data), isapnp_card->driver_data); + (int)(2*sizeof(isapnp_card->card_vendor)), isapnp_card->card_vendor, + (int)(2*sizeof(isapnp_card->card_device)), isapnp_card->card_device, + (int)(2*sizeof(isapnp_card->driver_data)), isapnp_card->driver_data); for (l = 0; l < ISAPNP_CARD_DEVS; ++l) { if (isapnp_card->devs[l].vendor) { fprintf(isapnpmap, " 0x%0*x 0x%0*x ", - 2*sizeof(isapnp_card->devs[l].vendor), isapnp_card->devs[l].vendor, - 2*sizeof(isapnp_card->devs[l].function), isapnp_card->devs[l].function); + (int)(2*sizeof(isapnp_card->devs[l].vendor)), isapnp_card->devs[l].vendor, + (int)(2*sizeof(isapnp_card->devs[l].function)), isapnp_card->devs[l].function); } } fprintf(isapnpmap, "\n"); @@ -1075,7 +1149,10 @@ } ptmod = modules; - fprintf(usbmap, "# usb module idVendor idProduct bcdDevice_lo bcdDevice_hi" + fprintf(usbmap, "# usb module "); + if (usb_device_id_ver > 1) + fprintf(usbmap, "match_flags "); + fprintf(usbmap, "idVendor idProduct bcdDevice_lo bcdDevice_hi" " bDeviceClass bDeviceSubClass bDeviceProtocol bInterfaceClass bInterfaceSubClass" " bInterfaceProtocol driver_info\n"); for (i = 0; i < n_modules; i++, ptmod++) { @@ -1084,24 +1161,28 @@ if (!ptmod->n_usb_device) continue; for (j = 0; j < ptmod->n_usb_device; j++, usb_device++) { - fprintf(usbmap, "%-20s 0x%0*x 0x%0*x 0x%0*x 0x%0*x " - "0x%0*x 0x%0*x 0x%0*x 0x%0*x 0x%0*x " - "0x%0*x 0x%0*" tgt_long_fmt "x\n", - shortname(ptmod->name), - 2*sizeof(usb_device->idVendor), usb_device->idVendor, - 2*sizeof(usb_device->idProduct), usb_device->idProduct, - 2*sizeof(usb_device->bcdDevice_lo), usb_device->bcdDevice_lo, - 2*sizeof(usb_device->bcdDevice_hi), usb_device->bcdDevice_hi, - 2*sizeof(usb_device->bDeviceClass), usb_device->bDeviceClass, - 2*sizeof(usb_device->bDeviceSubClass), usb_device->bDeviceSubClass, - 2*sizeof(usb_device->bDeviceProtocol), usb_device->bDeviceProtocol, - 2*sizeof(usb_device->bInterfaceClass), usb_device->bInterfaceClass, - 2*sizeof(usb_device->bInterfaceSubClass), usb_device->bInterfaceSubClass, - 2*sizeof(usb_device->bInterfaceProtocol), usb_device->bInterfaceProtocol, - 2*sizeof(usb_device->driver_info), usb_device->driver_info); + fprintf(usbmap, "%-20s ", shortname(ptmod->name)); + if (usb_device_id_ver > 1) { + fprintf(usbmap, "0x%0*x ", + (int)(2*sizeof(usb_device->match_flags)), usb_device->match_flags); + } + fprintf(usbmap, "0x%0*x 0x%0*x 0x%0*x 0x%0*x " + "0x%0*x 0x%0*x 0x%0*x 0x%0*x 0x%0*x " + "0x%0*x 0x%0*" tgt_long_fmt "x\n", + (int)(2*sizeof(usb_device->idVendor)), usb_device->idVendor, + (int)(2*sizeof(usb_device->idProduct)), usb_device->idProduct, + (int)(2*sizeof(usb_device->bcdDevice_lo)), usb_device->bcdDevice_lo, + (int)(2*sizeof(usb_device->bcdDevice_hi)), usb_device->bcdDevice_hi, + (int)(2*sizeof(usb_device->bDeviceClass)), usb_device->bDeviceClass, + (int)(2*sizeof(usb_device->bDeviceSubClass)), usb_device->bDeviceSubClass, + (int)(2*sizeof(usb_device->bDeviceProtocol)), usb_device->bDeviceProtocol, + (int)(2*sizeof(usb_device->bInterfaceClass)), usb_device->bInterfaceClass, + (int)(2*sizeof(usb_device->bInterfaceSubClass)), usb_device->bInterfaceSubClass, + (int)(2*sizeof(usb_device->bInterfaceProtocol)), usb_device->bInterfaceProtocol, + (int)(2*sizeof(usb_device->driver_info)), usb_device->driver_info); } } - + ptmod = modules; fprintf(parportmap, "# module pattern\n"); for (i = 0; i < n_modules; i++, ptmod++) { @@ -1115,7 +1196,7 @@ (char *)obj_addr_to_native_ptr(ptmod->parport_device[j].pattern)); } } - + if (generic_string != stdout) fclose(generic_string); if (pcimap != stdout) diff -Nur modutils-2.4.0/include/version.h modutils-2.4.1/include/version.h --- modutils-2.4.0/include/version.h Fri Jan 5 12:45:19 2001 +++ modutils-2.4.1/include/version.h Fri Jan 5 16:07:52 2001 @@ -1 +1 @@ -#define MODUTILS_VERSION "2.4.0" +#define MODUTILS_VERSION "2.4.1" diff -Nur modutils-2.4.0/man/lsmod.8 modutils-2.4.1/man/lsmod.8 --- modutils-2.4.0/man/lsmod.8 Fri Jan 5 12:45:19 2001 +++ modutils-2.4.1/man/lsmod.8 Tue Jan 9 01:27:37 2001 @@ -1,7 +1,7 @@ .\" Copyright (c) 1996 Free Software Foundation, Inc. .\" This program is distributed according to the Gnu General Public License. .\" See the file COPYING in the kernel source directory -.\" $Id: lsmod.8 1.1 Fri, 05 Jan 2001 12:45:19 +1100 kaos $ +.\" $Id: lsmod.8 1.2 Tue, 09 Jan 2001 01:27:37 +1100 kaos $ .\" .TH LSMOD 8 "26 Dec 1996" Linux "Linux Module Support" .SH NAME @@ -14,6 +14,11 @@ .PP The format is name, size, use count, list of referring modules. The information displayed is identical to that available from /proc/modules. +.PP +If the module controls its own unloading via a +.I can_unload +routine then the user count displayed by lsmod is always -1, +irrespective of the real use count. .SH SEE ALSO insmod(8), modprobe(8), depmod(8), rmmod(8), ksyms(8), modules(2) .SH HISTORY diff -Nur modutils-2.4.0/modutils.spec modutils-2.4.1/modutils.spec --- modutils-2.4.0/modutils.spec Fri Jan 5 12:45:19 2001 +++ modutils-2.4.1/modutils.spec Fri Jan 5 16:07:52 2001 @@ -1,6 +1,6 @@ Summary: Module utilities Name: modutils -Version: 2.4.0 +Version: 2.4.1 Release: 1 Copyright: GPL Group: Utilities/System