All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] Fix 'root=LABEL=/'
@ 2009-01-10 19:59 Bill Nottingham
       [not found] ` <1231617553-4206-1-git-send-email-notting-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
  0 siblings, 1 reply; 8+ messages in thread
From: Bill Nottingham @ 2009-01-10 19:59 UTC (permalink / raw)
  To: initramfs-u79uwXL29TY76Z2rM5mHXA; +Cc: Bill Nottingham

As you can't have /dev/disk/by-label//, we need to escape the '/'
character in the same way that udev does.
---
 init |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/init b/init
index 5b94e3d..12144d2 100755
--- a/init
+++ b/init
@@ -64,7 +64,10 @@ if [ -z "$root" ]; then
   echo "Warning: no root specified"
   root="/dev/sda1"
 elif [ "${root#LABEL=}" != $root ]; then
-  root="/dev/disk/by-label/${root#LABEL=}"
+  # FIXME: may need to do more escaping here
+  l=${root#LABEL=}
+  label=${l//\//\\x2f}
+  root="/dev/disk/by-label/${label}"
 elif [ "${root#UUID=}" != $root ]; then
   root="/dev/disk/by-uuid/${root#UUID=}"
 fi
-- 
1.6.1

--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

end of thread, other threads:[~2009-01-13 15:56 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-10 19:59 [PATCH 1/3] Fix 'root=LABEL=/' Bill Nottingham
     [not found] ` <1231617553-4206-1-git-send-email-notting-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2009-01-10 19:59   ` [PATCH 2/3] Fix tense Bill Nottingham
     [not found]     ` <1231617553-4206-2-git-send-email-notting-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2009-01-10 19:59       ` [PATCH 3/3] Go to an emergency shell if mounting the root filesystem fails Bill Nottingham
     [not found]         ` <1231617553-4206-3-git-send-email-notting-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2009-01-12 16:36           ` Jeremy Katz
2009-01-12 16:36       ` [PATCH 2/3] Fix tense Jeremy Katz
2009-01-12 16:35   ` [PATCH 1/3] Fix 'root=LABEL=/' Jeremy Katz
     [not found]     ` <B9A9EF7B-50A6-4E37-8485-F9486F96C5FA-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2009-01-13  7:46       ` Seewer Philippe
     [not found]         ` <496C46E4.8000301-omB+W0Dpw2o@public.gmane.org>
2009-01-13 15:56           ` Bill Nottingham

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.