X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org Date: Thu, 26 Feb 2009 12:05:20 +0100 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: Re: special name for vss shadow copy device? Message-ID: <20090226110520.GW18319@calimero.vinschen.de> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <87f94c370902241242q78d0d068o4416b4ae2aa9be62 AT mail DOT gmail DOT com> <49A59485 DOT 8090401 AT t-online DOT de> <87f94c370902251121s12579193q3032a5ce7cdef685 AT mail DOT gmail DOT com> <49A5CDDE DOT 4040703 AT cygwin DOT com> <87f94c370902251620h746060f8j4137fa5c3747e6e4 AT mail DOT gmail DOT com> <20090226091054 DOT GS18319 AT calimero DOT vinschen DOT de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20090226091054.GS18319@calimero.vinschen.de> User-Agent: Mutt/1.5.19 (2009-02-20) Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com On Feb 26 10:10, Corinna Vinschen wrote: > On Feb 25 19:20, Greg Freemyer wrote: > > On Wed, Feb 25, 2009 at 6:01 PM, Larry Hall (Cygwin) > > wrote: > > > Greg Freemyer wrote: > > > > > > > > >> Time to experiment with Cygwin 1.7 > > >> > > >> I know the whole package is still considered test.  How stable is the > > >> actual dll(s).  Especially as relates to this type of functionality. > > The DLL is quite stable but there are certainly some bugs as well. > > > I tried the "dosdev" trick from one of the links to mount the snapshot > > as V:. Apparently that is a XP only trick. Or at least Vista does > > not have it. Here's how it does NOT work: $ dosdev 'V:' '\\?\GLOBALROOT\Device\HarddiskVolumeShadowCopy21' $ mount [...] C: on /cygdrive/c type ntfs ... $ The reason is that the path the drive points to has to be a native NT path. The path containg the GLOBALROOT is a long Win32 path name which is invalid in this case. However, the dosdev functionality is nothing but creating a symbolic link in the native NT namespace and the target of such a symlink can be anything which can be expressed in a 64K buffer. Here is how it works: $ dosdev 'V:' '\Device\HarddiskVolumeShadowCopy21' $ mount [...] C: on /cygdrive/c type ntfs ... V: on /cygdrive/v type ntfs ... What you have to do is to create a native NT symlink which points to the actual native NT device name which is as shown above, just \Device\HarddiskVolumeShadowCopy21. That works like a champ on Cygwin and in Windows Explorer on Vista. Btw., I'm using my own crude dosdev: ====================================================================== #include #include int main (int argc, char **argv) { DWORD flags = 0; if (argc < 2) { fprintf (stderr, "usage: %s DosDevice [NTDevice]\n", argv[0]); return 1; } if (argc == 2) flags = DDD_REMOVE_DEFINITION; else flags = DDD_RAW_TARGET_PATH; if (!DefineDosDevice (flags, argv[1], argc == 2 ? NULL : argv[2])) { fprintf (stderr, "Error %d\n", GetLastError ()); return 1; } return 0; } ====================================================================== $ gcc -o mydosdev mydosdev.c $ # Create the dos link $ ./mydosdev 'V:' '\Device\HarddiskVolumeShadowCopy21' $ # Remove it $ ./mydosdev 'V:' HTH, Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Project Co-Leader cygwin AT cygwin DOT com Red Hat -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/