From: Ingo Oeser <ingo.oeser@informatik.tu-chemnitz.de>
To: linux-kernel@vger.kernel.org
Subject: [PATCH] Enable compilation of fs/readdir.c for gcc 2.95.2
Date: Mon, 30 Dec 2002 23:43:49 +0100 [thread overview]
Message-ID: <20021230234349.F628@nightmaster.csn.tu-chemnitz.de> (raw)
Hi there,
if you also have problems compiling 2.5.5x, then your compiler is
too old as is mine.
Anyway, since I don't like to upgrade now, I hacked the offending
file fs/readdir.c and can compile a kernel again ;-)
Have fun!
Ingo Oeser
diff -Naur linux-2.5.53-mm2/fs/readdir.c linux-2.5.53-mm2-ioe/fs/readdir.c
--- linux-2.5.53-mm2/fs/readdir.c Fri Dec 27 13:49:53 2002
+++ linux-2.5.53-mm2-ioe/fs/readdir.c Mon Dec 30 21:51:53 2002
@@ -134,18 +134,18 @@
return -EINVAL;
dirent = buf->previous;
if (dirent) {
- if (__put_user(offset, &dirent->d_off))
+ if (put_user(offset, &dirent->d_off))
goto efault;
}
dirent = buf->current_dir;
buf->previous = dirent;
- if (__put_user(ino, &dirent->d_ino))
+ if (put_user(ino, &dirent->d_ino))
goto efault;
- if (__put_user(reclen, &dirent->d_reclen))
+ if (put_user(reclen, &dirent->d_reclen))
goto efault;
if (copy_to_user(dirent->d_name, name, namlen))
goto efault;
- if (__put_user(0, dirent->d_name + namlen))
+ if (put_user(0, dirent->d_name + namlen))
goto efault;
((char *) dirent) += reclen;
buf->current_dir = dirent;
@@ -226,22 +226,22 @@
return -EINVAL;
dirent = buf->previous;
if (dirent) {
- if (__put_user(offset, &dirent->d_off))
+ if (put_user(offset, &dirent->d_off))
goto efault;
}
dirent = buf->current_dir;
buf->previous = dirent;
- if (__put_user(ino, &dirent->d_ino))
+ if (put_user(ino, &dirent->d_ino))
goto efault;
- if (__put_user(0, &dirent->d_off))
+ if (put_user(0, &dirent->d_off))
goto efault;
- if (__put_user(reclen, &dirent->d_reclen))
+ if (put_user(reclen, &dirent->d_reclen))
goto efault;
- if (__put_user(d_type, &dirent->d_type))
+ if (put_user(d_type, &dirent->d_type))
goto efault;
if (copy_to_user(dirent->d_name, name, namlen))
goto efault;
- if (__put_user(0, dirent->d_name + namlen))
+ if (put_user(0, dirent->d_name + namlen))
goto efault;
((char *) dirent) += reclen;
buf->current_dir = dirent;
@@ -280,7 +280,9 @@
if (lastdirent) {
struct linux_dirent64 d;
d.d_off = file->f_pos;
- __put_user(d.d_off, &lastdirent->d_off);
+ error = -EFAULT;
+ if (put_user(d.d_off, &lastdirent->d_off))
+ goto out;
error = count - buf.count;
}
--
Science is what we can tell a computer. Art is everything else. --- D.E.Knuth
reply other threads:[~2002-12-31 7:50 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20021230234349.F628@nightmaster.csn.tu-chemnitz.de \
--to=ingo.oeser@informatik.tu-chemnitz.de \
--cc=linux-kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®