From: Dan Shearer <dan@shearer.org>
To: Jeff Dike <jdike@addtoit.com>
Cc: user-mode-linux-devel@lists.sourceforge.net
Subject: Re: [uml-devel] Re: [PATCH] mconsole fixes
Date: Wed, 28 Jan 2004 12:46:52 +1030 [thread overview]
Message-ID: <20040128021652.GP4203@erizo.shearer.org> (raw)
In-Reply-To: <200401280146.i0S1kaZw004957@ccure.user-mode-linux.org>
On Tue, Jan 27, 2004 at 08:46:36PM -0500, Jeff Dike wrote:
> > - fprintf(stderr, "Sending command to '%s' : ", sun.sun_path);
> > - perror("");
> > - return;
> > + if (strlen(sun.sun_path)==0) {
> > + fprintf(stderr, "No connection exists, cannot send command.\n");
> > + } else {
> > + fprintf(stderr, "While sending command to '%s' : ", sun.sun_path);
> > + perror("");
> > + }
> > + return(1);
>
> I don't see the point of the strlen(sun.sun_path)==0 check, so I'm
> leaving that out until I see why it's necessary.
My idea was that there's a difference between an error on a connection
and no connection at all. Having no connection at all can happen very
easily, especially if you happen to use uml_dir on the cmdline which
triggers a bug that puts the file in the wrong place.
> I applied most of the rest of that. I got rid of the exits from main, since
> I like returns better and I tidied up some other stuff.
Minor portability potential. See
http://www.eskimo.com/~scs/C-faq/q11.16.html. (I looked it up once long
ago and supposedly _exit is more likely to work on more systems than
exit.)
--
Dan Shearer
dan@shearer.org
-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
next prev parent reply other threads:[~2004-01-28 2:14 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-01-26 2:46 [uml-devel] [PATCH] mconsole fixes Dan Shearer
2004-01-28 1:46 ` [uml-devel] " Jeff Dike
2004-01-28 2:16 ` Dan Shearer [this message]
2004-01-28 3:30 ` Dan Shearer
2004-01-28 4:39 ` Jeff Dike
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=20040128021652.GP4203@erizo.shearer.org \
--to=dan@shearer.org \
--cc=jdike@addtoit.com \
--cc=user-mode-linux-devel@lists.sourceforge.net \
/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.