Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Devfsadm doesn't create /dev/foo link #3

Open
servizig opened this issue Jun 23, 2024 · 6 comments
Open

Devfsadm doesn't create /dev/foo link #3

servizig opened this issue Jun 23, 2024 · 6 comments

Comments

@servizig
Copy link
Contributor

I don't know how devfsadm works, but after creating and installing foo package, I don't see /dev/foo node created. There are 2 foo nodes under /devices/pseudo directories. If I run foo command, then it prints foo: err = 2 and loads the module (shows up in the modinfo). If I manually create link from /devices/pseudo/foo@0:foo to /dev/foo, then foo command works correctly. Is it the expected behavior?

@gwr
Copy link
Owner

gwr commented Jun 23, 2024

Sounds like a bug. I haven't used this in a while. Did devfsadm run?

@servizig
Copy link
Contributor Author

How do I check this? I can manually run devfsadm -v -i foo but nothing prints out and nothing changes.
Also, I tried to run /usr/sbin/rem_drv foo first, then /usr/sbin/add_drv -v -f -m '* 0644 root sys' foo and got this output:

exit status = 0
Driver (foo) installed.

It should print devfsadm output here, too, right?

@gwr
Copy link
Owner

gwr commented Jun 23, 2024

I'm trying to refresh my memory about how this works. Looking now:
Initially, devfsadm is run via the "devices-local" milestone if the config has changed.
After that, I think one nees to run it by hand after loading a driver, eg:
devfsadm -v -i drivername

That's supposed to create the /dev link to devices, via that plugin module.
What does running with -v show you?

@servizig
Copy link
Contributor Author

Nothing, with exit code 0.
Under /devices/pseudo I have

drwxr-xr-x   2 root     sys            2 июн. 23 18:06 foo@0     #(empty dir)
crw-r--r--   1 root     sys      306,  0 июн. 23 20:07 foo@0:foo

@gwr
Copy link
Owner

gwr commented Jun 23, 2024

OK, something is wrong there then. Needs debugging.

@servizig
Copy link
Contributor Author

servizig commented Jul 6, 2024

After adding this line to the /etc/devlink.tab:

type=ddi_pseudo;name=foo        \D

I immediately got after running devfsadm -v -i foo:

devfsadm[1725]: verbose: symlink /dev/foo -> ../devices/pseudo/foo@0:foo

Now, I understand why this worked, I don't understand why other nodes work, other than fuse, tpm, and xsvc. There's lots of pseudo devices that don't require special treatment. Why is that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants