473,387 Members | 1,483 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

errno 72

Hi
Does someone knows what does errno 72 means
I got this error when fwriting a structure and still the file is being
created.
I saw something on the net saying that this is caused when trying to
access different file system

Mar 29 '06 #1
3 3372

eyalc1...@gmail.com wrote:
Hi
Does someone knows what does errno 72 means
I got this error when fwriting a structure and still the file is being
created.
I saw something on the net saying that this is caused when trying to
access different file system


You can try using `strerror()` and `perror()` functions, but the result
is not guaranteed to be meaningful. You have to consult your
implementation documentation, and hope it's defined there. Try asking
in the group dedicated to your implementation/OS/whatever.

--
BR, Vladimir

Mar 29 '06 #2
ey*******@gmail.com writes:
Does someone knows what does errno 72 means
I got this error when fwriting a structure and still the file is being
created.
I saw something on the net saying that this is caused when trying to
access different file system


You can use perror or strerror to get a message related to the error.
Specific errno values aren't portable. (On several systems I've just
checked, it means "RPC structure is bad", "Multihop attempted",
"Locked lock was unmapped", or "A connection is ended by software.".)

But it won't necessarily be meaningful. The fwrite() function doesn't
necessarily set errno on an error -- and any function can set errno to
a non-zero value whether it fails or not. (errno might be set as a
side effect of calling a lower-level function.) You can (sometimes)
use errno to determine which error occurred, but not to find out
whether an error occurred or not.

If you set errno to 0 before calling fwrite(), *and* the value
returned by fwrite() indicates that an error occurred, *and* error is
non-zero after the call, then it's likely (but not guaranteed) that
the value of errno will then be meaningful.

--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
Mar 29 '06 #3
Keith Thompson wrote:
<snip>
If you set errno to 0 before calling fwrite(), *and* the value
returned by fwrite() indicates that an error occurred, *and* error is
non-zero after the call, then it's likely (but not guaranteed) that
the value of errno will then be meaningful.

<ot>For all the moaning people do about performance, exceptions really
aren't that bad an idea, are they? :-)</ot>

S.

Mar 29 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Richard Tobin | last post by:
In a library I am writing, I want to use an errno-like mechanism for error returns. The error would probably be represented as a struct rather than just an integer. I don't have any...
3
by: Mac | last post by:
Is it legal to declare errno after you've included errno.h? For example: #include<errno.h> .... int main (void) {
3
by: RoSsIaCrIiLoIA | last post by:
On Wed, 05 May 2004, CBFalconer <cbfalconer@yahoo.com> wrote: >Even if sscanf succeeds in inputting various fields, there are >probably range and other validity checks to be applied. The...
4
by: Paul Emmons | last post by:
If I am writing a function that sets errno according to a possible error condition, should it also set errno to 0 if it executes normally, or should it leave errno alone on success?
11
by: Vijay Kumar R Zanvar | last post by:
> In <pan.2004.04.22.04.06.05.969827@bar.net> "Mac" <foo@bar.net> writes: > > >Is it legal to declare errno after you've included errno.h? > > > >For example: > > > >#include<errno.h> > > >...
18
by: pete | last post by:
On my system, the following five expressions are true: (HUGE_VAL == HUGE_VAL / 2) (1 / HUGE_VAL == 0) (sqrt(HUGE_VAL) == HUGE_VAL) (sqrt(-1) == HUGE_VAL) (sqrt(-HUGE_VAL) == HUGE_VAL) and
5
by: Urs Beeli | last post by:
I have a question regarding errno. If I understand it correctly, including <errno.h> allows me to check "errno" for error values that some standard library functions may set. This brings up some...
13
by: Spiros Bousbouras | last post by:
Assume I'm writing a function which is going to set the value of errno if something went wrong but I also want to guarantee that errno will remain unchanged if the function completed its task...
22
by: viza | last post by:
Hi all, A quick one - since errno is a lvalue, can I do: fread( & errno, sizeof errno, 1, fp ) ? TIA viza
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.