713 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
0
votes
0
answers
83
views
IOCTL_ATA_PASS_THROUGH Returning ERROR_ACCESS_DENIED When Calling DeviceIoControl
I am trying to retrieve the SMART Data of an external SATA SSD
wchar_t path[64];
swprintf_s(path, _countof(path), L"\\\\.\\PhysicalDrive%d", 0);
HANDLE hDrive = CreateFile(path, GENERIC_READ ...
0
votes
0
answers
90
views
Why am I getting this error in my assembly program?
I'm making an assembly program that is supposed to get the mac address of the specified interface, however, when I try to assemble it, I get this error.
gethwaddress.s:12: warning: multi-line macro `...
0
votes
1
answer
38
views
Generic/multi-FS alternative to the XFS_IOC_RESVSP64 ioctl?
The XFS filesystem has (or used to have) a IOCTL named XFS_IOC_RESVSP64 for reserving space: You called it with a given file descriptor, and the XFS driver reserved an amount of space use by for your ...
0
votes
0
answers
145
views
Error "ioctl SNDRV_PCM_IOCTL_WRITEI_FRAMES: Input/output error", when writing frames to `/dev/snd/pcmC0D0p`
I am trying to write a c program (on linux), that plays a sine wave from the speakers, using the alsa kernel interface:
#ifndef _GNU_SOURCE
#define _GNU_SOURCE
#endif
#include <sound/asound.h>
#...
2
votes
0
answers
110
views
Error "ioctl SNDRV_PCM_IOCTL_WRITEI_FRAMES: Resource temporarily unavailable", when writing frames to `/dev/snd/pcmC0D0p`
I am trying to write a c program (on linux), that plays a sine wave from the speakers, using the alsa kernel interface (minimal reproducable example).
My config looks like this:
set_param(params,...
2
votes
1
answer
92
views
How to read ioctl BLKSSZGET using the nix crate?
I'm trying to get the block size of a cdrom via ioctl.
A working minimal example in C:
#include <fcntl.h>
#include <linux/fs.h>
#include <stdio.h>
#include <unistd.h>
#include &...
2
votes
1
answer
89
views
ioctl(UVCIOC_CTRL_SET) FAILED (-1) and /dev/videoX becomes inaccessible until reboot — Synexens CS20 on Raspberry Pi 4B
I’m using the Synexens CS20 dual-lens ToF LiDAR sensor with the SynexensSDK (v4.2.1.0, ARMv8) on a Raspberry Pi 4 Model B running Ubuntu 24.04 (64-bit). The device works fine once after a cold boot, ...
2
votes
1
answer
99
views
IPv6 Address Assignment on en0 Throws 'Cannot Allocate Memory' Error After Multiple Additions
I was running a service that assigned a Unique Local Address (ULA) IPv6 to my en0 interface. Initially, I was able to add multiple IPv6 addresses without any issues. However, after adding 18 IPv6 ...
2
votes
1
answer
338
views
How to achieve low level access to SD card to send raw mmc commands?
I am trying to send raw mmc commands to SD card using Linux MMC subsystem mmc-utils and ioctl and running into Connection timed out (errno: 110). The SD card is micro-sd card that is used in raspberry ...
0
votes
0
answers
54
views
Getting alsa mixer events on card which uses ioctl
I am trying to get mixer events from alsa (v1.0.29) in C, but I cannot poll for them, because my card uses ioctl to change values. I am checking for events using amixer sevents, which correctly gets ...
0
votes
1
answer
112
views
map regular file/directory to block device file [duplicate]
Is there a way to map a regular file/directory to a block device file? Basically I want to get the block file info being output by df file/directory command
df /tmp/ ...
Harry's user avatar
- 4,232
0
votes
1
answer
125
views
get physical block size of a device
In the below code I'm trying to get the physical block size of a device via file/directory path residing in the file system mount point of that device. I am supposed to get the same info as the ...
Harry's user avatar
- 4,232
1
vote
1
answer
107
views
Failed to create a TAP device using ioctl
#include <fcntl.h>
#include <net/if.h>
#include <linux/if_tun.h>
#include <sys/ioctl.h>
#include <unistd.h>
#include <string.h>
#include <stdio.h>
#include &...
1
vote
0
answers
38
views
How to correct write/read error with deviceIoControl from different processes?
Good afternoon
I have a kmdf driver that can read and write to a file.
Through a custom application I can send IOCTL requests. If I send a request from one process to write, from another process to ...
1
vote
0
answers
115
views
How to create a user space buffer from within a Linux kernel driver?
I'm trying to update an old kernel driver to run under Debian Bookworm, but I've run into trouble. Because this driver wraps around a different serial driver (e.g. /dev/ttyS4), it uses filp_open() on ...