From 48f939e29fe8990a4905d28976183757f2ff06f6 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Tue, 4 Dec 2001 04:12:39 +0000 Subject: [PATCH] * cygcheck.cc (usage): Add -c description. * cygpath.cc (usage): Alphabetize options. * strace.cc (usage): Ditto. --- winsup/utils/ChangeLog | 6 ++ winsup/utils/cygcheck.cc | 16 ++-- winsup/utils/cygpath.cc | 10 +-- winsup/utils/strace.cc | 27 ++++--- winsup/utils/utils.sgml | 162 ++++++++++++++++++++++++++------------- 5 files changed, 140 insertions(+), 81 deletions(-) diff --git a/winsup/utils/ChangeLog b/winsup/utils/ChangeLog index 723063ec8..ff6f7a7d4 100644 --- a/winsup/utils/ChangeLog +++ b/winsup/utils/ChangeLog @@ -1,3 +1,9 @@ +2001-12-03 Christopher Faylor + + * cygcheck.cc (usage): Add -c description. + * cygpath.cc (usage): Alphabetize options. + * strace.cc (usage): Ditto. + 2001-11-21 Christopher Faylor * path.cc (cygpath): Don't consider cygdrive stuff when trying to derive diff --git a/winsup/utils/cygcheck.cc b/winsup/utils/cygcheck.cc index 259257aea..5bce951ec 100644 --- a/winsup/utils/cygcheck.cc +++ b/winsup/utils/cygcheck.cc @@ -1220,15 +1220,13 @@ void usage () { fprintf (stderr, "Usage: cygcheck [OPTIONS] [program ...]\n"); - fprintf (stderr, " -s, --sysinfo = system information (not with -k)\n"); - fprintf (stderr, - " -v, --verbose = verbose output (indented) (for -s or programs)\n"); - fprintf (stderr, " -r, --registry = registry search (requires -s)\n"); - fprintf (stderr, - " -k, --keycheck = perform a keyboard check session (not with -s)\n"); - fprintf (stderr, " -h, --help = give help about the info\n"); - fprintf (stderr, - "You must at least give either -s or -k or a program name\n"); + fprintf (stderr, " -c, --check-setup = check packages installed via setup.exe\n"); + fprintf (stderr, " -s, --sysinfo = system information (not with -k)\n"); + fprintf (stderr, " -v, --verbose = verbose output (indented) (for -s or programs)\n"); + fprintf (stderr, " -r, --registry = registry search (requires -s)\n"); + fprintf (stderr, " -k, --keycheck = perform a keyboard check session (not with -s)\n"); + fprintf (stderr, " -h, --help = give help about the info (not with -c)\n"); + fprintf (stderr, "You must at least give either -s or -k or a program name\n"); exit (1); } diff --git a/winsup/utils/cygpath.cc b/winsup/utils/cygpath.cc index afe90ea7f..9f066eb59 100644 --- a/winsup/utils/cygpath.cc +++ b/winsup/utils/cygpath.cc @@ -52,13 +52,13 @@ Usage: %s [-p|--path] (-u|--unix)|(-w|--windows [-s|--short-name]) filename\n\ -a|--absolute output absolute path\n\ -c|--close handle close handle (for use in captured process)\n\ -f|--file file read file for path information\n\ + -i|--ignore ignore missing argument\n\ + -p|--path filename argument is a path\n\ + -s|--short-name print Windows short form of filename\n\ + -S|--sysdir print `system' directory\n\ -u|--unix print Unix form of filename\n\ -w|--windows print Windows form of filename\n\ - -s|--short-name print Windows short form of filename\n\ - -W|--windir print `Windows' directory\n\ - -S|--sysdir print `system' directory\n\ - -p|--path filename argument is a path\n\ - -i|--ignore ignore missing argument\n", + -W|--windir print `Windows' directory\n", prog_name); exit (ignore_flag ? 0 : status); } diff --git a/winsup/utils/strace.cc b/winsup/utils/strace.cc index c88b40673..67e0d74c2 100644 --- a/winsup/utils/strace.cc +++ b/winsup/utils/strace.cc @@ -728,8 +728,19 @@ usage () { fprintf (stderr, "\ Usage: strace [OPTIONS] \n\ - -b, --buffer-size=SIZE Set size of output file buffer.\n\ - -m, --mask=MASK Set message filter mask.\n\ + -b, --buffer-size=SIZE set size of output file buffer\n\ + -d, --no-delta don't display the delta-t microsecond timestamp\n\ + -f, --trace-children also trace forked child processes\n\ + -h, --help display this help info\n\ + -m, --mask=MASK set message filter mask\n\ + -o, --output=FILENAME set output file to FILENAME\n\ + -n, --crack-error-numbers output descriptive text instead of error\n\ + numbers for Windows errors\n\ + -S, --flush-period=PERIOD flush buffered strace output every PERIOD secs\n\ + -t, --timestamp use an absolute hh:mm:ss timestamp insted of the\n\ + default microsecond timestamp. Implies -d\n\ + -v, --version display version info\n\ + -w, --new-window spawn program under test in a new window\n\ \n\ MASK can be any combination of the following mnemonics and/or hex values\n\ (0x is optional). Combine masks with '+' or ',' like so:\n\ @@ -756,18 +767,6 @@ Usage: strace [OPTIONS] \n\ nomutex 0x10000 (_STRACE_NOMUTEX) Don't use mutex for synchronization.\n\ malloc 0x20000 (_STRACE_MALLOC) Trace malloc calls.\n\ thread 0x40000 (_STRACE_THREAD) Thread-locking calls.\n\ -\n\ - -o, --output=FILENAME Set output file to FILENAME.\n\ - -f, --trace-children Also trace forked child processes.\n\ - -n, --crack-error-numbers Output descriptive text instead of error\n\ - numbers for Windows errors.\n\ - -d, --no-delta Don't display the delta-t microsecond timestamp.\n\ - -t, --timestamp Use an absolute hh:mm:ss timestamp insted of the\n\ - default microsecond timestamp. Implies -d.\n\ - -w, --new-window Spawn program under test in a new window.\n\ - -S, --flush-period=PERIOD Flush buffered strace output every PERIOD secs.\n\ - -v, --version Display version info.\n\ - -h, --help Display this help info.\n\ "); } diff --git a/winsup/utils/utils.sgml b/winsup/utils/utils.sgml index 9caa44bf3..67bd225cd 100644 --- a/winsup/utils/utils.sgml +++ b/winsup/utils/utils.sgml @@ -31,7 +31,7 @@ it reports on both. The -c option causes the "program" arguments to be interpreted as package names. cygcheck will report the current version of the package that you specify. With no -arguments, cygcheck will report on all packages. +arguments, cygcheck will report on all packages. The cygcheck program should be used to send information about your system to Cygnus for troubleshooting (if your @@ -73,14 +73,17 @@ or if you know what everything is already, just leave this out. Usage: cygpath [-p|--path] (-u|--unix)|(-w|--windows [-s|--short-name]) filename cygpath [-v|--version] cygpath [-W|--windir|-S|--sysdir] - -u|--unix print UNIX form of filename - -w|--windows print Windows form of filename - -s|--short-name print Windows short form of filename - -p|--path filename argument is a path - -v|--version print program version - -W|--windir print Windows directory - -S|--sysdir print Windows system directory - -i|--ignore ignore missing filename argument + -a|--absolute output absolute path + -c|--close handle close handle (for use in captured process) + -f|--file file read file for path information + -i|--ignore ignore missing filename argument + -p|--path filename argument is a path + -s|--short-name print Windows short form of filename + -S|--sysdir print Windows system directory + -u|--unix print UNIX form of filename + -v|--version print program version + -w|--windows print Windows form of filename + -W|--windir print Windows directory The cygpath program is a utility that @@ -201,15 +204,20 @@ SIGUSR2 31 user defined signal 2 mkgroup -usage: mkgroup <options> [domain] -This program prints group information to stdout -Options:\n"); - -l,--local print pseudo group information if there is - no domain - -d,--domain print global group information from the domain - specified (or from the current domain if there is - no domain specified) - -?,--help print this message +usage: mkgroup [options] [domain] + This program prints a /etc/group file to stdout + Options: + -l,--local print local group information + -d,--domain print global group information from the domain + specified (or from the current domain if there is + no domain specified) + -o,--id-offset offset change the default offset (10000) added to uids + in domain accounts. + -s,--no-sids don't print SIDs in pwd field + (this affects ntsec) + -u,--users print user list in gr_mem field + -?,--help print this message + One of `-l' or `-d' must be given on NT/W2K. The mkgroup program can be used to help @@ -240,14 +248,24 @@ local machine or the default (or given) domain. Usage: mkpasswd [options] [domain] -This program prints a /etc/passwd file to stdout -Options are - -l,--local print local accounts - -d,--domain print domain accounts (from current domain - if no domain specified - -g,--local-groups print local group information too - -?,--help displays this message -This program does only work on Windows NT + Usage: mkpasswd [OPTION]... [domain] + This program prints a /etc/passwd file to stdout + Options: + -l,--local print local user accounts + -d,--domain print domain accounts (from current domain + if no domain specified) + -o,--id-offset offset change the default offset (10000) added to uids + in domain accounts. + -g,--local-groups print local group information too + if no domain specified + -m,--no-mount don't use mount points for home dir + -s,--no-sids don't print SIDs in GCOS field + (this affects ntsec) + -p,--path-to-home path if user account has no home dir, use + path instead of /home/ + -u,--username username only return information for the specified user + -?,--help displays this message + One of `-l', `-d' or `-g' must be given on NT/W2K. The mkpasswd program can be used to help @@ -346,17 +364,24 @@ some systems. Usage mount - mount [-bfs] <win32path> <posixpath> - mount [-bs] --change-cygdrive-prefix<posixpath> - mount --import-old-mounts + mount [options] <win32path> <posixpath> - -b = text files are equivalent to binary files (newline = \n) - -x = files in the mounted directory are automatically given execute permission. - -X = files in the mounted directory are automatically given execute permission and are assumed to be Cygwin (i.e., not generic windows) executables only. - -f = force mount, don't warn about missing mount point directories - -s = add mount point to system-wide registry location - --change-automount-prefix = change path prefix used for automatic mount points - --import-old-mounts = copy old registry mount table mounts into the current mount areas + -b, --binary text files are equivalent to binary files + (newline = \n) + -c, --change-cygdrive-prefix change the cygdrive path prefix to <posixpath> + -f, --force force mount, don't warn about missing mount + point directories + -i, --import-old-mounts copy old registry mount table mounts into the current + mount areas + -p, --show-cygdrive-prefix show user and/or system cygdrive path prefix + -s, --system add mount point to system-wide registry location + -t, --text (default) text files get \r\n line endings + -u, --user (default) add mount point to user registry location + -x, --executable treat all files under mount point as executables + -X, --cygwin-executable treat all files under mount point as cygwin + executables + -m, --mount-commands write mount commands to replace user and + system mount points and cygdrive prefixes When invoked without any arguments, mount displays the current mount table. @@ -551,13 +576,13 @@ program. umount -Usage umount [-s] <posixpath> --s = remove mount point from system-wide registry location - ---remove-all-mounts = remove all mounts ---remove-auto-mounts = remove all automatically mounted mounts ---remove-user-mounts = remove all mounts in the current user mount registry area, including auto mounts ---remove-system-mounts = Remove all mounts in the system-wide mount registry area +Usage umount [options] <posixpath> + -A, --remove-all-mounts remove all mounts + -c, --remove-cygdrive-prefix remove cygdrive prefix + -s, --system remove system mount + -S, --remove-system-mounts remove all system mounts + -u, --user remove user mount + -U, --remove-user-mounts remove all user mounts The umount program removes mounts from the @@ -571,7 +596,7 @@ removing the mount from the system-wide registry area instead all mounts of a particular type. With the extended options it is possible to remove all mounts, all automatically-mounted mounts, all mounts in the current user's registry area, or all mounts in the -system-wide registry area (with Administrator priviledges). +system-wide registry area (with Administrator privileges). See ) for more information on the mount table. @@ -580,16 +605,47 @@ table. strace -Usage strace [-m mask] [-o output-file] [ft] program [args...] +Usage strace [options] program [args...] --b n use buffer of size 'n' when writing output file --d include delta time in usecs for each line (default) --f follow all forks and execs --m mask mask for reporting cygwin events (default 1) --n convert Win32 error messages to text --o output-file output file to hold strace events (default stderr) --t output time in hh:mm:ss format --u include time in usecs since start for each line (default) + -b, --buffer-size=SIZE set size of output file buffer + -d, --no-delta don't display the delta-t microsecond timestamp + -f, --trace-children also trace forked child processes + -h, --help display help info + -m, --mask=MASK set message filter mask + -o, --output=FILENAME set output file to FILENAME + -n, --crack-error-numbers output descriptive text instead of error + numbers for Windows errors + -S, --flush-period=PERIOD flush buffered strace output every PERIOD secs + -t, --timestamp use an absolute hh:mm:ss timestamp insted of the + default microsecond timestamp. Implies -d + -v, --version display version info + -w, --new-window spawn program under test in a new window + + MASK can be any combination of the following mnemonics and/or hex values + (0x is optional). Combine masks with '+' or ',' like so: + + --mask=wm+system,malloc+0x00800 + + Mnemonic Hex Corresponding Def Description + ========================================================================= + all 0x00001 (_STRACE_ALL) All strace messages. + flush 0x00002 (_STRACE_FLUSH) Flush output buffer after each message. + inherit 0x00004 (_STRACE_INHERIT) Children inherit mask from parent. + uhoh 0x00008 (_STRACE_UHOH) Unusual or weird phenomenon. + syscall 0x00010 (_STRACE_SYSCALL) System calls. + startup 0x00020 (_STRACE_STARTUP) argc/envp printout at startup. + debug 0x00040 (_STRACE_DEBUG) Info to help debugging. + paranoid 0x00080 (_STRACE_PARANOID) Paranoid info. + termios 0x00100 (_STRACE_TERMIOS) Info for debugging termios stuff. + select 0x00200 (_STRACE_SELECT) Info on ugly select internals. + wm 0x00400 (_STRACE_WM) Trace Windows msgs (enable _strace_wm). + sigp 0x00800 (_STRACE_SIGP) Trace signal and process handling. + minimal 0x01000 (_STRACE_MINIMAL) Very minimal strace output. + exitdump 0x04000 (_STRACE_EXITDUMP) Dump strace cache on exit. + system 0x08000 (_STRACE_SYSTEM) Cache strace messages. + nomutex 0x10000 (_STRACE_NOMUTEX) Don't use mutex for synchronization. + malloc 0x20000 (_STRACE_MALLOC) Trace malloc calls. + thread 0x40000 (_STRACE_THREAD) Thread-locking calls. The strace program executes a program, and