Account Options

  1. Sign in
The old Google Groups will be going away soon.
Switch to the new Google Groups.
Google Groups Home
« Groups Home
write_data in ixpc from libixp
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  1 message - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
sqweek  
View profile  
 More options Aug 25 2008, 7:44 pm
From: sqweek <sqw...@gmail.com>
Date: Tue, 26 Aug 2008 07:44:30 +0800
Local: Mon, Aug 25 2008 7:44 pm
Subject: write_data in ixpc from libixp
 Does this look odd to anyone else?

static void
write_data(IxpCFid *fid, char *name) {
        void *buf;
        uint len;

        buf = emalloc(fid->iounit);;
        do {
                len = read(0, buf, fid->iounit);
                if(len >= 0 && ixp_write(fid, buf, len) != len)
                        fatal("cannot write file '%s': %s\n", name, ixp_errbuf());
        } while(len > 0);

        free(buf);

}

 Specifically, if(len >= 0 ..., which causes a 0 byte write at EOF. I
don't see any other 9p clients that behave this way.
-sqweek

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »