On Tue, Apr 7, 2009 at 1:01 AM, David Turner <[email protected]> wrote:
>
>
> On Tue, Apr 7, 2009 at 2:15 AM, Meryl Silverburgh
> <[email protected]> wrote:
>>
>> Hi,
>>
>> I am trying to use LOGE function to display the value of errno.
>> LOGE("errno: %d\n", errno);
>>
>> But what I get
>> errno: 1
>>
>> But '1' is not a valid errno (I look at errno.h).
>
> You are not looking very well :-). EPERM is defined as 1, but the actual
> definition is in bionic/libc/kernel/common/asm-generic/errno-base.h
>
> I encourage you to use strerror(errno) to get a human-friendly description
> of the errno value,
> this will save you countless hours of pain.
>


Thank you. I print out 'errno' after I call 'ioctl', and from
here:http://docsrv.sco.com/cgi-bin/man/man?ioctl+2,

EPERM is not one of the errno set by ioctl.

        int result = ioctl(fd, KDSETMODE, (void*) KD_TEXT);
    if(result < 0) {
        LOGE("exit gr_init 1 %d\n", errno);
        close(fd);
        return -1;
    }


>>
>> Can you please tell me what am I doing wrong?
>>
>> Thank you.
>>
>>
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to