Programmatically probe video chipset

2001-02-12 Thread Paul Powell

Is there an API or other means to determine what video
card, namely the chipset, that the user has installed
on his machine?

Thanks,
Paul

__
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35 
a year!  http://personal.mail.yahoo.com/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://vger.kernel.org/lkml/



Programmatically probe video chipset

2001-02-12 Thread Paul Powell

Is there an API or other means to determine what video
card, namely the chipset, that the user has installed
on his machine?

Thanks,
Paul

__
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35 
a year!  http://personal.mail.yahoo.com/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://vger.kernel.org/lkml/



Ioctl CDROMRESET has no effect

2001-02-07 Thread Paul Powell

I'm attempting to reset a CDROM using the CDROMRESET
ioctl.  The reset command only seems to reset the
device if the device is not mounted.  If the device is
mounted, the reset command seems to have no effect.

With the device unmounted, sending the reset command
causes the drive to become active and I see the
activity light light up.  With the device mounted, the
activity light does nothing.  I also can't open the
CD-ROM drive using the eject button after resetting a
mounted CD.

It seems the reset command should work even if the OS
thinks the device is mounted for error recovery.

Here is my test program:

#include 
#include 
#include 
#include 
#include 
#include 

int main(int argc, char* argv[])
{
   int fd, result;

   fd = open("/dev/hda", O_RDONLY|O_NONBLOCK);
   if (fd < 0)
   {
  perror("open");
  return fd;
   }   
   
   result = ioctl(fd, CDROMRESET, 1);
   if (result < 0)
  perror("ioctl");
  
   close(fd);
   return 0;
}

__
Do You Yahoo!?
Yahoo! Auctions - Buy the things you want at great prices.
http://auctions.yahoo.com/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Ioctl CDROMRESET has no effect

2001-02-07 Thread Paul Powell

I'm attempting to reset a CDROM using the CDROMRESET
ioctl.  The reset command only seems to reset the
device if the device is not mounted.  If the device is
mounted, the reset command seems to have no effect.

With the device unmounted, sending the reset command
causes the drive to become active and I see the
activity light light up.  With the device mounted, the
activity light does nothing.  I also can't open the
CD-ROM drive using the eject button after resetting a
mounted CD.

It seems the reset command should work even if the OS
thinks the device is mounted for error recovery.

Here is my test program:

#include stdio.h
#include sys/ioctl.h
#include sys/types.h
#include sys/stat.h
#include fcntl.h
#include linux/cdrom.h

int main(int argc, char* argv[])
{
   int fd, result;

   fd = open("/dev/hda", O_RDONLY|O_NONBLOCK);
   if (fd  0)
   {
  perror("open");
  return fd;
   }   
   
   result = ioctl(fd, CDROMRESET, 1);
   if (result  0)
  perror("ioctl");
  
   close(fd);
   return 0;
}

__
Do You Yahoo!?
Yahoo! Auctions - Buy the things you want at great prices.
http://auctions.yahoo.com/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Linuxrc runs with PID 7

2001-01-31 Thread Paul Powell

This is a followup question to my previous question
"Why isn't init at PID 1."

Previoulsy I was calling init from within linuxrc. 
Linuxrc was a sash script, so the sash script
supposedly had PID 1.  Now I've removed the script and
have a C program for linuxrc.

I'm still not running at PID 1 but at 7.  The linuxrc
program looks like:

int main(int argc, char* argv[])
{
   printf("PID = %i\n", getpid());
}

When I boot and linuxrc is executed, PID equals 7.

Any ideas as to why this is and how I can run at PID
1?

Thanks,
Paul

__
Get personalized email addresses from Yahoo! Mail - only $35 
a year!  http://personal.mail.yahoo.com/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Why isn't init PID 1?

2001-01-31 Thread Paul Powell

Hello,

I have a bootable linux CD that runs a custom init. 
Under most versions of linux init runs as process ID
one.  Under my bootable CD, it runs as process ID 15. 
I need it to run as PID 1 so that I can execute a
kill(-1,15) without killing init.

The boot CD uses and initrd image to load drivers. 
The linuxrc file looks like:

#!/bin/sash

aliasall

echo "Loading aic7xxx module"
insmod /lib/aic7xxx.o
echo "Loading ips module"
insmod /lib/ips.o ips=ioctlsize:512000
echo "Loading sg module"
insmod /lib/sg.o
echo "Loading FAT modules"
insmod /lib/fat.o
insmod /lib/vfat.o

echo "Mounting /proc"
mount -t proc /proc /proc
init
umount /proc

Does it run as PID 15 because I execute insmod and
mount before running init?

Thanks,
Paul

