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?
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
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?
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.
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.
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.
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.
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
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...
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.
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
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.
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.
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.
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?
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.
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
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.