From: Dan Shearer <dan@shearer.org>
To: user-mode-linux-devel@lists.sourceforge.net
Subject: [uml-devel] PATCH check for sys_sendfile() in port_user.c
Date: Tue, 27 Jan 2004 15:20:14 +1030 [thread overview]
Message-ID: <20040127045014.GZ4203@erizo.shearer.org> (raw)
[-- Attachment #1: Type: text/plain, Size: 613 bytes --]
Some kernels (including SuSE 2.4.20, according to
http://marc.theaimsgroup.com/?l=user-mode-linux-user&m=107437381718023&w=2)
don't have sys_sendfile, in which case the port console driver should
refuse to start up because there is no way for telnetd to get the fd.
This might not be obvious to debug.
NOTE! Not tested because it doesn't bite me! Beyond the fact that it
works on systems *with* sendfile() :-)
Should be the final word in anyone who wants to throw out commandline
parameter passing for xterm in favour of fd passing.
(And one more tiny little portability aid.)
--
Dan Shearer
dan@shearer.org
[-- Attachment #2: sendfile_patch --]
[-- Type: text/plain, Size: 380 bytes --]
--- port_user.c.orig 2004-01-24 15:48:53.000000000 +1030
+++ port_user.c 2004-01-27 15:05:40.000000000 +1030
@@ -35,6 +35,11 @@
char *end;
int port;
+ if(sys_sendfile() == -1){
+ printk("port_init : host kernel doesn't support sendfile()\n");
+ return(NULL);
+ }
+
if(*str != ':'){
printk("port_init : channel type 'port' must specify a "
"port number\n");
next reply other threads:[~2004-01-27 4:47 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-01-27 4:50 Dan Shearer [this message]
2004-01-28 4:39 ` [uml-devel] PATCH check for sys_sendfile() in port_user.c 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=20040127045014.GZ4203@erizo.shearer.org \
--to=dan@shearer.org \
--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.