[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <314BE1148B8C8D468A05944FDF577583069B021E@MRE02.enterprise.com>
Date: Tue, 6 Mar 2007 09:52:34 -0500
From: "Chen, Dongliang" <Chen.D@...-t.com>
To: <linux-kernel@...r.kernel.org>
Cc: "Chen, Dongliang" <Chen.D@...-t.com>
Subject: return negative number for unsigned long function in kernel
There are lots of functions in the Linux kernel that are declared as
unsigned long, but the return value is negative integer while error
occurred. An example of these functions is do_mmap_pgoff in mm/mmap.c,
which is defined as:
unsigned long do_mmap_pgoff(....)
In this function, it returns -ENODEV, -EPERM, -ENOMEM, -EINVAL, -EAGAIN,
-EACCESS depends on the error type. My question is how should the caller
perform error check based on the return value?
Please CC reply to me at chen.d@...-t.com
Thanks,
Dongliang Chen
Staff Engineer
EMS Technologies, Inc - Defense and Space Systems
660 Engineering Dr
Norcross, GA 30092
Tel: 770-263-9200 x 4379
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists