Commit Graph

94 Commits

Author SHA1 Message Date
Corinna Vinschen 7db9fabc83 * cygcheck.cc (dump_sysinfo): Add "not supported" to osname on 9x
machines.  Drop "not supported" for Vista.  Drop "Longhorn" text
	for now.
2007-02-20 16:41:54 +00:00
Corinna Vinschen cea9b62102 * cygcheck.cc (get_word, get_dword): Move to path.cc.
(LINK_EXTENSION): New macro.
	(check_existence): New static function.
	(find_on_path): Check for symbolic links if asked.
	(dll_info): New error handling.
	(track_down): Only call dll_info() for executables, display
	an error for symlinks, and print magic number for others.
	(find_app_on_path): New static function.
	(cygcheck, dump_sysinfo): Call find_app_on_path() instead of
	find_on_path().
	* path.cc (cmp_shortcut_header): New static function.
	(get_word, get_dword): Moved from cygcheck.cc.
	(EXE_MAGIC, SHORTCUT_MAGIC, SYMLINK_COOKIE, SYMLINK_MAGIC): New
	macros.
	(is_exe, is_symlink, readlink): New functions.
	* path.h (is_exe, is_symlink, readlink): Declare.
	(get_word, get_dword): Ditto.
2006-10-05 17:24:13 +00:00
Christopher Faylor 8552e20ec4 white space 2006-09-13 15:33:37 +00:00
Christopher Faylor aa45b3b73d Check in previously mentioned change to cygcheck.cc 2006-09-13 15:32:04 +00:00
Corinna Vinschen 9d1c0a6053 * cygcheck.cc (find_on_path): Update copyright text. 2006-02-08 14:19:40 +00:00
Corinna Vinschen e699adfce5 * cygcheck.cc (find_on_path): Create copy of rv on successful access
check, since rv can be reused in subsequent calls.
2006-02-08 14:13:28 +00:00
Christopher Faylor 3c09c0fb25 * cygcheck.cc (common_paths): Add "patch". 2006-01-19 21:16:38 +00:00
Christopher Faylor 101b3cb01a * cygcheck.cc (init_paths): Record first_nonsys_path.
(find_on_path): Start on first nonsys path when !search_sysdirs.
2006-01-19 20:17:11 +00:00
Christopher Faylor 4d7c0b51bf copyright 2006-01-17 15:37:13 +00:00
Corinna Vinschen 8581551218 * Makefile.in (cygcheck.exe): Do not link against libwininet.a.
* cygcheck.cc (pInternetCloseHandle): Define global function pointer.
	(display_internet_error): Use it.
	(package_grep): Attempt to load wininet.dll at runtime.  Call WinInet
	API through function pointers throughout.
2006-01-15 09:29:02 +00:00
Corinna Vinschen 053d5eed93 * cygcheck.cc (dump_sysinfo): Convert k32 to HMODULE. 2006-01-13 15:36:29 +00:00
Corinna Vinschen 67066cabad * cygcheck.cc (dump_sysinfo): Convert osname to const and remove casts
in subsequent assignments.  Recognize Longhorn/Vista and report as not
	yet supported.  Recognize when running under WOW64 and report native
	CPU type.  Slightly rearrange \n printing.
