On Jan 27 2007 18:38, David Miller wrote:
>>
>> int ret = sys_open((const char __user *)"/dev/console", O_RDWR, 0);
>> if(ret < 0)
>> printk(KERN_WARNING "Warning: unable to open an "
>> "initial console (%d)\n", ret);
>>
>> I wonder what return code it will give (-EFAULT is my guess).
>
>It's not getting -EFAULT, the init task runs with set_fs(KERNEL_DS).
Ok.
>It's getting -ENOENT because no console device has registered
>itself, and therefore even if you have a /dev/console node in
>the filesystem the open will still fail.
Hm that is a little bit misleading. I'd like to see the regular -ENXIO as
happens with "all" the other block/character devices in /dev that don't have
anything associated (well, at least bcak in the days where /dev was static)
-`J'
--
-
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html