__
Get personalized email addresses from Yahoo! Mail - only $35 
a year!  http://personal.mail.yahoo.com/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Why isn't init PID 1?

2001-01-31 Thread Paul Powell

Hello,

I have a bootable linux CD that runs a custom init. 
Under most versions of linux init runs as process ID
one.  Under my bootable CD, it runs as process ID 15. 
I need it to run as PID 1 so that I can execute a
kill(-1,15) without killing init.

The boot CD uses and initrd image to load drivers. 
The linuxrc file looks like:

#!/bin/sash

aliasall

echo "Loading aic7xxx module"
insmod /lib/aic7xxx.o
echo "Loading ips module"
insmod /lib/ips.o ips=ioctlsize:512000
echo "Loading sg module"
insmod /lib/sg.o
echo "Loading FAT modules"
insmod /lib/fat.o
insmod /lib/vfat.o

echo "Mounting /proc"
mount -t proc /proc /proc
init
umount /proc

Does it run as PID 15 because I execute insmod and
mount before running init?

Thanks,
Paul

__
Get personalized email addresses from Yahoo! Mail - only $35 
a year!  http://personal.mail.yahoo.com/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Linuxrc runs with PID 7

2001-01-31 Thread Paul Powell

This is a followup question to my previous question
"Why isn't init at PID 1."

Previoulsy I was calling init from within linuxrc. 
Linuxrc was a sash script, so the sash script
supposedly had PID 1.  Now I've removed the script and
have a C program for linuxrc.

I'm still not running at PID 1 but at 7.  The linuxrc
program looks like:

int main(int argc, char* argv[])
{
   printf("PID = %i\n", getpid());
}

When I boot and linuxrc is executed, PID equals 7.

Any ideas as to why this is and how I can run at PID
1?

Thanks,
Paul

__
Get personalized email addresses from Yahoo! Mail - only $35 
a year!  http://personal.mail.yahoo.com/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Forcefully eject CD-ROM

2001-01-29 Thread Paul Powell

Hello,

I am trying to eject my bootable CD-ROM after the user
is finished using it.  The problem is that something
has locked the CD-ROM and every command I send fails
with a "resource busy" error.

I use a custom init program to mount and chroot to the
CD.  I then start X-windows and my application.  When
the application quits I send SIGTERM signals to
X-windows and the other processes I spawned for them
to shutdown as well.  I then try to unmount and eject
the CD but I am not able to do so.

If I don't start the GUI then I can umount and eject
the CD with no problems.  Nothing is different except
I didn't fork the X process.  But if I start the GUI
and then kill the GUI I can't unmount and eject the
CD.  It's as if X-windows is still using the CD even
though I killed it with the SEGTERM signal.

Is there a way to tell the CD to unmount and eject
regardless of what Linux thinks is the 'proper' thing
to do?  Am I killing the GUI wrong?

Thanks

__
Do You Yahoo!?
Yahoo! Auctions - Buy the things you want at great prices. 
http://auctions.yahoo.com/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Forcefully eject CD-ROM

2001-01-29 Thread Paul Powell

Hello,

I am trying to eject my bootable CD-ROM after the user
is finished using it.  The problem is that something
has locked the CD-ROM and every command I send fails
with a "resource busy" error.

I use a custom init program to mount and chroot to the
CD.  I then start X-windows and my application.  When
the application quits I send SIGTERM signals to
X-windows and the other processes I spawned for them
to shutdown as well.  I then try to unmount and eject
the CD but I am not able to do so.

If I don't start the GUI then I can umount and eject
the CD with no problems.  Nothing is different except
I didn't fork the X process.  But if I start the GUI
and then kill the GUI I can't unmount and eject the
CD.  It's as if X-windows is still using the CD even
though I killed it with the SEGTERM signal.

Is there a way to tell the CD to unmount and eject
regardless of what Linux thinks is the 'proper' thing
to do?  Am I killing the GUI wrong?

Thanks

__
Do You Yahoo!?
Yahoo! Auctions - Buy the things you want at great prices. 
http://auctions.yahoo.com/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Undoing chroot?

2001-01-26 Thread Paul Powell

Hello,

I have a linux bootable CD which executes a custom
init.  The job of init is to figure out on which
device the CD is located.  After finding the CD, init
mounts the device and executes a CHROOT to set the
root directory to the CD.

After I'm done I'd like to umount the CD and then
eject it by sending an IOCTL eject command.  But since
I executed a CHROOT I can't umount the CD, umount
complains that the device is busy.

So how do you reverse a CHROOT?

BTW, I use an initrd image and init is a C program,
not a script.

Thanks

