vfs: init/main.c: change comment: opening /dev/console may fail
Subsystems (2)
PATCH 1/1 vfs: init/main.c: change comment: opening /dev/console may fail
This patch is for VFS.
Today comment on console_on_rootfs says that opening /dev/console never fails. This is false. The opening may fail if /dev/console is not present in internal initramfs. So let's update the comment.
I tried to fix the problem itself in [1], but the patchset was rejected, so I will fix the comment instead. :)
--- init/main.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
init/main.c +4 -1
@@ -1645,7 +1645,10 @@ static int __ref kernel_init(void *unused) "See Linux Documentation/admin-guide/init.rst for guidance."); } -/* Open /dev/console, for stdin/stdout/stderr, this should never fail */ +/* +* Open /dev/console, for stdin/stdout/stderr, this may fail if you supplied +* your own internal initramfs without /dev/console +*/ void __init console_on_rootfs (void ) {struct file *file =filp_open ("/dev/console" ,O_RDWR ,0 );
base-commit: 591cd656a1bf5ea94a222af5ef2ee76df029c1d2 (mainline)
Signature · 1 line
2.47.3
Al Viro
maintainerinit/main.c static int __ref kernel_init(void *unused) · line 1650
Quoted 4 lines · Askar Safin
init/main.c +3
-1-/* Open /dev/console, for stdin/stdout/stderr, this should never fail */ +/* +* Open /dev/console, for stdin/stdout/stderr, this may fail if you supplied +* your own internal initramfs without /dev/console
ITYM "so if you supply your own internal initramfs, make sure /dev/console is there"
Al Viro <[email protected]>:
Quoted 1 line
ITYM "so if you supply your own internal initramfs, make sure
/dev/consoleis there"
I want to write browser extension for expanding your acronyms like "ITYM".
Okay, I will fix in the next version.
Signature · 1 line
Askar Safin