Re: problems with "options" in modules.conf

2000-06-29 Thread David Wright
Quoting Oreste Salerno ([EMAIL PROTECTED]):
> 
> 2.2.15 code is the same as the 2.2.10, as what regards this part. Adding
> these extra printk showed me that the string ignore is composed only by the
> first word, even if actually there are more than one. i.e if i put:
> 
> options ignore='aa hdb hdc'
> it will just appear:
> ide-cd: will ignore aa
> 
> I tried to find where does ignore come from and I found that it's determined
> by a function called MODULE_PARM(), which does not belong to ide-cd.c so I
> think the problem does not belong to the ide-cd module. But I couldn't do
> anything more 'cause my programming knowhow is very limited. anyway, thanks
> again for your hints.

In which case, I would try the effect of
a) playing with the quotation marks, i.e. try " " instead of ' '
b) playing with the separator, i.e. try hdb,hdc hdb-hdc or even hdbhdc.
   strstr() only looks for the first occurrence of a substring,
   and has no concept of separators.

Cheers,

-- 
Email:  [EMAIL PROTECTED]   Tel: +44 1908 653 739  Fax: +44 1908 655 151
Snail:  David Wright, Earth Science Dept., Milton Keynes, England, MK7 6AA
Disclaimer:   These addresses are only for reaching me, and do not signify
official stationery. Views expressed here are either my own or plagiarised.



Re: problems with "options" in modules.conf

2000-06-29 Thread Oreste Salerno
On Wed, Jun 28, 2000 at 07:11:00PM +0100, David Wright wrote:

> then my reaction would be to put an
> extra printk or two into the kernel source and see what it's actually
> doing.
> 
> 2.2.10 has:
> 
>   MOD_INC_USE_COUNT;
>   printk("ide-cd: will ignore %s\n", ignore);   <-
>   while ((drive = ide_scan_devices (ide_cdrom, ide_cdrom_driver.name, NULL, 
> failed++)) != NULL) {
> /* skip drives that we were told to ignore */
> if (ignore != NULL)
>   printk("ide-cd: checking drive %s\n", drive->name);   <-
>   if (strstr(ignore, drive->name)) {
> printk("ide-cd: ignoring drive %s\n", drive->name);
> continue;
>   }

2.2.15 code is the same as the 2.2.10, as what regards this part. Adding
these extra printk showed me that the string ignore is composed only by the
first word, even if actually there are more than one. i.e if i put:

options ignore='aa hdb hdc'
it will just appear:
ide-cd: will ignore aa

I tried to find where does ignore come from and I found that it's determined
by a function called MODULE_PARM(), which does not belong to ide-cd.c so I
think the problem does not belong to the ide-cd module. But I couldn't do
anything more 'cause my programming knowhow is very limited. anyway, thanks
again for your hints.
Bye!



Re: problems with "options" in modules.conf

2000-06-28 Thread David Wright
Quoting Oreste Salerno ([EMAIL PROTECTED]):
> On Tue, Jun 27, 2000 at 02:45:35PM +0100, David Wright wrote:
> 
> > > and that's what I did. The problem is that ide-cd only ignores hdb, but
> > > still recognizes hdc. This thing does not happen if I write, directly from
> > > the command line:
> > > 
> > > modprobe ide-cd ignore='hdb hdc'
> > 
> > Perhaps it's just that the kernel source is not Debianised.
> >
> What do you mean?

Only that the filename chosen for conf.modules or modules.conf
is not known by the person writing the kernel because the
kernel source and the distribution are unrelated.

Likewise, much documentation will assume that kernel sources are
unpacked and built in /usr/src/linux whereas Debian people are 
encouraged not to do that.

> > Take a look at /etc/conf.modules (not modules.conf) and then
> > follow the comments,
> There's no /etc/conf.modules in Debian 2.2, at least not in my /etc
> directory! :)

Sorry, I hadn't noticed that Debian has changed filenames recently,
as someone else pointed out.

> >i.e. put your options into /etc/modutils/local and then update-modules.
> That's what i had already done, but it didn't change anything. ide-cd still
> ignores just one device. Anyway, thanks.

Well, after checking that the "ignore" has made it into the correct file,
and looking carefully for typos, then my reaction would be to put an
extra printk or two into the kernel source and see what it's actually
doing.