__
Do You Yahoo!?
Yahoo! Auctions - Buy the things you want at great prices. 
http://auctions.yahoo.com/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Undoing chroot?

2001-01-26 Thread Paul Powell

Hello,

I have a linux bootable CD which executes a custom
init.  The job of init is to figure out on which
device the CD is located.  After finding the CD, init
mounts the device and executes a CHROOT to set the
root directory to the CD.

After I'm done I'd like to umount the CD and then
eject it by sending an IOCTL eject command.  But since
I executed a CHROOT I can't umount the CD, umount
complains that the device is busy.

So how do you reverse a CHROOT?

BTW, I use an initrd image and init is a C program,
not a script.

Thanks

__
Do You Yahoo!?
Yahoo! Auctions - Buy the things you want at great prices. 
http://auctions.yahoo.com/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Linux driver: __get_free_pages()

2001-01-11 Thread Paul Powell

Our driver is trying to allocate a DMA buffer to flash
an adapter's firmware.  This can require as much as
512K ( of contiguous DMA memory ). We are using the
function __get_free_pages( GFP_KERNEL | GFP_DMA, order
) .  The call is failing if 'order' is greater than 6.
The problem is seen on systems with system memory of
only 64MB.  It works fine on systems with more memory.
 Does it make sense that a system with 64MB would not
have 512K ( contiguous ) available?  The most that can
be allocated successfully on the 64MB system appears
to be 256K.  (Nothing else is running that would eat
up 64MB of memory).

Does this make sense and/or is there another way that
the DMA memory could be allocated successfully?


__
Do You Yahoo!?
Yahoo! Photos - Share your holiday photos online!
http://photos.yahoo.com/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Linux driver: __get_free_pages()

2001-01-11 Thread Paul Powell

Our driver is trying to allocate a DMA buffer to flash
an adapter's firmware.  This can require as much as
512K ( of contiguous DMA memory ). We are using the
function __get_free_pages( GFP_KERNEL | GFP_DMA, order
) .  The call is failing if 'order' is greater than 6.
The problem is seen on systems with system memory of
only 64MB.  It works fine on systems with more memory.
 Does it make sense that a system with 64MB would not
have 512K ( contiguous ) available?  The most that can
be allocated successfully on the 64MB system appears
to be 256K.  (Nothing else is running that would eat
up 64MB of memory).

Does this make sense and/or is there another way that
the DMA memory could be allocated successfully?


__
Do You Yahoo!?
Yahoo! Photos - Share your holiday photos online!
http://photos.yahoo.com/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



'console=' kernel parameter questions

2001-01-08 Thread Paul Powell

Hello,

I am running an unmodified RedHat 6.2 kernel 
(kernel version 2.2.14-5.0)

I am trying to redirect the linux startup messages to
the serial port.  I've added the 'console=' parameter
to my lilo.conf file.  I've tried several iterations
such as
'console=ttys0','console=cua0','console=ttys0,9600n8',
etc

They all fail to produce any output to the serial port
although they do remove the text from my screen.  When
I have booted RedHat I can type 'echo blah >
/dev/cua0' and I see text output from the serial port.
 Interestingly when I try to echo to /dev/ttys0 I get
an IO error message. I'm using a null modem cable
connect to a windows machine to watch the serial port.

My question: why can I see output when booted into
RedHat but not when booting the OS?  I've read that
you have to compile this feature into the kernel. 
Does anyone know if RedHat's kernel come with this
feature built in?

Your help appreciated,
Paul


__
Do You Yahoo!?
Yahoo! Photos - Share your holiday photos online!
http://photos.yahoo.com/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



'console=' kernel parameter questions

2001-01-08 Thread Paul Powell

Hello,

I am running an unmodified RedHat 6.2 kernel 
(kernel version 2.2.14-5.0)

I am trying to redirect the linux startup messages to
the serial port.  I've added the 'console=' parameter
to my lilo.conf file.  I've tried several iterations
such as
'console=ttys0','console=cua0','console=ttys0,9600n8',
etc

They all fail to produce any output to the serial port
although they do remove the text from my screen.  When
I have booted RedHat I can type 'echo blah 
/dev/cua0' and I see text output from the serial port.
 Interestingly when I try to echo to /dev/ttys0 I get
an IO error message. I'm using a null modem cable
connect to a windows machine to watch the serial port.

My question: why can I see output when booted into
RedHat but not when booting the OS?  I've read that
you have to compile this feature into the kernel. 
Does anyone know if RedHat's kernel come with this
feature built in?

Your help appreciated,
Paul


__
Do You Yahoo!?
Yahoo! Photos - Share your holiday photos online!
http://photos.yahoo.com/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



xterm: no available ptys

2000-11-06 Thread Paul Powell

