Questions tagged [mknod]
33 questions
2
votes
1 answer
mknod operation not permitted
i have problem with this makefile always tell me mknod 'T0' operation not permitted
all: tx es_mux demux
mknod T0 p
mknod T1 p
mknod T2 p
mknod T3 p
mknod T4 p
mknod T5 p
mknod T6 p
mknod T7 p
mknod T8…

Luis Parada
- 21
- 1
- 2
2
votes
2 answers
Creating directory with mknod()
I need to create a directory using mknod() (use of mkdir() is not allow in my case), I would call the program from a certain directory and introduce the path where the new dir should be created inside the previous one.
Ex: If I'm /home/user/test/…

tony
- 49
- 1
- 10
1
vote
0 answers
tun interface inside docker not able to read packets from host
I am trying this tutorial for creating and using tun interface. In my case, I want to use it inside a docker container. My host and docker container both are Linux with mknod support. I am trying to get tun interface inside the container to read…

bladeWalker
- 978
- 1
- 13
- 30
1
vote
0 answers
init module does not create internally the device file
I am new to linux device driver programming so perhaps my question is somewhat naïve.
This is in the scope of char devices, yet perhaps its relevant to other cases as well (??).
As I understand it so far, within the __init method of the module, all…

Guy Avraham
- 3,482
- 3
- 38
- 50
1
vote
2 answers
is mknod portable? if not, what is the alternative?
I would like to use mknod in my code to create a file, but man says, that
The only portable use of mknod() is to create a FIFO-special file. If mode is not S_IFIFO or dev is not 0, the behavior of
mknod() is unspecified.
Does that…

gruszczy
- 40,948
- 31
- 128
- 181
1
vote
2 answers
Debugging a system call from FUSE
I'm writing a FUSE filesystem that does some mapping through sqlite, then passes the calls through to the underlying filesystem (somewhat of an expansion on bbfs). It started giving me trouble when I tried to start making files. When I call mknod,…

Jay
- 510
- 6
- 17
1
vote
2 answers
mknod(2) requires superuser on FreeBSD what to use instead?
I am porting from Linux to FreeBSD and have run into ::mknod() failing with errno:
[EINVAL] Creating anything else than a block or character spe-
cial file (or a whiteout) is not supported.
But I also see it states…

WilliamKF
- 41,123
- 68
- 193
- 295
1
vote
1 answer
Is it possible to run mock inside an lxc container with libvirt?
mock is used to build rpms. I wish to use it inside an lxc container, managed by libvirt, however libvirt configures lxc to block mknod(2) calls, which mock uses to build its chroot.
Is there a way to work around this?

Avi Kivity
- 1,362
- 9
- 17
1
vote
2 answers
Is there an OS X equivalent of FreeBSD's make_dev() function?
I'm trying to port some code from FreeBSD to OS X. The code is fairly low-level and it creates a number of special device files using make_dev() and controls functionality using functions like ioctl().
Ideally I'd like to keep my code as close to…

jkp
- 78,960
- 28
- 103
- 104
0
votes
1 answer
Can you use /dev/kvm without adding it as a device?
If I add --device=/dev/kvm to the docker run command, I can access KVM. But is it also possible to do it without that parameter?
The reason I ask is because I recently found out I can access /dev/net/tun without specifying it as a --device just by…

Maestro
- 9,046
- 15
- 83
- 116
0
votes
0 answers
Sending string through fifo process in a single program
I'm having this fifo example in which the child process sends an integer to the parent process. I want it to send a string instead, but it doesn't work.
#include
#include
#include
#include
#include…

andra
- 97
- 6
0
votes
1 answer
os.mknod returns [error38] function not implemented in google colab
I am trying to run the following piece of code on google colab.
dir_path = '/content/drive/My Drive/Colab Notebooks'
log_loss_path =os.path.join(dir_path, 'log_loss.txt')
if not os.path.isfile(log_loss_path):
os.mknod(log_loss_path)
but i get…

sina majd
- 53
- 1
- 6
0
votes
1 answer
How to access a dynamic character device from userspace?
The register_chrdev() function in kernel registers a character device:
int register_chrdev(unsigned int major, const char*name,
struct file_operations*ops));
If major is 0 the kernel dynamically allocates a major number and the register…

Brain
- 311
- 2
- 12
0
votes
1 answer
Device driver Node specific private data
I want to store a specific data for each node (/dev/foo[1-99]) since I want to map each of these nodes to a specific HW.
I started with using file->private_data but each call to open sets it to NULL.
Is there something similar that can be persistent…

Alex
- 131
- 1
- 11
0
votes
1 answer
Character device file not present after reboot in linux
I have just started to explore Linux character device drivers. I have made a simple kernel module in which i am registering the device with register_chrdev() function. I have passed 0 as argument to the function and the kernel returns me the free…

amit kr
- 117
- 1
- 1
- 7