Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm 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 Date: Wed, 10 Nov 2004 11:10:04 -0500 (EST) From: Igor Pechtchanski Reply-To: cygwin AT cygwin DOT com To: Dave Korn cc: "'Max Bowsher'" , cygwin AT cygwin DOT com Subject: RE: What to do when setup fails? In-Reply-To: Message-ID: References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; CHARSET=US-ASCII Content-ID: X-Scanned-By: MIMEDefang 2.39 On Wed, 10 Nov 2004, Dave Korn wrote: > From mount.cc: > [snip] > fatal ("mount"); > > Luke, if setup is failing to create that key, you must be trying to > install for all users while running as a user with inadequate rights, > mustn't you? The attached patch would tell you what the actual error > code was, if you felt like rebuilding setup. Quoting the patch: - fatal ("mount"); + { + char errbuffer[40]; + _snprintf (errbuffer, 40, "mount %d", GetLastError ()); + fatal (errbuffer); + } Umm, isn't this exactly what fatal() does already? Quoting dialog.cc: void fatal (const char *msg) { DWORD e = GetLastError (); char *buf; FormatMessage (FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM, 0, e, 0, (CHAR *) & buf, 0, 0); MessageBox (0, buf, msg, 0); LogSingleton::GetInstance().exit (1); // Keep gcc happy - some sort of bug! exit (1); } Igor -- http://cs.nyu.edu/~pechtcha/ |\ _,,,---,,_ pechtcha AT cs DOT nyu DOT edu ZZZzz /,`.-'`' -. ;-;;,_ igor AT watson DOT ibm DOT com |,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski, Ph.D. '---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow! "The Sun will pass between the Earth and the Moon tonight for a total Lunar eclipse..." -- WCBS Radio Newsbrief, Oct 27 2004, 12:01 pm EDT -- 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/