Hello,

I have created a trimmed down /dev directory to be
used with my custom bootable Linux CD.  I've run into
a problem where I can't start an xterm.  I get the
error...

xterm:  no available ptys

I'm not sure which device I'm missing in /dev.  I'm no
expert on how the tty's and stuff work so feel free to
fill me in. Everything else seems to work fine on the
CD.

Here is what my /dev directory looks like now:

/dev:
console
cua0
cua1
cua2
cua3
fb
fb0
fb1
fb2
fb3
fb4
fb5
fb6
fb7
fd0
fd1
hda
hdb
hdc
hdd
kmem
listing
mem
mouse
null
psaux
pts
 |...0
ram
ram0
ram1
ram2
ram3
ramdisk
scd0
scd1
scd2
scd3
scd4
scd5
scd6
scd7
tty
tty0
tty1
tty2
ttyp0
ttyp1
ttyp2
ttyp3
ttyp4
urandom
zero

Am I missing something?

Any help appreciated!

__
Do You Yahoo!?
Thousands of Stores.  Millions of Products.  All in one Place.
http://shopping.yahoo.com/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



xterm: no available ptys

2000-11-06 Thread Paul Powell

Hello,

I have created a trimmed down /dev directory to be
used with my custom bootable Linux CD.  I've run into
a problem where I can't start an xterm.  I get the
error...

xterm:  no available ptys

I'm not sure which device I'm missing in /dev.  I'm no
expert on how the tty's and stuff work so feel free to
fill me in. Everything else seems to work fine on the
CD.

Here is what my /dev directory looks like now:

/dev:
console
cua0
cua1
cua2
cua3
fb
fb0
fb1
fb2
fb3
fb4
fb5
fb6
fb7
fd0
fd1
hda
hdb
hdc
hdd
kmem
listing
mem
mouse
null
psaux
pts
 |...0
ram
ram0
ram1
ram2
ram3
ramdisk
scd0
scd1
scd2
scd3
scd4
scd5
scd6
scd7
tty
tty0
tty1
tty2
ttyp0
ttyp1
ttyp2
ttyp3
ttyp4
urandom
zero

Am I missing something?

Any help appreciated!

__
Do You Yahoo!?
Thousands of Stores.  Millions of Products.  All in one Place.
http://shopping.yahoo.com/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



init= parameter doesn't work

2000-10-13 Thread Paul Powell

Hello,

I am attempting to move all of the root files and
folders into a single directory /linux on the root
file system.  I then use the kernel parameter
init=/linux/sbin/init to get things rolling but the
kernel panics.

When I boot linux, everything seems to work ok until
the kernel tries to execute init.  The root device is
mounted as the root file system successfully and I see
a message stating so.  But then I get a kernel panic
which says it couldn't find init and to try using the
init= kernel parameter.

I'm guessing there is something missing from the root
directory that the kernel needs but isn't there.  I
tried moving the /dev directory back to the root
directory on the root file system but this didn't help
things.

Anyone have any clues?

Thanks.

P.S.  The reason I'm doing this is because I'm
creating a bootable CD but have other things on the CD
in addition to linux.

__
Do You Yahoo!?
Get Yahoo! Mail - Free email you can access from anywhere!
http://mail.yahoo.com/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



init= parameter doesn't work

2000-10-13 Thread Paul Powell

Hello,

I am attempting to move all of the root files and
folders into a single directory /linux on the root
file system.  I then use the kernel parameter
init=/linux/sbin/init to get things rolling but the
kernel panics.

When I boot linux, everything seems to work ok until
the kernel tries to execute init.  The root device is
mounted as the root file system successfully and I see
a message stating so.  But then I get a kernel panic
which says it couldn't find init and to try using the
init= kernel parameter.

I'm guessing there is something missing from the root
directory that the kernel needs but isn't there.  I
tried moving the /dev directory back to the root
directory on the root file system but this didn't help
things.

Anyone have any clues?

Thanks.

P.S.  The reason I'm doing this is because I'm
creating a bootable CD but have other things on the CD
in addition to linux.

__
Do You Yahoo!?
Get Yahoo! Mail - Free email you can access from anywhere!
http://mail.yahoo.com/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Removing boot text

2000-09-28 Thread Paul Powell

We are using Linux as a bootable CD for system
configuration.  We would like to keep all the
information displayed at bootup hidden.  The main
reason for this is because our users see words such as
"error" and "failed" and it bothers them (though there
is nothing wrong).

Anyone know how other than changing the kernel code?

Thanks

__
Do You Yahoo!?
Yahoo! Photos - 35mm Quality Prints, Now Get 15 Free!
http://photos.yahoo.com/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/