On Mon, 3 Mar 2025, David Dyck wrote:

> Is the format of /proc/mounts changing from being space delimited to being
> null delimited?

No.  Fields are still delimited by space, and records are still delimited
by newlines.  What has changed is that 'special' characters (space, tab,
newline, hash, backslash) are now escaped within records as octal \NNN.

In the below snippet, I only convert to delimited by \0 *after*
unescaping, when spaces or newlines may be present in the entries.

> On Sun, Mar 2, 2025 at 10:57 PM Jeremy Drake via Cygwin <cygwin@cygwin.com>
> wrote:
>
> >   # as of cygwin 3.6, volume roots are parsable from /proc/mounts
> >   # (noumount is the option that indicates a cygdrive mount)
> >   readarray -t -d $'\0' roots < <(
> >     cut -d' ' -f2,4 /proc/mounts | grep '\<noumount\>[^ ]*$' |
> >     cut -d' ' -f1 | xargs -d'\n' printf '%b\0')

> where can I read more about this change?

https://cygwin.com/doc/preview/cygwin-ug-net/ov-new.html#ov-new3.6
https://www.cygwin.com/cgit/newlib-cygwin/commit/?id=0d113da2350a4bdae5227c5cc88585d5b20d6065

-- 
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

Reply via email to