2006-01-13 13:39:05 +00:00
Christopher Faylor 951bd8e9f1 * cygcheck.cc: Replace ` with ' throughout. 2006-01-12 17:43:53 +00:00
Christopher Faylor 2ea1dced21 * cygcheck.cc (dump_sysinfo): Report the failing drive to prevent having to
guess.
2006-01-05 18:31:26 +00:00
Christopher Faylor 10e4168d84 * cygcheck.cc (common_apps): Add crontab, vi, vim. 2005-12-29 19:23:46 +00:00
Christopher Faylor bc0d578d39 * cygcheck.cc (common_apps): Add a few more binaries to look for. 2005-12-15 03:36:14 +00:00
Christopher Faylor a39cfda7ba * Makefile.in: Link cygcheck with libwininet.a.
* cygcheck.cc: Add includes.
(grep_packages): New global variable.
(display_internet_error): New function.
(safe_chars): New global variable.
(base_url): Ditto.
(package_grep): New function.
(usage): Reword --help output for clarity.  Document new argument.
(longopts): Add 'package-query' option.
(opts): Add 'p' option, reorder to be consistent with 'longopts'.
(main): Accommodate new option.
* utils.sgml (cygcheck): Update --help output.  Document new -p option.
2005-11-22 17:19:17 +00:00
Brian Dessent 9a99dcd39c * cygcheck.cc (dump_sysinfo_services): Properly null-terminate 'buf'.
Avoid extraneous cygrunsrv invocation if 'verbose' is true.
2005-08-17 00:52:43 +00:00
Christopher Faylor 0eccec28cc * cygcheck.cc (find_on_path): Perform .exe magic on non-PATH search. 2005-07-19 21:00:34 +00:00
Christopher Faylor 27eb5dbc70 * cygcheck.cc (track_down, cygcheck): Return true on success.
(main): Reflect cygcheck failures in exit status.
2005-07-05 21:41:37 +00:00
Corinna Vinschen 26797de314 * cygcheck.cc (dump_sysinfo): Recognize XP Media Center and Tablet PC
Editions. Change .NET to 2003 throughout.  Recognize 2003 Web Server
	and Datacenter Server. Report when running in terminal server session.
2005-05-30 15:49:31 +00:00
Christopher Faylor cba3b11fc5 * cygcheck.cc (load_cygwin): Make half-hearted attempt to work with older DLLs.
* strace.cc (load_cygwin): Ditto.
2005-05-27 15:45:53 +00:00
Corinna Vinschen 827cff7fe2 * cygcheck.cc (dump_sysinfo_services): Add new function that uses
new cygrunsrv options to dump service info.
	(dump_sysinfo): Call dump_sysinfo_services if running under NT.
	Change 'Cygnus' to 'Cygwin' in output.
2005-05-23 09:54:44 +00:00
Christopher Faylor f609f58d32 * cygcheck.cc (load_cygwin): Remove debugging statement. 2005-05-20 16:50:39 +00:00
Christopher Faylor ceb7fa1c4a * cygcheck.cc (dump_sysinfo): Don't attempt to use path if it is not set.
(nuke): Fix off by one error in allocation of environment variable.
(load_cygwin): Always set PATH even if cygwin environment is empty.
2005-05-20 16:38:42 +00:00
Christopher Faylor ac674bc896 * cygcheck.cc (cygwin_internal): Define as a "C" function.
* strace.cc (cygwin_internal): Ditto.
* cygpath.cc (print_version): Update copyright.
2005-05-17 01:26:16 +00:00
Christopher Faylor 41dcb6199c * cygcheck.cc (load_cygwin): Avoid calling putenv with a NULL path. 2005-05-16 03:18:29 +00:00
Corinna Vinschen 90253b8276 * cygcheck.cc (load_cygwin): Don't touch $PATH for now.
(print_version): Fix copyright.
	* strace.cc (print_version): Ditto.
2005-05-15 12:29:47 +00:00
Christopher Faylor f991d0e53e * cygcheck.cc (nuke): New function.
(load_cygwin): New function.
(main): Use load_cygwin to load argv/envp from cygwin environment, if
appropriate.
2005-05-09 01:56:34 +00:00
Corinna Vinschen 0f0595abd9 * cygcheck.cc (init_paths): Use full path instead of "." for the
current directory.  Do not add "." if present in $PATH.
	(dump_sysinfo): Skip placeholder first value of paths[].
2005-03-24 14:48:15 +00:00
Bas van Gompel d26eb2a13b * cygcheck.cc (eprintf): New function. 2004-11-18 05:20:23 +00:00
Bas van Gompel cd1ab47e38 * cygcheck.cc (find_on_path): Clear show_error and/or print_failed
parameters to display_error.
(rva_to_offset): Ditto.
(dll_info): Ditto.
(track_down): Ditto.
2004-11-16 05:16:59 +00:00
Christopher Faylor 213c7a7d94 * cygcheck.cc: Change "keyeprint" to "display_error" throughout. 2004-11-11 01:56:02 +00:00
Christopher Faylor 28fbe53af8 * cygcheck.cc (main): Allow a '-l' without an additional argument. 2004-11-11 01:52:33 +00:00
Bas van Gompel 5ccf388ed8 * cygcheck.cc (keyeprint): New optional parameters: show_error and
print_failed.
2004-11-11 01:17:29 +00:00
Bas van Gompel fe5cd1608b * cygcheck.cc (get_dword): Fix errormessage.
(cygwin_info): Ditto.
(track_down): Ditto.
(check_keys): Ditto.
2004-10-31 18:46:31 +00:00
Bas van Gompel ccf4c1e6cd * cygcheck.cc (dump_sysinfo): Warn about missing or multiple cygwin1
dlls.
2004-10-27 01:28:07 +00:00
Bas van Gompel a3a401001a * cygcheck.cc (dump_sysinfo): Add leading newline before legend for
drive-list.
2004-10-25 16:11:41 +00:00
Christopher Faylor 4bfc614b42 fix whitespace, update some copyrights 2004-10-25 15:49:36 +00:00
Bas van Gompel be1d479e09 * cygcheck.cc (dump_sysinfo): In legend for drive-list: Add ``ram'' and
``unk''. Use single puts. Add leading newline. Line up equal-signs.
2004-10-22 01:29:10 +00:00
Christopher Faylor be957eb563 * cygcheck.cc (dump_sysinfo): Allow for larger drives in drive-list. Change
``Used'' to ``Free'' in helptext-title for drive-list.
2004-10-21 00:06:37 +00:00
Corinna Vinschen eedf24742c * cygcheck.cc (pretty_id): Don't let i become negative. Fix
printf-format.
2004-10-18 10:25:38 +00:00
Christopher Faylor 0ffa77a9f5 * cygcheck.cc (pretty_id): Allocate space for ')' in uid and guid. 2004-10-18 01:44:55 +00:00
Christopher Faylor 0597641a74 * cygcheck.cc (pretty_id): Allocate space for trailing '\0' on uid and guid. 2004-10-17 23:31:23 +00:00
Christopher Faylor 167f0d8513 * cygcheck.cc (pretty_id): Don't exit on id error. Fix size calculations. 2004-10-15 13:57:56 +00:00
Christopher Faylor 902edd4512 * cygcheck.cc (pretty_id): Correct column calculations. Abort if id is acting
funny.
2004-10-14 17:35:46 +00:00
Christopher Faylor 76ad4d0a6e * cygcheck.cc (add_path): Don't leak memory when path is already in ``paths''. 2004-10-10 17:07:23 +00:00
Christopher Faylor 0795a24552 * cygcheck.cc (dump_sysinfo): Warn about trailing (back)slash on mount entries. 2004-10-09 23:19:38 +00:00
Christopher Faylor 82e127caac * cygcheck.cc (dump_sysinfo): Don't warn about empty path components, just
display ``.''.
2004-10-09 23:15:36 +00:00
Corinna Vinschen 5f175ea697 * cygcheck.cc (dump_sysinfo): Warn about empty path-components. 2004-10-06 09:46:40 +00:00