\r not escaped in e.g. /proc/mounts

2021-10-06 Thread Christoph Anton Mitterer
Hey. Wanted to ask here, before I make (probably unnecessary noise at lkml).. O:-) I just noticed that \r is not escaped in e.g. /proc/mounts (and possibly similar files that do such escaping). The output does in fact contain then a \r, so I guess parsing for most (all?) shell tools should be

Re: recommended way to find out whether one is "within" the initramfs?

2021-10-06 Thread Christoph Anton Mitterer
Hey Romain. Thanks for your ideas: On Wed, 2021-10-06 at 18:49 +0200, Romain Perier wrote: > Quickly, few ideas (perhaps not the perfect ones): > 1. Check for what is currently mounted as "/" ? (which technically > should differ between initramfs or real rootfs) That sounds like a pretty nice id

Re: recommended way to find out whether one is "within" the initramfs?

2021-10-06 Thread Romain Perier
Hey, Le mer. 6 oct. 2021 à 17:57, Christoph Anton Mitterer a écrit : > > Hey. > > I've just wondered whether there is recommended way to find out whether > one is currently "within" the initramfs (i.e. early boot) as generated > by Debians initramfs-tools, or not? > > I'd have probably done somet

recommended way to find out whether one is "within" the initramfs?

2021-10-06 Thread Christoph Anton Mitterer
Hey. I've just wondered whether there is recommended way to find out whether one is currently "within" the initramfs (i.e. early boot) as generated by Debians initramfs-tools, or not? I'd have probably done something like checking for: if [ -f /conf/initramfs.conf ] && [ -f /scripts/init-top/ORDE