lkml.org 
[lkml]   [1999]   [Nov]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[patch] 2.3.24: binfmt_script.c should support DOS end of lines


This is a one line patch for 2.3.24.
binfmt_script.c doesn't handle DOS
\r\n end of lines. Perl, for example,
supports DOS formatted scripts.

Chris Sears
dbsears@ix.netcom.com


--- binfmt_script.c~ Sun Nov 14 11:04:09 1999
+++ binfmt_script.c Sun Nov 14 11:09:58 1999
@@ -31,7 +31,7 @@
bprm->dentry = NULL;

bprm->buf[127] = '\0';
- if ((cp = strchr(bprm->buf, '\n')) == NULL)
+ if ((cp = strpbrk(bprm->buf, "\n\r")) == NULL)
cp = bprm->buf+127;
*cp = '\0';
while (cp > bprm->buf) {

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:55    [W:0.029 / U:0.928 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site