2.2.10 has:

  MOD_INC_USE_COUNT;
  printk("ide-cd: will ignore %s\n", ignore);   <-
  while ((drive = ide_scan_devices (ide_cdrom, ide_cdrom_driver.name, NULL, 
failed++)) != NULL) {
/* skip drives that we were told to ignore */
if (ignore != NULL)
  printk("ide-cd: checking drive %s\n", drive->name);   <-
  if (strstr(ignore, drive->name)) {
printk("ide-cd: ignoring drive %s\n", drive->name);
continue;
  }

and I've added the two marked lines. If the string 'hdb hdc' doesn't
arrive intact at that point (for example, a character has been stripped
off or something), then you can try some workarounds, like
ignore='a hdb hdc a'. It depends what it prints out.

Cheers.

-- 
Email:  [EMAIL PROTECTED]   Tel: +44 1908 653 739  Fax: +44 1908 655 151
Snail:  David Wright, Earth Science Dept., Milton Keynes, England, MK7 6AA
Disclaimer:   These addresses are only for reaching me, and do not signify
official stationery. Views expressed here are either my own or plagiarised.



Re: problems with "options" in modules.conf

2000-06-27 Thread Brad
On Tue, Jun 27, 2000 at 02:45:35PM +0100, David Wright wrote:
> 
> Take a look at /etc/conf.modules (not modules.conf) and then

Note that it actually is modules.conf if you're using modutils since
2.3.4 (2.3.5-1 was the first deb with this changes, if i read the
changelogs correctly). Potato currently has 2.3.11-8, so anyone
following frozen or unstable should have this.


-- 
  finger for GPG public key.


pgpBbzDkOhmFb.pgp
Description: PGP signature


Re: problems with "options" in modules.conf

2000-06-27 Thread Oreste Salerno
On Tue, Jun 27, 2000 at 02:45:35PM +0100, David Wright wrote:

> > and that's what I did. The problem is that ide-cd only ignores hdb, but
> > still recognizes hdc. This thing does not happen if I write, directly from
> > the command line:
> > 
> > modprobe ide-cd ignore='hdb hdc'
> 
> Perhaps it's just that the kernel source is not Debianised.
>
What do you mean?

> Take a look at /etc/conf.modules (not modules.conf) and then
> follow the comments,
There's no /etc/conf.modules in Debian 2.2, at least not in my /etc
directory! :)

>i.e. put your options into /etc/modutils/local and then update-modules.
That's what i had already done, but it didn't change anything. ide-cd still
ignores just one device. Anyway, thanks.
Cheers.



Re: problems with "options" in modules.conf

2000-06-27 Thread David Wright
Quoting Oreste Salerno ([EMAIL PROTECTED]):

> I have a quite strange problem with the Debian potato: I want my cdrom
> reader and writer (hdb and hdc) to be ignored by the ide-cd module driver,
> in order to activate for them the ide-scsi module and use as normal SCSI
> devices. In ide-cd.c it's written that I should put in modules.conf:
> 
> options ide-cd ignore='hdb hdc'
> 
> and that's what I did. The problem is that ide-cd only ignores hdb, but
> still recognizes hdc. This thing does not happen if I write, directly from
> the command line:
> 
> modprobe ide-cd ignore='hdb hdc'

Perhaps it's just that the kernel source is not Debianised.

Take a look at /etc/conf.modules (not modules.conf) and then
follow the comments, i.e. put your options into /etc/modutils/local
and then update-modules.

Cheers,

-- 
Email:  [EMAIL PROTECTED]   Tel: +44 1908 653 739  Fax: +44 1908 655 151
Snail:  David Wright, Earth Science Dept., Milton Keynes, England, MK7 6AA
Disclaimer:   These addresses are only for reaching me, and do not signify
official stationery. Views expressed here are either my own or plagiarised.



problems with "options" in modules.conf

2000-06-27 Thread Oreste Salerno
Hi people,
I have a quite strange problem with the Debian potato: I want my cdrom
reader and writer (hdb and hdc) to be ignored by the ide-cd module driver,
in order to activate for them the ide-scsi module and use as normal SCSI
devices. In ide-cd.c it's written that I should put in modules.conf:

options ide-cd ignore='hdb hdc'

and that's what I did. The problem is that ide-cd only ignores hdb, but
still recognizes hdc. This thing does not happen if I write, directly from
the command line:

modprobe ide-cd ignore='hdb hdc'

In this case ide-cd ignores both them. It all seems very strange. Anybody
knows anything about this problem? I thank you all in advance. Bye!