This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: Error accessing mapped drive >2TB?
- From: Warren Young <wyml at etr-usa dot com>
- To: cygwin at cygwin dot com
- Date: Fri, 23 Oct 2015 16:36:33 -0600
- Subject: Re: Error accessing mapped drive >2TB?
- Authentication-results: sourceware.org; auth=none
- References: <CA+2x6-L_pqdN6PHE0c15hcmrmB66Z75Hz95cH+dbcn4yXuVZNg at mail dot gmail dot com> <712A87EA-64C7-4033-BE7F-39C8C8D527EB at etr-usa dot com> <20151021100328 dot GL5319 at calimero dot vinschen dot de> <CB8461F5-FB0E-44D8-81BB-B52DD02AD400 at etr-usa dot com> <20151021162254 dot GC19868 at calimero dot vinschen dot de> <169BF9F6-FF26-4073-9CC4-786882EFBAE9 at etr-usa dot com> <20151022083446 dot GW5319 at calimero dot vinschen dot de> <B8DBF0B5-51A9-4833-92D5-CA9E08B27DEC at etr-usa dot com> <20151023092007 dot GF5319 at calimero dot vinschen dot de> <0F9378A1-6890-42CE-BD19-578167F116AA at etr-usa dot com>
On Oct 23, 2015, at 4:04 PM, Warren Young wrote:
>
> Iâve made the suggested changes to the program, here:
>
> http://pastebin.com/uZdDZPgi
By the way, if you look at scream_and_die() and wonder why Iâve badly overcomplicated it, itâs because a previous version presented a printf-like interface to its callers. In stages, the callers stopped using it that way, and the function itself evolved to where it couldnât do printf-like things anyway.
This simpler replacement suffices now:
void scream_and_die(const char* complaint)
{
LPTSTR syserr = 0;
FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM |
FORMAT_MESSAGE_ALLOCATE_BUFFER, 0, GetLastError(),
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
(LPTSTR)&syserr, 0, 0);
fprintf(stderr, "%s: %s (0x%x)\n", complaint, syserr, GetLastError());
exit(1);
}
--
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