Re: multple char devs for single physical dev



On Jun 1, 12:38 am, Doug Freyburger <dfrey...@xxxxxxxxx> wrote:
Harshal <p.hars...@xxxxxxxxx> wrote:

I have a system where I have a character device and
corrosponding block device. can I create one more character
device?

Sure you can do that. The question is why you would want to
and can you explain why it's a bad idea. Once you can
explain why it's a bad idea then you're qualified to actually
do it - Know the downside and go in knowing or have no idea
and go in blind.

Chances are you actually want to do something you have not
specified and there's a rational way to do it that you haven't
thought of yet. Instead so far you've come up with this scheme
and you haven't noticed the serious problems the scheme
involves.

my aim is to get (on HPUX)

#ioscan -funC disk | grep dev | head -1

/dev/dsk/c0t0d0 /dev/rdsk/c0t0d0 /dev/rdsk/some_name001

Using ln -s to make a symlink is probably the method with the
fewest bad side effects. Since the original device is still "the"
device there's no confusion in the kernel as to where it's data
goes.

Using mknod using the major and minor device numbers from
ls -l is probably the method with the most bad side effects.
When an interrupt come in for that device, what's the behavior
of handling out the data to the two inodes? Far too likely to
be not what you want.



This is exact option I was thinking of but not sure of its outcomes.

To know that you're qualified to actually try such a stunt
here's the question to answer: Explain what happens to data
coming from an interupt if you use ln to make a hard link
instead of ln -s to make a symlink.

only one of the char devs gets registered.




So what is it you're actually trying to acheive?

I have one customer who has the setup like this, and I have to
simulated that setup here in our lab, as there are some issues that we
are facing in our product. I got the ioscan output from that
customer. so thought may be creating a char dev might help.


.



Relevant Pages

  • Re: stopping XP reinstall
    ... I am now convinced what I think caused the original BSOD with the customer, ... which is a keylogger program. ... Later this morning, I will pull all the hardware out, then retry Setup. ... XP Setup goes to BSOD immediately following splash screen. ...
    (microsoft.public.windowsxp.setup_deployment)
  • Re: Problem installing Backup Exec 10 - Windows 2003 Ent Server
    ... Is SQL currently installed on this Windows 2003 Cluster? ... when our Setup Support Engineer reviewed the log file from the customer they ... "Setup has detected existing data/log files. ...
    (microsoft.public.windows.server.clustering)
  • Re: Hows dot.net doing nowadays?
    ... enough, and it seems to be the same sort of setup you were talking about, but ... PDataCol.Add New Customer ... PDataCol.Add New Supplier ...
    (microsoft.public.vb.general.discussion)
  • Re: Domain and Forest Prep Problem?
    ... The way setup is designed is ... > have not been run prior to running setup, then they will be run as part of ... > Exchange MVP ... >> I recently helped a customer of mine upgrade their NT 4.0 domain to ...
    (microsoft.public.exchange.admin)
  • Re: VNCserver - gnome programs crashing.
    ... I have started the vncserver service and setup my user ... I make use of VNC extensively on either my boxen or customer boxen; ... simple script to fire it up for me; with starting it from the script, ...
    (RedHat)