Fedora :: Modify Ioctl TIOCMWAIT To Return The Same Thing That Ioctl TIOCMGET Returns?

Jul 4, 2011

I want to modify ioctl TIOCMWAIT to return the same thing that ioctl TIOCMGET returns. Currently wait returns an int of zero or -1 when a change in status occurs. Why not make it return the new status?

This will make the operation faster by not requiring another call to ioctl.The extra call requires 2 to 16 uSeconds to complete on my x64 laptop. How would I make this proposal to the kernal people?

View 1 Replies


ADVERTISEMENT

Programming :: Ioctl TIOCMGET Call Doesn't Detect TIOCM_CTS

Apr 6, 2011

I am having the following problem. The following code works fine on my P.C. Ubuntu x64, and on a jetway mini-itx board with an atom processor. The problem is, the same code doesn't work on the intel equivalent of the jetway board. I thought the maybe, I didn't have the port configured right, so I turned on Hardware Flow control and also tried turning on the modem bits I needed with TIOCMBIS. Neither worked. Here is the code. There are two threads, one of them, respsponding to the client, and using the RTS and DTR pins to power two relays. The other, manages listening to CTS and DSR for input. Here is the class with the first thread.

Code:

/*
* DigitalIOCore.cpp
*
* Created on: Nov 1, 2010
* Author: jonathan

[code]....

View 9 Replies View Related

Programming :: Return Error From Ioctl Command?

Jul 21, 2010

I'm creating a usb device driver that needs to be able to read from two different endpoints. I couldn't see any way of having two read functions in the driver, so I got round this by reading from one of the endpoints with read, and the other with ioctl.However this hasn't worked, the ioctl call from c returns -1. I added a printk command in the driver in the ioctl function, however looking at kern.log I can see that this function is never being called. Does anyone have any ideas as to what the problem called be, or a better method of being able to read from two different endpoints?

View 2 Replies View Related

Programming :: Console Window Size - Why Ioctl Always Return 0 Width

Jul 1, 2010

I use ioctl to get the console window size (the SSH window). I use the following code:
struct winsize ws;
int returnValue = ioctl(pCommandStructure->terminal, TIOCGWINSZ, &ws);
int numberOfColumnsOfTerminalWindow = ws.ws_col;
When I debug on linux pc, it gives me the correct window width. But after I try it on router (this is my enventual place where my code shall run), ioctl always give me 0 width, that is, numberOfColumnsOfTerminalWindow == 0. but the returnValue is 0 which means that the function call succeeds.

View 2 Replies View Related

Programming :: Get Console Window Width - Why Ioctl Always Return 0 Width

Jul 1, 2010

I use ioctl to get the cosole window size (the SSH window).

I use the following code:

When I debug on linux pc, it gives me the correct window width. But after I try it on router (this is my enventual place where my code shall run), ioctl always give me 0 width, that is, numberOfColumnsOfTerminalWindow == 0. but the returnValue is 0 which means that the function call succeeds.

View 2 Replies View Related

Hardware :: How To Spin-up HDD Using Ioctl

May 8, 2010

I have used the following code for HDD spindown.

Quote:

{
#ifndef WIN_STANDBYNOW1
#define WIN_STANDBYNOW1 0xE0
#endif

[code]....

Is ther any ioctl command to do HDD spin-up from spin-down? or Is there any way to HDD spin-up?

View 2 Replies View Related

Networking :: Unable To Get IPv6 Addresses Using Ioctl()

Feb 4, 2011

I am able to retrieve IPv4 addresses with ioctl. But it is not returning IPv6 addresses. My requirement is to get both IPv4 and IPv6 addresses. I can not use getifaddrs() since it has to be common code between linux, solaris and aix. Solaris and AIX are not having getifaddrs(). Following code is returning only IPv4 addresses.

Code:
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/ioctl.h>
#include <netdb.h>

[Code]....

View 1 Replies View Related

Software :: Ioctl - ATM_SETBACKEND - No Such Device - Speedtouch 330

May 24, 2010

I have a problem with USB modem SpeedTouch 330 in SUSE

When I execute:

Code:

I see this:

Code:

I have checked command 'lsmod' and it returns

Code:

In general I see speedtch is several times in the output of lsmod

When I check this:

Code:

I see

Code:

Why I cannot establish a connection to the internet?

View 1 Replies View Related

Programming :: IOCTL Error - To Get The Ssid Through C Program

Feb 28, 2011

I was trying to get the ssid of WLAN through the following C program

What is the cause of this error?

View 1 Replies View Related

Programming :: Writing And Reading Driver Value In Ioctl?

Jan 18, 2011

I just want to read and write some values (integer) to my driver. I used put/get user but always getting errors.

driver

Quote:

int Wert;
static int device_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsinged long arg)
int ret;

[code]...

Quote:

int WERT
ret=ioctl(fd, SETIT, WERT)
ret=ioctl(fd, GETIT, WERT)

if i say in C++ WERT is 5 the value arg of the driver becomes 5 but not WERT the returnvalue of get and put user is -1 so it failed.

View 12 Replies View Related

Networking :: Hget IPv6 Address Using Ioctl() SIOCGIFADDR

May 19, 2010

I have retrieved IPv4 address successfully using

Code:
struct ifreq ifr;
fd = socket(AF_INET, SOCK_DGRAM, 0);
ifr.ifr_addr.sa_family = AF_INET;
ioctl(fd, SIOCGIFADDR, &ifr)
for IPv6 address I tried

[Code]....

View 5 Replies View Related

General :: Define File_operations For Kernel Ioctl Call?

Apr 8, 2010

I have a kernel function device_ioctl(). How do I define it in file_operations?

1. struct file_operations memory_fops = {
ioctl:device_ioctl
};
2. struct file_operations memory_fops = {
.ioctl=device_ioctl
};
3. struct file_operations memory_fops = {
device_ioctl
};

which one is the right one?

View 1 Replies View Related

Programming :: Find The Device Name For Ioctl (sd, SIOCGIFINDEX, &ifr) Call?

Feb 12, 2010

Hi I am trying to add the device by using followig code strip and it says that eth1 is not defind in the code.

strncpy(ifr.ifr_name,eth1,IFNAMSIZ);
if (ioctl(sd, SIOCGIFINDEX, &ifr) == -1) {
return 0;
}

How do I write down the DEVICE name in the ifr.ifr_name structure ?

View 2 Replies View Related

Fedora X86/64bit :: Device-mapper - Reload Ioctl Failed - Invalid Argument Failed To Suspend LogVol00

Sep 10, 2009

I've read hundreds of threads on this problem but they seem to be intermittent and the resolution has been using a different kernel version.

I'm using the latest kernel but I still have this problem

Running Logical Volume Manager gui and attempting to extend the volume results in the same error.

View 3 Replies View Related

General :: Assign IPV6 Address Using IOCTL System Call?

Jul 22, 2011

Please send me the code how to assign ipv6 address using ioctl system call using C.

View 1 Replies View Related

Slackware :: Xorg Suddenly Won't Start (EE) Ioctl EVIOCGNAME Failed

Sep 24, 2010

This morning I logged in and typed startx. My box said:

(EE) ioctl EVIOCGNAME failed: Inappropriate ioctl for device
(EE) PreInit returned NULL for "Mouse1"

Since I have two computers, basically identical, I looked up stuff on one and I decided to upgrade the problem box to 13.1 from 13.0 since that would undoubtedly fix the problem. Well, the problem is the same. However, root can startx just fine. Also, gpm seems to work fine for the user.

View 4 Replies View Related

Software :: In Platform \ Use Ioctl Function To Read/write Data To Hid Device?

Jun 24, 2011

Now i have a problem.I want to used a hid usb device under linux 2.6.11.But i can't know how to used ioctl function to send and receive data to a hid device

View 3 Replies View Related

Ubuntu :: Error: Device-mapper: Reload Ioctl Failed: Invalid Argument

Jun 13, 2010

I'm having some difficulities with truecrypt and cannot figure out what's wrong since this is my first attempt to create hidden encrypted partition. I'm using ubuntu 9.10 64b with latest 6.3a truecrypt. After using truecrypt gui (just command truecrypt) I've tried: create volume-->create volumne within a partition/drive-->hidden trucrypt volume --> select some /dev/sdX by my choice --> select aes & sha512 --> password --> and format it.

when formating finished message "wrong ss, swith or wrong superblock of /dev/loop0" appeared. I've got no idea what could I do with it neither know whats program trying to do! Ok formating's done, then if you're trying to mount that partition then I would expect prompt for password, but that did not happen ...

EDIT: sudo mount /dev/loop0 /media/tmp/ also complaint about wrong superblock, but that does not ring any bell since i've got no idea what /dev/loop0 is or is for...

EDIT2: I've tried another approach also:

sudo truecrypt -t -c
sudo truecrypt -t /dev/sda3 --filesystem=none

but the first command finished creating 100G drive in 1 sec (nonsense) and latter one prints:

Error: device-mapper: reload ioctl failed: Invalid argument
Command failed

View 3 Replies View Related

OpenSUSE Hardware :: Mounting Encrypted Fs Error : Remove Ioctl Failed: Device Or Resource Busy

Dec 5, 2010

The error message I keep getting during mounting is:-

device-mapper: remove ioctl failed: Device or resource busy

This is from ane external USB HDD I use as a backup device. I've tried formatting it as ext4 ane encrypting it from the command line

# mkfs.ext4 /dev/sdc1
# cryptestup luksFormat /dev/sdc1

which run without errors but an attempt to mount throws up the above error as well as saying - you must specify the file type (tried that) - and fails to mount. I've tried using YaST to format and encrypt it which throws up the same error when I run mount but actually does actually mount the filesystem Googling around has brought up info saying that it's probably a race condition brought on by invalid udev rules. I've got a (mostly) working system and the udev rules documentation leaves more confused than when I started.

View 8 Replies View Related

Ubuntu :: Losetup Disk Encryption - Ioctl: LOOP_SET_STATUS: Invalid Argument, Requested Cipher Or Key Length (128 Bits) Not Supported By Kernel

Dec 14, 2010

In 10.04 I was using the following commands to mount an encrypted disk image:

Code: sudo losetup -f Which tells what loop back device block is available Then I'd type:

Code: sudo losetup -e aes /dev/loop0 /home/user/crypt.img and then enter the device's password

Code: sudo mount -t ext4 /dev/loop0 /media/crypt I've tried this in 10.10 and it hasn't been working (I can't remember if I did anything in 10.04 to make it work). I've installed the loop-aes-utils package and restarted my machine. Every time I try the 2nd step, after entering the password I get: Code: ioctl: LOOP_SET_STATUS: Invalid argument, requested cipher or key length (128 bits) not supported by kernel

View 1 Replies View Related

Ubuntu :: Know Where Is The "ioctl" Source Code

Jun 20, 2010

I want to know where is the "ioctl" source code?It's header file can be found in "/usr/include/sys/ioctl.h"And is as below:

Code:
#ifndef_SYS_IOCTL_H
#define_SYS_IOCTL_H1

[code]....

View 3 Replies View Related

Ubuntu :: Modify The Keypress Return Symbols?

May 8, 2011

When I press the keyboard button: (- _) I would like to see a '_' on the screen instead of a '-'. How can this be done? {Lucid 10.4}

View 2 Replies View Related

Fedora :: Stopping And Replaying File Causes Same Thing To Happen Again

Jul 29, 2009

I am having a problem with sound in a range of applications. Playing an mp3 file is OK for 30 seconds or so, and then it seems to skip and make crackling noises. Stopping and replaying the file causes the same thing to happen again. I have installed all the mp3 codecs so i'm not sure what's going on.

View 14 Replies View Related

Fedora :: New Install - Cannot Log In - Changes The Screen - Gives A Spinny Cursor Thing

Aug 11, 2010

I finally managed to install Fedora onto this machine and get it to the login prompt. That is where I've come unstuck: I try to login, it changes the screen, gives a spinny cursor thing, then a little shake and back to the login screen.

View 14 Replies View Related

Red Hat / Fedora :: Use Like Mail Server To Prepare Every Thing For Step?

Jan 19, 2011

step by step to use this as mail server and if it will be hard i need help from him to give me books and i will read and start to use also i need ex plane what i need to use like mail server to prepare every thing for this step it will be more great if i found this in this forums because i read a lot in web sites but i cant found any helpful thing in this case.

View 5 Replies View Related

Fedora Hardware :: /etc/sysconfig/hddtemp That The Silly Thing Won't Completely Ignore?

Jun 2, 2011

Either the documentation on this -- or the eyes and brain I'm reading it with -- is/are clear as mud.This has been busted since I tried to install it a few months ago. <....>In short, what entries and parameters (and in what syntax) do I need to park in: /etc/sysconfig/hddtemp that the silly thing won't completely ignore?

View 14 Replies View Related

Fedora Servers :: Unable To Employ Hack It Attitude In Case Bring The Whole Thing Down

Feb 17, 2009

I'm quite new to xen and only have access on a production box (which happens to be debian) so I am unable to employ my hack it attitude in case i bring the whole thing down. When i run xm list it displays my domains but my states are rather confusing.

[Code]...

View 2 Replies View Related

Fedora :: Firefox Will Returns An Error

Mar 11, 2011

I am unable to run firefox on my Hp mini 110 running FC14. This happened, I think, after an update that I have done.

When ever I run firefox I get the following messages.

Code:

View 5 Replies View Related

Fedora :: XAWTV Cannot Run - Returns Error

May 9, 2011

I am using Fedora 14 (64 bit version): Can't Start XAWTV. Returns the error.
$ xawtv
This is xawtv-3.99.rc6, running on Linux/x86_64 (2.6.35.12-90.fc14.x86_64)
xinerama 0: 1920x1080+0+0
WARNING: No DGA direct video mode for this display.
WARNING: keeping fbuf pitch at: 7680, as no base addr was detected
WARNING: couldn't find framebuffer base address, try manual
configuration ("v4l-conf -a <addr>")
v4l2: WARNING: framebuffer base address mismatch
v4l2: me=(nil) v4l=(nil)
Warning: Missing charsets in String to FontSet conversion
Warning: Missing charsets in String to FontSet conversion
Oops: can't load any font

View 1 Replies View Related

Fedora :: Ssh Timeout - Returns Deatils Of Two Adapters - 'lo' And 'p2pl'

Jun 15, 2011

I am very new to this and seem to have fallen at the first hurdle configuring ssh...

I believe I have got ssh running (on Fedora 15) as running:

results in a password prompt and successful login

Then to find my ipaddress i ran:

this returns deatils of two adapters... 'lo' and 'p2pl'. I assumed p2pl was the one (although was expecting something like eth0) and took the address to be 'inet addr: 192.168.1.5'.

However, using this from putty on my windows7 machine (locally) results in a fatal network timeout everytime.

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved