Programming :: Possible To Open A Symlink (won't Follow) And Read Data From It?
Nov 9, 2010
I try to use open(2) system call, and I find one relevant flag: O_NOFOLLOW. But it will only return -1 rather than the symlink's file descriptor
View 5 Replies
ADVERTISEMENT
Jun 11, 2009
I am using read() in c++ to get data from a serial port. However, if no data is available on the serial port the function blocks until dta arrives.Example code:
//------------------------------------------------------------
char m_readBuffer[255] = {0};
char* p_curChar = m_readBuffer;
[code]...
View 1 Replies
View Related
May 9, 2010
I have some data files that should be distributed with my program. Using dist_pkgdata_DATA in Makefile.am, I get these files installed to /usr/local/data/share/package-name. The problem is that data is read-only, and my program needs to modify it. Playing with dist_sharedstate_DATA, dist_localstate_DATA, dist-data_DATA varibles, I got different installation directories, like /usr/local/com, usr/local/var, but data is always read-only.
How can I distribute modifiable data files with my package? I need some common directory for all users, or maybe local data in a user directory.
View 1 Replies
View Related
Aug 24, 2010
I need to read data from a socket but it should be always listening because data arrives continuously .. I thought something like this would do it but it doesn't work .... I already set the socket options before
Code: char databuf[1024];
int datalen = sizeof(databuf);
if(read(sd, databuf, datalen) < 0)
{
[Code]....
View 9 Replies
View Related
Aug 12, 2010
I've written a usb device driver and a program that sends and receives data over the bulk pipe. The read function sometimes returnsI'm reading an unknown amount of data. However, using a usb tracker I can see that the correct data is being sent.The error only occurs sometimes.I expect that the read function is told to read more data that it receives it would fail and return -1, however if this was the case then every read call would fail.
View 4 Replies
View Related
Aug 25, 2010
i want to try with a small application in linu in that i want to read some data from controller using serial port and i wanna transfor that data to another meachin in the network for this i want serial port interfacing programming as well as socket programming.
View 1 Replies
View Related
Oct 30, 2010
I am writing a C program which reads data over serial port. While reading data, if I send my data(which is a 13 byte structure) periodic with a period of 1 second for 10 times I read it without problem and I read the data 10 times as I sent and as I expectBut if I send data continuousuly(without any time interval between each sending) 10 times I can only read 1 of them(I can only read it once).
View 11 Replies
View Related
Jul 6, 2010
I am implementing a simple serial protocol where my ARM9 board, running Linux is communicating to a slave peripheral board. The Master sends a 12 byte data stream and the peripheral board returns status in a 23 byte response. The serial port is opened in raw mode. It works perfectly on 44 reads; however, on the 45 read the data returned from the read() is incorrect. I've framed what's being sent on an oscope and it is correct.The coincidence is that 23 x 44 = 1012. It's as though the receive buffer is 1K and when I go past the boundary I get bad data. The read following the bad one is good again.I've tried flushing the buffer before reading but get the same result.Here's the port initialization code:
Code:
int initport(int fd)
{
[code]...
View 4 Replies
View Related
Jan 26, 2010
Got these messages in syslog:
Code:
Jan 26 15:24:58 marconi named[28544]: starting BIND 9.6.1-P2 -u bind
Jan 26 15:24:58 marconi named[28544]: built with '--prefix=/usr' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--sysconfdir=/etc/bind' '--localstatedir=/var' '--enable-threads' '--enable-largefile' '--with-libtool'
[Code]....
This is BIND 9.6.1-P2 running on Ubuntu Server 9.10. When I move all the files from /var/bind into /etc/bind (replacing the symlink that was at /etc/bind), and change all instances of "/var" to "/etc", then it works. It seems to be the symlink that is doing it. Yet I need to get this moved over to "/var" and the Ubuntu packagers built it to use "/etc/bind".
Also, when I su to user "bind" and run "md5sum /etc/bind/named.conf" (with the symlink in place) it is able to read it just fine. Other users can read it just find. It's the "/usr/sbin/named" program that can't.
View 2 Replies
View Related
Oct 12, 2010
i want to open a txt file and then read line by line and display data with first line and label it 1 and then incremented by 1 for each additional line.
View 14 Replies
View Related
Dec 20, 2009
I have a Bash script that runs other bash scripts. If the parent code fails, is there any way for me to also kill the child code?That kills any multiple instances of a script if I run it more than once. Is there any way I can just modify this into something that prevents the child code from running/continuing from running if the parent stops from an error?
View 3 Replies
View Related
Mar 5, 2010
I have an application where I am sending data via serial port from PC1 (Java App) and reading that data in PC2 (C++ App). The problem that I am facing is that my PC2 (C++ App) is not able to read complete data sent by PC1 i.e. from my PC1 I am sending 190 bytes but PC2 is able to read close to 140 bytes though I am trying to read in a loop.Below is code snippet of my C++ AppOpen the connection to serial port
Code:
serialfd = open( serialPortName.c_str(), O_RDWR | O_NOCTTY | O_NDELAY);
if (serialfd == -1)
[code]...
View 5 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
Dec 14, 2010
I don't know if I'm doing something wrong but I've been running Ubuntu or a variant for about a year now and suddenly every now and then one or two of my documents (open office or pdfs) have no information and they won't open.
View 6 Replies
View Related
Sep 6, 2010
In the ordering of files I keep I need links to directories. Sometimes I even need to move directories to new locations. I have tried using symlinks, but they become dead when I move the directory they point to. I have tried hard links, but I haven't found any Linux file system that would support hard linked directories. How can I achieve that a complex structure of directories (currently with symlinks for directories and hard links for files) keep symlinks live when directories are moved?
- is there any utility that updates symlinks when a directory is moved?
- is there any Linux filesystem that supports hard linked directories?
- is there any good Linux interface to the new NTFS (the only file system I know to support automatically updating directory links, called directory junctions)?
View 9 Replies
View Related
Jul 17, 2010
I have an Acer Laptop with a built-in Crystal Eye webcamwhich works (tested it with luvcview).The camera is represented by /dev/video0.I would like to read data from this device, but i don't manage to do it.
This code Code: #include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
[code]....
View 3 Replies
View Related
Feb 18, 2010
how can i open the sosreport after generating it from the systemi need to know how to view the data inside it
View 1 Replies
View Related
Sep 9, 2010
Do we know of any utility that would read DIMM VPD data in the system? DIMMs on PCIe Card
View 3 Replies
View Related
Sep 1, 2010
Im having xeltek eeprom programer but I cannot read the chip data on the buffer file, when I read the chip using programer the datas are being sent to the buffer I can just see the adress line ,hex line and ascii line then I dont know which is the exactly data ,
View 1 Replies
View Related
Feb 15, 2010
How make, that disc be able to read and write data for all users? I have Ubuntu 9.
View 2 Replies
View Related
Jul 20, 2010
I have installed it and setup an apache conf. Nagios http page loads but shows errors on every sub-page.
Code:
Whoops!
Error: Could not read object configuration data!Here are some things you should check in order to resolve this error:
1. Verify configuration options using the -v command-line option to check for errors.
2. Check the Nagios log file for messages relating to startup or status data errors.
Make sure you read the documentation on installing, configuring and running Nagios thoroughly before continuing. If all else fails, try sending a message to one of the mailing lists. More information can be found at [URL]..Looking for some assistance, or better still PM me if you'd be willing to remote on and have a look for me.
View 14 Replies
View Related
Apr 3, 2011
I know there's a command to display the live amounts of data being written and read to the disk.Like, it tells you how many blocks have been read/written so far to a device
View 1 Replies
View Related
May 26, 2011
I wonder capability of awk to manipulate data in consecutive multi files by read one batch file.for example I have files: data1.dat, data2.dat,data3.dat and listfile.txt
cat data1.dat
23 34 54
43 45 76
[code]...
View 4 Replies
View Related
Apr 12, 2010
I'm having a slight dilemma on reading data from a text file and outputting it into a table then displaying it. Basically I'm writing a shell script that takes information from text files then outputs the data into a table with 4 headings.he extracting of the data is fine, but creating a table i'm having problems with. I think it is possible to do it using the awk function, but so far i'm having a lot of difficulties.
View 14 Replies
View Related
Mar 5, 2010
I am running ubuntu 8.10 on an old gateway as a server. I have vent up and running just fine. I went to configure the ventrilo_srv.ini file and now that I have made the changes, I need to restart the server program, which I am having problems doing. The following command returns the following:
sudo /home/taylor/ventrilo/ventsrv/ventrilo_srv restart
Ventrilo Server - Public - Version 3.0.3
(c)Copyright 1999-2008 Flagship Industries, Inc.
Unable to open configuration file 'ventrilo_srv.ini'.
ERROR: Unable to read configuration data. Exiting.
What am I doing wrong? Did I change something that shouldn't have been changed. I only set the name to something other than default and set the admin password.
View 1 Replies
View Related
Jun 29, 2011
I can read and write data dvds, but cannot play a regular dvd now. I have libdvdcss installed. I am running Slackware 64 13.37 (just installed).
Code:
MPlayer 20101218-4.5.1 (C) 2000-2010 MPlayer Team
Playing dvd://.
libdvdread: Using libdvdcss version 1.2.10 for DVD access
libdvdread: Could not open /dev/dvd with libdvdcss.
libdvdread: Can't open /dev/dvd for reading
[Code]...
It can see the drive is there and /dev/sr0 is linked to /dev/dvd and I tried running as root to check if it was a permissions problem but got the same thing.
I have tried lots of different DVDs in the drive, same issue. I even switched out my DVD drive to another old DVD-ROM I had laying around, same thing.
View 14 Replies
View Related
Dec 1, 2010
I am a total noob when it comes to opensuse. I just read the reviews and comments from forums taht's why I wanna try this alternative. I have 1 physical drive that has two partitions. 1 is dedicated for my windows OS (20 GB) and the other for my data (approx. 100GB).
How can I install opensuse 11.3 to just 1 partition (20GB) and leave my data partition (approx. 100GB) as it is? Can I still view/access/read the files from my data partition after I have successfully install opensuse 11.3 to my Os partition?
View 5 Replies
View Related
May 31, 2010
I'm having trouble with my optical drive (an LG GH22NP20).I can read a data DVD, but when I put in a standard audio CD it does not recognize it.I hear it spinning around in there, but if I check /media/ there are no files listed.?
View 4 Replies
View Related
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
Mar 8, 2011
I have a server listening on incoming client connections. Once the client establishes SSL connection with the server, the server waits on read() from the client. Only Client can disconnect the connection. I want to have a timer in the server program to wait for x secs after read() and then disconnect the Client connection.
View 3 Replies
View Related