From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6533 invoked by alias); 25 Jul 2011 12:30:15 -0000 Received: (qmail 6525 invoked by uid 22791); 25 Jul 2011 12:30:14 -0000 X-SWARE-Spam-Status: No, hits=-4.6 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI X-Spam-Check-By: sourceware.org Received: from thoth.sbs.de (HELO thoth.sbs.de) (192.35.17.2) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 25 Jul 2011 12:29:50 +0000 Received: from mail1.siemens.de (localhost [127.0.0.1]) by thoth.sbs.de (8.13.6/8.13.6) with ESMTP id p6PCTmrp008358 for ; Mon, 25 Jul 2011 14:29:49 +0200 Received: from DEMCHP99ET3MSX.ww902.siemens.net (demchp99et3msx.ww902.siemens.net [139.25.131.243]) by mail1.siemens.de (8.13.6/8.13.6) with ESMTP id p6PCTmqV024023 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=FAIL) for ; Mon, 25 Jul 2011 14:29:48 +0200 Received: from DEMCHP99E84MSX.ww902.siemens.net ([169.254.1.57]) by DEMCHP99ET3MSX.ww902.siemens.net ([139.25.131.243]) with mapi; Mon, 25 Jul 2011 14:29:16 +0200 From: "Schwarz, Konrad" To: "cygwin@cygwin.com" Date: Mon, 25 Jul 2011 12:30:00 -0000 Subject: Device names in /proc/mounts Message-ID: <9B10FEAACF062F48A095880A451FF0590380117C0C@DEMCHP99E84MSX.ww902.siemens.net> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com X-SW-Source: 2011-07/txt/msg00331.txt.bz2 Hi, in Linux, /proc/mounts maps device names (/dev/sda2) to mount points (/home= ). in Cygwin, /proc/mounts maps DOS names (C:) to cygwin names (/cygdrive/c). This is not terribly useful. There seems no way of mapping device names (resp. Win32 Device Namespace na= mes) to mount points -- the Cygwin User's Guide suggests using comparing the output of /proc/partit= ions with the output of df(1) to match up the two. It then pointedly uses the registry entry '\HKEY_LOCAL_MACHINE\SYSTEM\MountedDevices' -- which encodes the mapp= ing from NT device names to DOS device names -- as an example for regtool(1) (see http://www.cygwin.com/cygwin-ug-net/using-specialnames.html#pathnames-= proc-registry). It does not explain how to decode the information there -- but neither does= MSDN. However, blk_id(8) describes volumes in terms of (Cygwin) device names (/de= v/sda2), so an easier to use mapping would be nice to have. It would also increase = compatibility between Cygwin and Linux. Some poking around MSDN reveals the function QueryDosDevice. This function= 's purpose would seem to be to map DOS names to Win32 device names. Would it make sense to = use this to populate the first column of /proc/mounts (after mapping Win32 devi= ce names \\.\ to Cygwin device names /dev/sdxy)? Regards Konrad Schwarz -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple