Re: Modutils can't handle long kernel names

From: Keith Owens (kaos@ocs.com.au)
Date: Fri Nov 09 2001 - 00:34:00 EST


On Thu, 8 Nov 2001 20:42:10 -0800,
Mike Fedyk <mfedyk@matchmail.com> wrote:
>EXTRAVERSION=-pre1+freeswan-1.91+xsched+netdev_random+ext3-0.9.15-2414+ext3-mem_acct+elevator
>
>Unfortunately, with this long kernel version number, modutils (I've noticed
>depmod and modutils so far...) choke on it.
>
>depmod:
>depmod: Can't open /lib/modules/2.4.15-pre1+freeswan-1.91+xsched+netdev_random+ext3-0.9.15-2414+e#1 SMP Thu Nov 8 20:18:04 PST 2001/modules.dep for writing
>
>uname -r:
>2.4.15-pre1+freeswan-1.91+xsched+netdev_random+ext3-0.9.15-2414+e#1 SMP Thu Nov 8 20:18:04 PST 2001

It is not a modutils problem, it is a fixed restriction on the size of
the uname() fields, modutils just uses what uname -r gives it.

         struct utsname {
                      char sysname[SYS_NMLN];
                      char nodename[SYS_NMLN];
                      char release[SYS_NMLN];
                      char version[SYS_NMLN];
                      char machine[SYS_NMLN];
                      char domainname[SYS_NMLN];
                      };

SYS_NMLN maps to _UTSNAME_LENGTH.
/* Length of the entries in `struct utsname' is 65. */
#define _UTSNAME_LENGTH 65

Like you said, don't do that :).

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Nov 15 2001 - 21:00:21 EST