DKIM-Filter: OpenDKIM Filter v2.11.0 delorie.com 4540bS8c3955293 Authentication-Results: delorie.com; dkim=pass (1024-bit key, unprotected) header.d=cygwin.com header.i=@cygwin.com header.a=rsa-sha256 header.s=default header.b=bejsDCGy X-Recipient: archive-cygwin AT delorie DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2C4983982419 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1717461447; bh=EIyhKPKEA//RvTAkloYnKon7zgqM0d6Wt2hjjwBXsTk=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=bejsDCGyx8XAH3pzq56W7iqI5Lq2pT1swYuA2PVebSReoPW4WnOrHL9gJpPij4w9y Tg91l3nMmwzX/kmmgE5UoVip/u5/c2TTCEd9FLRiRRe0IeuKnBOfe+isL5j7oNPH8e yqnztn1/Q6mltCjVbKfMwhHaWktkEbvxQiK70ljM= X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org ADB88396E47E ARC-Filter: OpenARC Filter v1.0.0 sourceware.org ADB88396E47E ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1717461391; cv=none; b=KsuXBHlgriwclfUm1+Bw+TK4vmRCgPKn7YFJPS3mTHBbJaVOMsy4NtseM8iTmTUaizV8Rj+kwvvah+JqJgYOY2urBZVTtcgOEZAm9zw/mf1ozCdTsQOY4uCgB38Vc/e0FdBqHI5wsxgcMQb7h115HH6aOxKds1U/k2DwzPvaGHg= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1717461391; c=relaxed/simple; bh=NtEMfdNXH+4hiqQzJgP8D05IITgfx0UbNUXW3ZHR374=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=iKKEYQQno0sWFk8taAibgDfRC0LGTzPwZuqthpyGT7q4dABtbdHtgJ4R4w3dwqKu1NQdXLpBAmO+M5hQ67Yv+RiTq90RPMIqhZDdZPx7laNWl1wD6pE5uvnTxF2ZWMNfMgxbwtspJjyOPsYHGzLPx38P3TbNDXZ2UL4ZAl4md9A= ARC-Authentication-Results: i=1; server2.sourceware.org Date: Mon, 3 Jun 2024 17:36:29 -0700 (PDT) X-X-Sender: jeremyd AT resin DOT csoft DOT net To: cygwin AT cygwin DOT com Subject: mount points with whitespace are not escaped Message-ID: MIME-Version: 1.0 X-Spam-Status: No, score=-3.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: cygwin AT cygwin DOT com X-Mailman-Version: 2.1.30 List-Id: General Cygwin discussions and problem reports List-Archive: List-Post: List-Help: List-Subscribe: , From: Jeremy Drake via Cygwin Reply-To: Jeremy Drake Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "Cygwin" Steps to reproduce: $ mkdir /$'My New\r\nFolder' $ mount c: /$'My New\r\nFolder' $ mount C:/cygwin64/bin on /usr/bin type ntfs (binary,auto) C:/cygwin64/lib on /usr/lib type ntfs (binary,auto) C:/cygwin64 on / type ntfs (binary,auto) C: on /My New Folder type ntfs (binary,user) $ cat /proc/self/mounts C:/cygwin64/bin /usr/bin ntfs binary,auto 1 1 C:/cygwin64/lib /usr/lib ntfs binary,auto 1 1 C:/cygwin64 / ntfs binary,auto 1 1 C: /My New Folder ntfs binary,user 1 1 $ cat /proc/self/mountinfo 0 0 39488:20815 / /usr/bin binary,auto - ntfs C:/cygwin64/bin rw 1 1 39488:20815 / /usr/lib binary,auto - ntfs C:/cygwin64/lib rw 2 2 39488:20815 / / binary,auto - ntfs C:/cygwin64 rw 3 3 39488:20815 / /My New Folder binary,user - ntfs C: rw Expected (what happens on Linux) is that mount outputs the \r\n as ??, but /proc/self/mounts and /proc/self/mountinfo use octal escapes for ' ' and \n (I was rather surprised they didn't escape \r also, but I guess they don't have to because only ' ' and \n are used as delimiters): $ mount ... /dev/mapper/XXX on /My New??Folder type ext3 (rw,noatime,data=ordered) $ cat /proc/self/mounts | xxd ... 00000400: 6564 2030 2030 0a2f 6465 762f 646d 2d30 ed 0 0./dev/dm-0 00000410: 202f 4d79 5c30 3430 4e65 770d 5c30 3132 /My\040New.\012 00000420: 466f 6c64 6572 2065 7874 3320 7277 2c6e Folder ext3 rw,n 00000430: 6f61 7469 6d65 2c64 6174 613d 6f72 6465 oatime,data=orde 00000440: 7265 6420 3020 300a red 0 0. $ cat /proc/self/mountinfo | xxd ... 000004f0: 2f62 696e 202f 4d79 5c30 3430 4e65 770d /bin /My\040New. 00000500: 5c30 3132 466f 6c64 6572 2072 772c 6e6f \012Folder rw,no 00000510: 6174 696d 6520 2d20 6578 7433 202f 6465 atime - ext3 /de 00000520: 762f 646d 2d30 2072 772c 6461 7461 3d6f v/dm-0 rw,data=o 00000530: 7264 6572 6564 0a rdered. -- 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