|
Home > Archive > Unix Programming > November 2004 > unix function
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
|
|
| srinivas 2004-11-17, 7:48 am |
| what is the unix compatibility for the windows NTSTATUS,how to get OS
return value while developing a driver.
| |
| Måns Rullgård 2004-11-17, 7:48 am |
| vasu1894@yahoo.com (srinivas) writes:
> what is the unix compatibility for the windows NTSTATUS, how to get
> OS return value while developing a driver.
What does that do? Is it a system call?
--
Måns Rullgård
mru@inprovide.com
| |
| Pascal Bourguignon 2004-11-17, 5:51 pm |
| vasu1894@yahoo.com (srinivas) writes:
> what is the unix compatibility for the windows NTSTATUS,how to get OS
> return value while developing a driver.
There is NO compatibility between unix and MS-Windows.
Otherwise, perhaps you'll find a "compatibility layer" in wine...
--
__Pascal Bourguignon__ http://www.informatimago.com/
The world will now reboot; don't bother saving your artefacts.
| |
| Trent Buck 2004-11-17, 5:51 pm |
| Quoth Pascal Bourguignon on or about 2004-11-17:
>
> There is NO compatibility between unix and MS-Windows.
I think what he meant to say was
Under Microsoft NT, the C function ntstatus() does <something>.
Is there an equivalent function under UNIX?
If not, how should I go about doing <something>?
If I were a regular here, he would have been thoroughly berated for such
a badly written post.
-t
| |
| joe durusau 2004-11-17, 5:51 pm |
|
Trent Buck wrote:
> Quoth Pascal Bourguignon on or about 2004-11-17:
>
> I think what he meant to say was
>
> Under Microsoft NT, the C function ntstatus() does <something>.
> Is there an equivalent function under UNIX?
> If not, how should I go about doing <something>?
>
> If I were a regular here, he would have been thoroughly berated for such
> a badly written post.
>
> -t
No since in berating, he propbably doesn't use english as his native
language. OTOH, he does need to tell us what ntstatus() does, since
nobody here is likely to admit familiarity.
Speaking only for myself,
Joe Durusau
| |
| Lew Pitcher 2004-11-17, 5:51 pm |
| -----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
joe durusau wrote:
>
> Trent Buck wrote:
>
>
>
>
> No since in berating, he propbably doesn't use english as his native
> language. OTOH, he does need to tell us what ntstatus() does, since
> nobody here is likely to admit familiarity.
A quick search through Google shows that NTSTATUS is the type of the
/return_code/ that MSWindows NT NTDLL kernel calls return to their
caller. A device driver (for instance) will call NT kernel functions to
perform certain operations, and receive a return code back. The return
code is akin to the POSIX/C userspace errno variable, in that it has
specific values for specific situations, no matter which function was
called. This return code is formatted as an NTSTATUS type, and can be
evaluated using one of several syscalls akin to the strerror() POSIX
userspace function.
So, if I read the OP correctly, he wants to know if the Unix kernel
functions (which Unix kernel is unspecified) provide a single, unified
return-code that can be evaluated to determine the result of the
function, no matter which kernel function was invoked.
To the OP: The answer is no. There is no equivalent to NTSTATUS in Unix,
since Unix is not a single implementation of an operating system, and
the internals of each implementation are different. /Some
implementations/ may provide an equivalent to NTSTATUS, however. Which
Unix are you interested in?
- --
Lew Pitcher, IT Consultant, Enterprise Data Systems
Enterprise Technology Solutions, TD Bank Financial Group
(Opinions expressed here are my own, not my employer's)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (MingW32)
iD8DBQFBm469agVFX4UWr64RAv45AKCYAv8Ccmo+
A3nEdolTM2vTyWsA5gCffECN
dCHyN24C+DY621fiXiIP/+o=
=KPUK
-----END PGP SIGNATURE-----
| |
| srinivas 2004-11-18, 2:48 am |
| hi;
first i would like to say sorry for my poor english,and thanks a lot
for understanding my question. Thanks for such a nice reply;
is there any kernel function equivalent to NTSTATUS in linux;
linux kernel version is kernel-2.6.5-1.358 on i686,
if, there is nothig with the similar functionality in linux as
NTSTATUS,how can i achieve such a unified return-code or such
functionality.
thanks and plz excuse for such english;
thanks a lot;
srinivas.
| |
| Erik de Castro Lopo 2004-11-18, 2:48 am |
| srinivas wrote:
>
> hi;
> first i would like to say sorry for my poor english,and thanks a lot
> for understanding my question. Thanks for such a nice reply;
>
> is there any kernel function equivalent to NTSTATUS in linux;
Errrm, what does NTSTATUS do?
Erik
--
+-----------------------------------------------------------+
Erik de Castro Lopo nospam@mega-nerd.com (Yes it's valid)
+-----------------------------------------------------------+
"There is no satisfactory substitute for excellence."
-- Dr. Arnold O. Beckman
| |
| Pascal Bourguignon 2004-11-18, 7:47 am |
| Erik de Castro Lopo <nospam@mega-nerd.com> writes:
> srinivas wrote:
>
>
> Errrm, what does NTSTATUS do?
Check the "NTSTATUS Relevance" parallel thread.
--
__Pascal Bourguignon__ http://www.informatimago.com/
The world will now reboot; don't bother saving your artefacts.
| |
| Chris Barts 2004-11-22, 7:49 am |
| Erik de Castro Lopo wrote:
>
> Errrm, what does NTSTATUS do?
Apparently, you haven't gotten Lew Pitcher's post to this thread yet.
NTSTATUS is to the WIN NT kernelspace what errno is to the POSIX
userland: It's (the type of) a single variable used to report errors
raised by various and divers syscalls.
>
> Erik
|
|
|
|
|