All of lore.kernel.org
 help / color / mirror / Atom feed
From: joy <gracecott@sancharnet.in>
To: "Huber, George K RDECOM CERDEC STCD SRI" <George.K.Huber@us.army.mil>
Cc: linux-c-programming@vger.kernel.org
Subject: Re: problem in open sys call
Date: Wed, 21 Apr 2004 14:40:01 +0530	[thread overview]
Message-ID: <40863A69.9090409@sancharnet.in> (raw)
In-Reply-To: 33120BB62E0A7643AE75E2B03CA0EDA08E3A18@mail7.monmouth.army.mil

Huber, George K RDECOM CERDEC STCD SRI wrote:

 >Hi,
 >
 >Try this:
 >
 >	if((fd=open(opcode, O_RDONLY))==-1)
 >      {
 >	  printf("Open failed, error code: %d\n%s\n", errno, strerror(errno)
 >      }
 >		
 >you may need to add errno.h and string.h to the list of includes. 
This will
 >give you the error code and desctiption of why open is failing.
 >
 >
thanks a lot, george but I think Glynn hit the nail on the head. the
code was working fine before I added the opcode variable in main
and totlly neglected to see it while gdb'ing.

 >George Huber
 >SRI, International
 >
 >-----Original Message-----
 >From: linux-c-programming-owner@vger.kernel.org
 >[mailto:linux-c-programming-owner@vger.kernel.org]On Behalf Of joy
 >Sent: Tuesday, April 20, 2004 2:32 PM
 >To: linux-c-programming@vger.kernel.org
 >Subject: problem in open sys call
 >
 >
 >Hi,
 >I have a small prblem i the open call. it fails every time and I dont
 >know why.
 >
 >thanx in advance,
 >Joy.M.M
 >-
 >To unsubscribe from this list: send the line "unsubscribe 
linux-c-programming" in
 >the body of a message to majordomo@vger.kernel.org
 >More majordomo info at  http://vger.kernel.org/majordomo-info.html
 >
 >
 >





  reply	other threads:[~2004-04-21  9:10 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-04-20 19:22 problem in open sys call Huber, George K RDECOM CERDEC STCD SRI
2004-04-21  9:10 ` joy [this message]
2004-04-21 10:08   ` Holger Kiehl
  -- strict thread matches above, loose matches on Subject: below --
2004-04-20 18:31 joy
2004-04-20 20:06 ` Glynn Clements
2004-04-21  9:00   ` joy
2004-04-20 21:35 ` Steven Smith
2004-04-21  6:14 ` Vadiraj C S

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=40863A69.9090409@sancharnet.in \
    --to=gracecott@sancharnet.in \
    --cc=George.K.Huber@us.army.mil \
    --cc=linux-c-programming@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.