Bug in 2.6.16 Code
Nick Couchman <[email protected]>
| Newsgroups | gmane.linux.cluster.openmosix.devel |
|---|---|
| Organization | SEAKR Engineering, Inc. |
| Message-ID | <[email protected]> |
Hi, all,
I believe I found a bug in the 2.6.16 code that's currently in the git
repository. When I try to compile I get the following error:
CC hpc/copyuser.o
hpc/copyuser.c: In function `deputy_strncpy_from_user':
hpc/copyuser.c:64: error: `n' undeclared (first use in this function)
hpc/copyuser.c:64: error: (Each undeclared identifier is reported only once
hpc/copyuser.c:64: error: for each function it appears in.)
hpc/copyuser.c: In function `remote_copy_user':
hpc/copyuser.c:259: warning: ignoring return value of `copy_from_user', declared with attribute warn_unused_result
hpc/copyuser.c:270: warning: ignoring return value of `copy_to_user', declared with attribute warn_unused_result
hpc/copyuser.c: In function `remote_strncpy_from_user':
hpc/copyuser.c:295: warning: ignoring return value of `strncpy_from_user', declared with attribute warn_unused_result
make[1]: *** [hpc/copyuser.o] Error 1
make: *** [hpc] Error 2
When I go look at the hpc/copyuser.c file, there is indeed a line with a
variable that seems to be undeclared:
unsigned long deputy_strncpy_from_user(char *dst, const char __user *src,
long count)
{
struct omp_usercopy_req u;
int error;
if (in_atomic())
return n; # <-- RIGHT HERE
OMDEBUG_CPYUSER(1, "strcpy user[0x%p]->[0x%p][%ld]\n", src, dst,
count);
...
}
If I change the "return n" to a "return 0" the code compiles fine (and
seems to work, too), but I'm not sure what that return value is actually
supposed to be and whether or not I may be messing something else up by
not putting the proper return value there.
Thanks,
Nick
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642