Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

explain_ioctl_or_die(3) [debian man page]

explain_ioctl_or_die(3) 				     Library Functions Manual					   explain_ioctl_or_die(3)

NAME
explain_ioctl_or_die - control device and report errors SYNOPSIS
#include <libexplain/ioctl.h> int explain_ioctl_or_die(int fildes, int request, void *data); DESCRIPTION
The explain_ioctl_or_die function is used to call the ioctl(2) system call. On failure an explanation will be printed to stderr, obtained from explain_ioctl(3), and then the process terminates by calling exit(EXIT_FAILURE). This function is intended to be used in a fashion similar to the following example: int result = explain_ioctl_or_die(fildes, request, data); fildes The fildes, exactly as to be passed to the ioctl(2) system call. request The request, exactly as to be passed to the ioctl(2) system call. data The data, exactly as to be passed to the ioctl(2) system call. Returns: This function only returns on success, see ioctl(2) for more information. On failure, prints an explanation and exit()s. SEE ALSO
ioctl(2) control device explain_ioctl(3) explain ioctl(2) errors exit(2) terminate the calling process COPYRIGHT
libexplain version 0.52 Copyright (C) 2008 Peter Miller explain_ioctl_or_die(3)

Check Out this Related Man Page

explain_dup_or_die(3)					     Library Functions Manual					     explain_dup_or_die(3)

NAME
explain_dup_or_die - duplicate a file descriptor and report errors SYNOPSIS
#include <libexplain/dup.h> void explain_dup_or_die(int fildes); DESCRIPTION
The explain_dup_or_die function is used to call the dup(2) system call. On failure an explanation will be printed to stderr, obtained from explain_dup(3), and then the process terminates by calling exit(EXIT_FAILURE). This function is intended to be used in a fashion similar to the following example: explain_dup_or_die(fildes); fildes The fildes, exactly as to be passed to the dup(2) system call. Returns: This function only returns on success. On failure, prints an explanation and exits. SEE ALSO
dup(2) duplicate a file descriptor explain_dup(3) explain dup(2) errors exit(2) terminate the calling process COPYRIGHT
libexplain version 0.52 Copyright (C) 2008 Peter Miller explain_dup_or_die(3)
Man Page

11 More Discussions You Might Find Interesting

1. UNIX Desktop Questions & Answers

Warning message ioctl

Has anyone over seen this message on bootup? When booting up, I get: " Warning: lckdioctl: unknown ioctl cmd:5 ". It scrolls down the screen 5 - 10 times, the I finally get a login. It is also posting to my syslog file. The system came up, but I am still getting the message... (1 Reply)
Discussion started by: Diana
1 Replies

2. Solaris

ioctl() fails to get window size from console login

Hi, I need to get the console window size for an application, for which I used ioctl() by passing the TIOCGWINSZ parameter. The ioctl() function does not fail (returns non zero), but it could not get the window size (gets 0x0). When I tried to verify the window size by the stty -a command, the... (2 Replies)
Discussion started by: diganta
2 Replies

3. Filesystems, Disks and Memory

Inappropriate ioctl for device

Hi, We are running a perl script to upload some data using SQL* Loader. We pipe the data in a http request to SQL*Loader which loads the data to the database. We encounter the error "Inappropirate ioctl for device" when we try to upload huge data. Any solution would be greatly appreciated.... (4 Replies)
Discussion started by: tojaiganesh
4 Replies

4. UNIX for Dummies Questions & Answers

Using Sudo

Hi All, I have been trying to use the option -S in sudo for quite some time now but have not been successful. I get the error "Inappropriate ioctl for device" most of the time. Can anyone please tell me how to use this option to pass the password. Your help is appreciated. Thanks, Ambika (2 Replies)
Discussion started by: ambika
2 Replies

5. Programming

how to use ioctl to check out memory usage

Hi all, I tried to output memory usage information while the process is executing at a particular time. I found out some people suggesting calling the ioctl. I followed it and wrote a test example: #include <unistd.h> #include <stdlib.h> #include <iostream.h> #include <fcntl.h> #include... (2 Replies)
Discussion started by: lanchen
2 Replies

6. UNIX for Dummies Questions & Answers

Inappropriate ioctl for device

When I try to format a slice in Solaris 10 I get the follow error :confused: : -bash-3.00# mkfs /dev/dsk/c1d0s5 18877824 Can not determine partition size: Inappropriate ioctl for device Some format command output:.... AVAILABLE DISK SELECTIONS: 0. c1d0 <DEFAULT cyl 38735 alt 2... (0 Replies)
Discussion started by: spoonman
0 Replies

7. UNIX for Dummies Questions & Answers

Inappropriate ioctl for device

Hello, I have a cron entry: 59 23 * * * . $HOME/.profile;mydate=`date '+%Y%m%d'`;mv filename filename_$mydate Which works fine interactively, but gives me the following error when it runs in cron: Your "cron" job on servername . $HOME/.profile;mydate=`date '+ produced the... (4 Replies)
Discussion started by: steelrose
4 Replies

8. Solaris

Inappropriate ioctl for device, format error

When I try to format a slice in Solaris 10 I get the follow error : -bash-3.00# mkfs /dev/dsk/c1d0s5 18877824 Can not determine partition size: Inappropriate ioctl for device Some format command output:.... AVAILABLE DISK SELECTIONS: 0. c1d0 <DEFAULT cyl 38735 alt 2 hd 64 sec 63>... (2 Replies)
Discussion started by: spoonman
2 Replies

9. Shell Programming and Scripting

Inappropriate ioctl for device

Dear all, Problem goes like this: I have a shell script which when run manually runs perfectly. When same script is executed through a job schdeduler I get an error as Inappropriate ioctl for device and the script fails. This problems seems quite guiling to me. Any clues are heartly... (11 Replies)
Discussion started by: RishiPahuja
11 Replies

10. Programming

Using ioctl to read mice inputs

I was wondering if its possible to read mouse inputs using ioctl functions somehow ? If it is not too much of trouble can anyone write or even direct me to sample code of ioctl reading someother HID. (2 Replies)
Discussion started by: maverick_
2 Replies

11. UNIX for Advanced & Expert Users

ioctl : strace

Hi All, int ioctl(int d, int request, ...); Can somebody tell me how does ioctl decides the input parameter: "request". Sometimes, its SNDCTL_TMR_TIMEBASE or TCGETS or FIONREAD...etc. What is the pattern?? I am asking this coz my strace returns this: ... (1 Reply)
Discussion started by: angad.makkar
1 Replies