public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fix for idiocy in mount_root cleanups.
@ 2001-12-08 11:40 Alexander Viro
  2001-12-08 18:00 ` Linus Torvalds
  0 siblings, 1 reply; 7+ messages in thread
From: Alexander Viro @ 2001-12-08 11:40 UTC (permalink / raw)
  To: linux-kernel; +Cc: Linus Torvalds

	Grr...  OK, that should be a lesson - never do obvious change
just before sending a patch.

	Change in question was s/do_mount/mount/.  Which is almost
the same thing, except for one little detail:  mount(2) in case of
error returns -1 and stores the error in errno.  do_mount(9), OTOH...

IOW, please apply the following and pass me a brown paperbag ;-/

--- C1-pre7/init/do_mounts.c	Fri Dec  7 20:48:43 2001
+++ linux/init/do_mounts.c	Sat Dec  8 06:29:20 2001
@@ -351,8 +351,9 @@
 		mount("devfs", ".", "devfs", 0, NULL);
 retry:
 	for (p = fs_names; *p; p += strlen(p)+1) {
-		err = mount(name,"/root",p,root_mountflags,root_mount_data);
-		switch (err) {
+		errno = 0;
+		mount(name,"/root",p,root_mountflags,root_mount_data);
+		switch (-errno) {
 			case 0:
 				goto done;
 			case -EACCES:


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2001-12-10 11:36 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-12-08 11:40 [PATCH] fix for idiocy in mount_root cleanups Alexander Viro
2001-12-08 18:00 ` Linus Torvalds
2001-12-08 20:42   ` Alexander Viro
2001-12-08 21:04   ` Alexander Viro
2001-12-09 22:56     ` Pavel Machek
2001-12-10 11:36       ` Alexander Viro
2001-12-09 22:58     ` Pavel Machek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox