Programming :: How To Open The Device Files
Feb 10, 2010
i want to open and read /dev/pts/o file as a user how can i open? using normal fopen and fread functions? is it possible to open lik dat ? it der any alternate way to open and read the device files in ubuntu
View 6 Replies
ADVERTISEMENT
Feb 18, 2010
i am creating program that gets 'key' string and directory path and finds if key string is present in any file under given path, everything seemed OK but when i put path like "/" after 5 mins i get error : Too many opened files. I've minimalized opened File object at the same time as much as posible, tried to call System.gc(),tried to close every stream every opened file, google but i still cannot search in bigger directories.
Algorithm (mine one is much bigger so i tried to make it as small as possible:
read 'path';
read 'key'(set as public);
#&
call method get('path') {
[Code]....
why I always get that runtime error ? (I need it to search hundreds of GB so when my 40GB partition do this what will bigger one do )
View 7 Replies
View Related
Feb 14, 2010
does anyone know how to open .doc .ppt .xls .docx.... files using java ? i found just Apache POI but it can open just .xls files.
View 4 Replies
View Related
Apr 13, 2010
All my music editing software programs say, "unable to open device /dev/dsp.Device or resource busy." How can I fix this?
View 3 Replies
View Related
Jun 11, 2011
I rebooted my server and out of nowhere the RAID5 array won't assemble. I've tried everything I could think of to reassemble the thing. I fear that the array is ruined, but I can't imagine how. Here are various bits of information: The simplest failure (with and without partition numbers, which have not been needed in the past):
Code:
richard@nas:~$ sudo mdadm --assemble --verbose /dev/md0 /dev/sd[bcd]
mdadm: looking for devices for /dev/md0
mdadm: cannot open device /dev/sdb: Device or resource busy
[code]...
View 5 Replies
View Related
May 1, 2010
This for Kernel 2.6.29.6. I'm trying to code a kernel module that displays process information.
how to count opened file descriptors per task. I have been able to write a module that lists all the current process names along with their pid number in /var/log/messages. Basically, I cycle through the ring of processes using the macro for_each_process(task) and printk the comm and pid of each task. I'm trying to see how many file descriptors each task has open. I've been reading up in books and all over the internet. At first I thought I needed to access max_fds under files_struct, but that just lists the maximum number of file descriptors that can be opened per task, which by default is set at 256. I then thought about counting the elements in the fd_array. But then I learned that every task's fd_array is initially set at 32. Now I know that I need to access open_fds of type fd_set * in files_struct. open_fds is a pointer to all the open file descriptors. The problem is that I don't know how to access a pointer of type fd_set.
Is there a good guide or book that really focuses on type fd_set and open_fds? Every book and resource I've read never really go into depth on this. relationship between files struct, open_fds, and the open file descriptors in task?
View 4 Replies
View Related
Feb 2, 2011
I'm trying to write a mediaplayer for my phone + computer in python... It is going well, but I ran into a problem when I moved the programme from my phone (where it worked) to my computer (where it didn't). The error I got was:
Code:
File "./hearse.py", line 169, in getSongInfo
File "/home/joshua/scripts/python2/myMusic.py", line 120, in getSongTitle
[code]....
View 2 Replies
View Related
Oct 18, 2010
I have two txt files containing x and y coordinates: xcoord.txt & ycoord.txt. I need to open them; read them line by line to get each coordinate; then each time I need to update Xs and Ys parameters inside another file called "dc.in" with the grabbed values.
Finally each time I need to run two exe files ( dc_2002 and st_vac) and produce corresponding output for each Xs and Ys ( dc.in is an input file for this exe files)
I have written the following code but it does not work:
View 14 Replies
View Related
Jan 9, 2010
they keep coming up with Error: To many open files but none of the files in them are open?
View 4 Replies
View Related
Dec 12, 2010
Server - Ubuntu 10.04.1 lts
Client - Kubuntu 10.10
When I try to open any nfs-mounted file using OpenOffice, I get a pop-up window titled "Document in Use". The text of the message is:
"Document file 'abcde.odt' is locked for editing by:
Unknown User
Open document read-only or open a copy of the document for editing." I then have three options - <Open Read-Only>, <Open Copy>, & <Cancel> If I cp any of these files from the mounted directory to my home dir (not mounted), I can open them without problem.Also, my firefox & thunderbird date are in this mounted directory as well (sym links to ~dan/.mozilla & ~dan/.thunderbird). Both of these apps hang when trying to open, leaving two processes behind that need to be manually killed. Again, cp'ing the data out of the nfs-mounted dir onto a local dir resolves the issue, so I am 100% confident there is nothing missing or corrupted in the firefox &/or thunderbird data...
relevant entry in /etc/fstab:
server:/nfs/dan/Documents /home/dan/Documents nfs defaults 0 0
relevant entry in server's /etc/exports:
/nfs/dan/Documents client(rw)
View 8 Replies
View Related
Oct 1, 2010
I have a while(1) loop, and the error is: glibtop: open (/proc/stat): Too many open files This error occurs after about a half hour to an hour of running. I've tried running this multiple times, both with using glib_close() at the end of the loop, using glib_init() and glib_close() at beginning/end, and just using glib_init(). The strange thing is these have no effect on the actual glib_get functions.
View 5 Replies
View Related
Oct 12, 2010
I cant open xls files in a shared folder using open office 3.1. Its all started when i install a new open office version. when im using open office 3.0.8 i can open all the files but now i cant even open it. Its always display untitled documents.
View 14 Replies
View Related
Aug 14, 2010
Dear experts,I have a question about open() function of gcc3.4.6.I write a example:
Code:
using namespace std;
#include<iostream>
#include<fstream>
int main()
{
[Code].....
It can be compiled and ran.The statement file=txt_stream_file is in order to change char* to const char*. But open() function is not work,and out: can not open plots/results.txt The open() function of gcc3.4.6 is:
[Code]....
View 4 Replies
View Related
May 30, 2010
I did searched you tube but my results were not great.I have 2 books on KernelProgramming.I feel I need if some where I can get a video tutorial which can help me to understand how to develop a Linux Device driver that will be great.I had a look at Greg Kroah Hartmans video lecture of developing patches on ......I have been reading books and a lot of stuff.So I wish if I could get a video lecture that would be better
View 1 Replies
View Related
Oct 25, 2010
I have a redhat ES3 I want virtualized.the virtual machine encounters a problem starting when it is virtualized
There are this message :
RAMDISK : couldn't find valid RAM Disk image Starting at 0.
VFS: Cannot open root device "LABEL=/" or 00:00
please append a correct "root=" boot option
Kernel panic: VFS: Unable to mount root fs on 00:00
View 2 Replies
View Related
Mar 18, 2010
Trying to configure perfctr-2.6.40 on CentOS 5.4 x86_64Followed the instructions given herethen thisbut when run ./examples/self/self get below errorvperfctr_open: No such devicetried to run perfex with -i option gives below errorerfex: open perfctrs: No such deviceoutput of file /dev/perfctr is below/dev/perfctr: character special (10/182)
View 1 Replies
View Related
Mar 22, 2011
I have added CentOS5.5 x86-64 to a linux box that already contains installations of Ubuntu 9 and SL 5.2. Grub2 was installed with Ubuntu and is on the MBR of the disk. I did not install grub with anaconda/Cent. Grub update in ubuntu finds the Cent install and addes it to the grub.conf, and Cent appears in the grub menu at boot. If I select Cent, I get the following error.
VFS: Cannot open root device "sda7" or unknown-block(0,0)
Please append a correct "root=" boot option
Below is the output of boot_info_script, which gives the relevant boot file data. There are still grub conf files on the SL install, but grub is not installed there anymore.
Boot Info Script 0.55 dated February 15th, 2010
=> Grub 2 is installed in the MBR of /dev/sda and looks on the same drive in partition #6 for /boot/grub .....
sda3/boot/grub/grub.conf:
# grub.conf generated by anaconda
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You do not have a /boot partition. This means that all kernel and initrd paths are relative to /, eg.
# root (hd1,2)
# kernel /boot/vmlinuz-version ro root=/dev/sdb3
# initrd /boot/initrd-version.img
View 1 Replies
View Related
Jan 7, 2010
I just added a 2 port network card to a system that is running Fedora 11, but it is INACTIVE. I open the Network Device Control to activate it but there is no network ports in Network Device Control. It is empty.It looks like the system recognize the card and loaded correct driver.
View 4 Replies
View Related
Jan 7, 2010
Still getting the "cdrecord has no permission to open the device" error when trying to burn an iso image to a DVD-RW.
I did yet another clean install of openSUSE 11.2 64 on my desktop computer, did updates, added Nvidia and Packman repos (it's not a repo problem as I tried it several times on a totally clean install), added codecs and stuff as advised by caf.
I updated the DVD drive firmware earlier today.
My user is a member of ALL groups.
Drive is an LG GH22NSS50 (sata)
It all works (with the same DVD-RW) under winxp on the same machine.
Is it HAL or something else that blocks permission to devices?
I'm really getting sick to death of this problem, and would be happy just to get rid of anything blocking permissions to the DVD drive.
View 9 Replies
View Related
Mar 6, 2010
I have installed moto4lin, as I want to be able to get pictures off my razr v3mM, which I could easily do in Windows. I found a guide for connecting a v3m, but for some reason moto4lin is screwing around with me. Here is my log:
[info] Phone is unplugged. Please connect it
[info] Phone plugged as AT
[info] Switching device /dev/ttyACM0 to P2K mode...
[error] Unable to open device
[error] Please check preferences
[info] Switching device /dev/ttyACM0 to P2K mode .....
View 5 Replies
View Related
Sep 13, 2010
I installed Ubuntu 9.10 a few days ago, did the updates, surfed on the net, mounted a slave drive and read everything on it, shut down, pulled the slave out and now I can't boot.
After the post screens I get: Verifying DMI pool data
Grub loading
error: the symbol 'grub-device-open' not found
grub rescue>
I think way back I had to reinstall grub or something on another machine I had but I don't remember anything about it. Is that what I have to do and how? Is it because I pulled that slave drive out that this happened? I want to get some more files off the slave as I wasn't finished.
View 9 Replies
View Related
Jan 21, 2011
I'm trying for the first time to work with sounds and edit them. I'm trying to use Gnome Wave Cleaner and don't know what to do about the error.
View 1 Replies
View Related
Jun 12, 2011
I have installed the Jack audio connection kit from [URL] The two listed dependencies, libsndfile and libsamplerate are installed and everything seemed to go well, except it's not listed in the KDE menus. But that's Ok. I can start it from /usr/bin/jackd But no I can't because I get these error messages:
oot@ed:/# jackd -R -d alsa
jackd 0.116.2
Copyright 2001-2005 Paul Davis and others.
jackd comes with ABSOLUTELY NO WARRANTY
This is free software, and you are welcome to redistribute it under certain conditions; see the file COPYING for details JACK compiled with System V SHM support. loading driver ..creating alsa driver ... hw:0|hw:0|1024|2|48000|0|0|nomon|swmeter|-|32bit control device hw:0 ALSA: Cannot open PCM device alsa_pcm for playback. Falling back to capture-only mode cannot load driver module alsa
[code]....
View 6 Replies
View Related
May 25, 2011
How do you convert Open Office (ODT) documents to Text files?
I have made a report using libre office. Now I wish to continue editing the document using lyx (latex front end). So the ODT file needs to be saved as some .tex file.
I don't see an option to do this in File menu (export/save as). So is there any other plugin to do this?
View 1 Replies
View Related
Dec 16, 2009
Got a little problem after the install of Fedora 12. First there was not problem in opening the raid-device, after i tryed to automount it with crypttab and fstab im not longer able to open it.
Here some outputs code...
View 2 Replies
View Related
Jan 18, 2010
I run Ubuntu 9.10 locally connecting to CentOS5 on a remote server.When I run the following command in the Terminal;ssh -v -L 10005:localhost:10000 root@remote_ip_address -F ~/.ssh_config -i ~/.ssh/private_key_file_nameafter 'Authentication succeeded (publickey)' I get the following for channel 1;sys_tun_open: failed to open tunnel control interface:Permission deniedhowever, it does open an interactive client-session on channel 2 and my browser will then connect (via URL localhost:10005) to Webmin on the remote server which is the object of the exercise.However, because sys_tun_open failed, I am concerned that the transactions may not be encrypted as I understand they would be in proper tunnelling
View 4 Replies
View Related
Feb 11, 2010
I have been trying to get tvtime or any tv package to work with my Pinnacle PCTV HD usb but I have not had success. I have correctly installed every driver imaginable. So, here is what it what it comes down to: When I open tvtime it says "cannot open capture device /dev/video0" and the screen is blue. But my usb PCTV HD stick is NOT /dev/video0 so the question is how can I get tvtime to look for the usb tv tuner rather than video0?
View 9 Replies
View Related
Apr 23, 2010
When booting up my IBM Thinkpad Ubuntu stalls giving the following messages:
Cannot open root device "uuid=58a5831c-5757-49f8.....
Kernal Panic - not syncing: Unable to mount root fs on unknown-block
Spurious ACK on isa0060/serio0. Some program might be trying to access hardware directly.
I am or was using Hardy.
It seems to me that the program is telling me it can't find the hard drive or the partition where the OS resides. I have my drive partitioned with into sections for booting, the OS and my Home directory.
View 7 Replies
View Related
Jan 22, 2011
I'm trying to view the output of a dv firewire capture device (advc-100) fullscreen through vlc. I've read of people being able to do this but a detailed explanation of how eludes me.
I'm running Ubuntu 10.10 and VLC 1.1.4
The error message I'm given after trying to open through 'media>open capture device>play' is;
Quote:
Your input can't be opened: VLC is unable to open the MRL 'v4l2:///dev/ffc1/'. Check the log for details.
(and I can't find the log)
I'm not even sure if I've got the device name right so I ran lspci from the command line which gave the following output (and I still can't work out what it is);
Quote:
[ 0.008410] ... event mask: 000000000003ffff
[ 0.014418] ACPI: Core revision 20100428
[ 0.020016] ftrace: converting mcount calls to 0f 1f 44 00 00
[ 0.020023] ftrace: allocating 21756 entries in 43 pages
[Code].....
View 1 Replies
View Related
May 4, 2011
I am new to k3b and trying to burn an iso and get the following message during the burn process .
"CDrecord has no permission to open the device".
View 7 Replies
View Related