diff --git a/00DCACHE b/00DCACHE index b1efa26d..57411bcf 100644 --- a/00DCACHE +++ b/00DCACHE @@ -17,7 +17,7 @@ D. Displaying the Default Path Appendix A, Unix Dialects Without a Device Cache Appendix B, Lsof Dialects and Their Permissions - 1. Setuid-root Lsof Dialects + 1. Setuid-root Lsof Dialects 2. Setgid Lsof Dialects That Surrender Setgid Permission @@ -238,7 +238,7 @@ surround its use. The options are: * This is a default option of the lsof distribution. * * * * This option is enabled when the lsof dialect is able * - * to surrender setgid permission (See Appendix B.), and * + * to surrender setgid permission (See Appendix B.), and * * the lsof process is not setuid-root. * * * * The environment variable path is read-only if the * @@ -475,9 +475,9 @@ cache file. It assumes: 1. The Unix dialect's kernel supports the interpreter script execution option -- i.e., a script whose first line has the form ``#!''. - + 2. The chmod, echo, rm, sh, and test programs are located - in ``/bin''. + in ``/bin''. 3. The string value of the HASSYSDC definition in the dialect's machine.h header file is the path ``/your/choice/of/path''. @@ -552,7 +552,7 @@ make lsof include the entire host name in the path.) * * * ``%l'' causes the full name returned by gethostname(2) to * * appear in the path. * -* * +* * * ``%L'' causes the first component of the name returned by * * gethostname(2) to appear in the path. The first * * component is defined to be what appears to the * @@ -708,7 +708,7 @@ Appendix B, Lsof Dialects and Their Permissions These are the permissions recommended in the lsof distribution. -Appendix B.1 Setuid-root Lsof Dialects +Appendix B.1 Setuid-root Lsof Dialects ====================================== These dialect versions of lsof need root permission. For general diff --git a/00FAQ b/00FAQ index 2937ff85..4c6a636a 100644 --- a/00FAQ +++ b/00FAQ @@ -788,7 +788,7 @@ ______________________________________________________________________ can build an lsof executable for debugging -- e.g., $ make DEBUG=-g - + (Look for DEBUG in this FAQ for other examples of its use.) Consult the Makefiles to see what CFGL, CFGL, and other @@ -840,7 +840,7 @@ ______________________________________________________________________ Most UNIX dialect versions of lsof support 8 bit language locale characters -- e.g., the ability to print 8 bit characters that have accents and other marks over them. - + See the answer to the "Does lsof support wide characters in language locales?" question for information on when lsof's language locale support covers characters wider than 8 bits. @@ -900,7 +900,7 @@ ______________________________________________________________________ A few files carry other copyright notices. Some are BSD notices and they explain the terms under which they are included in the lsof distribution. - + Those that carry vendor copyright notices have been reproduced in their original or modified forms with permission from the copyright owners. That permission is indicated in the README @@ -1118,15 +1118,15 @@ ______________________________________________________________________ 2. If the compiler is gcc, the private gcc header files: * May not have been installed; - + * May have been installed incorrectly; - + * May not have been updated properly after the last compiler or system update; - + * Ones from a previous installation may not have been removed. - + A path leading to the gcc private header files can be found with `gcc -v`. Consult the gcc documentation for instructions on proper installation of the private gcc @@ -1513,7 +1513,7 @@ ______________________________________________________________________ 3.8.1 Why does lsof report a one byte lock on byte zero as a full file lock? - + When a process has a lock of length one, starting at byte zero, lsof can't distinguish it from a full file lock. That's because most UNIX dialects represent both locks the @@ -1921,7 +1921,7 @@ ______________________________________________________________________ written a little more tersely as: $ lsof +Mi | grep "\[" - + But be careful to use the ``Mi'' ordering, since ``iM'' implies M is an address argument to `i'. @@ -2043,7 +2043,7 @@ ______________________________________________________________________ Sometimes the availability of file offset information depends on the dialect's kernel. This is particularly true for socket file offsets. - + Maintenance of offsets for pseudo-terminal devices varies by UNIX dialect and is related to how the dialect kernel implements pseudo-terminal support. Kernels like AIX, for @@ -2101,7 +2101,7 @@ ______________________________________________________________________ the +f option -- e.g., $ lsof +f -- /dev/sd0a - + (Note: you must use ``--'' after +f or -f if a file name follows immediately, because +f and -f can be followed by characters that specify flag output selections.) @@ -2162,7 +2162,7 @@ ______________________________________________________________________ $ lsof +f -- /usr lsof: not a file system: /usr - + (/usr is a directory in the / file system.) 3.21.3 Why does the lsof exit code report it didn't find open files @@ -2191,7 +2191,7 @@ ______________________________________________________________________ (spcuna:/sysprog) ... lsof: no file system use located: spcuna:/sysprog - + All matches were credited to /sysprog; none to spcuna:/sysprog. 3.21.4 Why won't lsof find all the open files in a directory? @@ -2315,7 +2315,7 @@ ______________________________________________________________________ that the rpcent structure is undefined. The complaints may look like this: - >print.c: In function `fill_portmap': + >print.c: In function `fill_portmap': >print.c:213: dereferencing pointer to incomplete type >... @@ -2758,11 +2758,11 @@ ______________________________________________________________________ Lsof's ``-c'' option allows the specification of regular expressions (REs), enclosed in two slash ('/') characters and followed by these modifiers: - + b the RE is a basic RE. i ignore case. x the RE is an extended RE (the default). - + Note: the characters of the regular expression may need to be quoted to prevent their expansion by the shell. @@ -3049,7 +3049,7 @@ ______________________________________________________________________ ERROR!!! can't find ... : or ERROR!!! lsof couldn't find ... - + These type of error messages mean that the lsof field output delivered to the test didn't contain a file that the test could identify as the one it intended lsof to find. It @@ -3224,7 +3224,7 @@ ______________________________________________________________________ LTbigf ... WARNING!!! lsof can't return file offsets for this dialect, so offset tests have been disabled. - + LTbigf then performs the size test and skips the offset tests. @@ -3353,7 +3353,7 @@ ______________________________________________________________________ support. So, try running LTnlink this way: $ ./LTnlink -p /tmp/ - + where is a unique name in /tmp of your choosing. To be safe, create a subdirectory in /tmp, named by your login: @@ -3427,7 +3427,7 @@ ______________________________________________________________________ LTszoff ... WARNING!!! lsof can't return file offsets for this dialect, so offset tests have been disabled. - + LTszoff then performs the size test and skips the offset tests. @@ -3450,7 +3450,7 @@ ______________________________________________________________________ That's because ``-d'' FD lists are processed as ORed lists, so it makes no sense for them to contain both exclusions and inclusions. - + I.e.,, if a ``-d'' FD list were to contain ``^cwd,1'', the ``^cwd'' member is useless, because the ``1'' member dominates by saying "include only FD 1". That effectively @@ -3633,7 +3633,7 @@ ______________________________________________________________________ structure of a process. Since IBM probably will never fix the kernel bug, I've added an AIX-specific option to lsof that controls its use of the readx() function. - + By default lsof readx() use is disabled; specifying the ``-X'' option enables readx() use. @@ -4155,7 +4155,7 @@ ______________________________________________________________________ decompress the download and tar to extract the archive -- e.g., $ gunzip -c xnu-517.7.21.tar.gz | tar xf - - + Remember the absolute path to the extracted archive. That is its installed place. E.g., if the xnu-517.7.21.tar archive was extracted to the lsof builder's home directory, its full @@ -4263,7 +4263,7 @@ ______________________________________________________________________ Lsof for Apple Darwin cannot report link count information reliably. - + For Apple Darwin below 8 link count information is not always available in the kernel node structures available to lsof. When link count information is available, however, it includes @@ -4299,7 +4299,7 @@ ______________________________________________________________________ 5.3 Libproc-based Apple Darwin Questions - + 6.0 BSD/OS BSDI Problems 6.0.5 Statement of deprecation @@ -4656,7 +4656,7 @@ ______________________________________________________________________ dnode.c:113: error: 'struct lockf' has no member named 'lf_flags' dnode.c:115: error: 'struct lockf' has no member named 'lf_id' ... - + Then lsof is being built on a system that has new kernel file locking code and lsof's Configure script failed to build a local lockf_owner.h header file with a structure definition @@ -4777,7 +4777,7 @@ ______________________________________________________________________ complaint with this make invocation: $ make DEBUG="" - + 9.2.2 Why doesn't the /dev/kmem-based CCITT support work under 10.x? Pasi Kaara, who originally provided the HP-UX CCITT support, @@ -5256,7 +5256,7 @@ ______________________________________________________________________ ERROR: Unknown owner and/or group for file "/usr/local/bin/lsof". SUID and/or SGID bit was - not set. + not set. ERROR: Failed installing fileset "lsof.lsof-RUN,r=4.73". Check the above output for details. @@ -5293,7 +5293,7 @@ ______________________________________________________________________ members of the rpcent structure. That happens because gcc defines _XOPEN_SOURCE_EXTENDED which disables the definition of the rpcent structure in . - + Using the HP bundled C compiler is not a viable work-around. That is explained in the answer to the "Why won't the bundled C compiler build PSTAT-based lsof for PA-RISC HP-UX 11.23?" @@ -5805,7 +5805,7 @@ ______________________________________________________________________ nothing: $ lsof -v 2>&1 | grep - + The will be: File System Type Definition Note @@ -5883,7 +5883,7 @@ ______________________________________________________________________ % setenv NETBSD_SYS /my_source % ./Configure -n netbsd - + or $ NETBSD_SYS=/mys_source ./Configure -n netbsd @@ -5905,7 +5905,7 @@ ______________________________________________________________________ e.g., $ make DEBUG="-I/usr/src -I/usr/include" - + If that work-around fails, try using the LSOF_INCLUDE and NETBSD_SYS environment variables to swap /usr/include and /usr/src when running the Configure script, then use the make @@ -6158,9 +6158,9 @@ ______________________________________________________________________ $ lsof -FG +fg ... However, when you precede "-FG" with "+fg" -- e.g., - + $ lsof +fg -FG - + the format will be hexadecimal; order is important. 14.3.1 Why doesn't lsof display FILE_FLAG values for my dialect? @@ -6184,7 +6184,7 @@ ______________________________________________________________________ IPv6 address, will be displayed by lsof as: [::ffff:1.2.3.4] - + The enclosing brackets are lsof's signal that this is an IPv6 address. Inside the brackets is a standard IPv6 address, reported by inet_ntop(). The first two colons, @@ -6222,7 +6222,7 @@ ______________________________________________________________________ names of commands associated with processes. If more characters are required, the "w" value of the "+c w" option may be used to specify a larger width. - + If "w" is zero ('0') lsof will print all characters of all command names up to the limit of the number of characters supplied by the particular UNIX dialect. When reporting @@ -6433,7 +6433,7 @@ ______________________________________________________________________ struct rnode *r; { ... - + the compiler assigns default int types to the ra and r arguments. @@ -6622,7 +6622,7 @@ ______________________________________________________________________ Lsof needs those header files for its compilation. Contact SCO|Caldera to get copies of those header files. - + If you can't get the header files from SCO|Caldera, please contact me via e-mail at . Make sure "lsof" appears in the "Subject:" line so my e-mail filter won't @@ -6731,7 +6731,7 @@ ______________________________________________________________________ #define NUM_GEN_VECTORS 4 #define NUM_SUN_VECTORS 8 - + The Configure script issues a prominent WARNING that you should try the work-around. @@ -6930,7 +6930,7 @@ ______________________________________________________________________ "! 32 BIT echo KERNEL. !" "! !" "!!!WARNING!!!=========!!!WARNING!!!=========!!!WARNING!!!" - + For Sun C: !!!WARNING!!!==========!!!WARNING!!!==========!!!WARNING!!! @@ -6949,12 +6949,12 @@ ______________________________________________________________________ lsof: FATAL: lsof was compiled for a xx bit kernel, but this machine has booted a yy bit kernel. - + Where: xx = 32 or 64 yy = 64 or 32 - + (xx and yy won't match.) - + This message indicates that lsof was compiled for one size kernel and is being asked to execute on a different size one. That's not possible for programs like lsof that use @@ -6977,7 +6977,7 @@ ______________________________________________________________________ lsof with: $ SOLARIS_KERNBITS=64 Configure -n solariscc - + The SOLARIS_KERNBITS environment variable is part of the lsof cross-configuration support, described in the 00XCONFIG file of the lsof distribution. @@ -7034,7 +7034,7 @@ ______________________________________________________________________ $ file lsof lsof: ELF 64-bit MSB executable SPARCV9 Version 1, dynamically linked, not stripped - + The "64-bit" notation indicates the binary was built for a 64 bit kernel. To see the running kernel bit size, use this command: @@ -7309,7 +7309,7 @@ ______________________________________________________________________ For example, if you want the Solaris 8 version, uncompress and unpack libvxfsutil.sol28.tar.Z -- e.g., - + $ su ... # cd i6423 @@ -7361,7 +7361,7 @@ ______________________________________________________________________ Look for the directories /opt/VRTS and /opt/VRTSvxfs. If you have /opt/VRTS, make sure its header and library symbolic links point to those of the active VxFS version. - + If you have both directories, look at the CFLAGS that Configure constructed for making lsof and see which directory path follows a -I option. If that doesn't match the directory path @@ -7377,7 +7377,7 @@ ______________________________________________________________________ report: FATAL: no VxFS .../libvxfsutil.a - + That fatal error message indicates lsof has found the VxFS utility library's header files, but can't find the library itself in the expected location adjacent to the header files. @@ -7942,7 +7942,7 @@ ______________________________________________________________________ Change the HASPERSDC definition in your dialect's machine.h header file. - + When you redefine HASPERSDC, make sure you put at least one user identification conversion in it to keep separate the device cache files for each user of lsof. Also give diff --git a/00PORTING b/00PORTING index 8e6d45dc..6cf1dcba 100644 --- a/00PORTING +++ b/00PORTING @@ -135,7 +135,7 @@ project has so far generated only two kernel modification: * An experimental modification to /usr/src/linux/fs/stat.c allows lstat(2) to return file position information for /proc//fd/ files. - + Contact me for this modification. @@ -462,15 +462,15 @@ A few basic philosophies govern the coding of lsof 4 functions: the cost of nearly-duplicate code. When #if/#else/#endif constructs are necessary: - + o Use the form #if defined(s) - + in preference to - + #ifdef - + to allow easier addition of tests to the #if. o Indent them to signify their level -- e.g., @@ -486,7 +486,7 @@ A few basic philosophies govern the coding of lsof 4 functions: * Document copiously. * Aim for ANSI-C compatibility: - + o Use function prototypes for all functions, hiding them from compilers that cannot handle them with the _PROTOTYPE() macro. @@ -950,7 +950,7 @@ possibilities file system support. HAS_LGRP_ROOT_CONFLICT - indicates the Solaris 9 or Solaris 10 system has + indicates the Solaris 9 or Solaris 10 system has a conflict over the lgrp_root symbol in the and header files. diff --git a/00QUICKSTART b/00QUICKSTART index 48bebd19..8415e952 100644 --- a/00QUICKSTART +++ b/00QUICKSTART @@ -774,7 +774,7 @@ So consult 00FAQ first if you encounter a NAME column message you don't understand. (00FAQ is a possible source of information about other unfamiliar things in lsof output, too.) - + If you can't find help in 00FAQ, you can use grep to look in the lsof source files for the message -- e.g., @@ -820,7 +820,7 @@ A. Selection Options -a tells lsof to AND the set of selection options that are specified. Normally lsof ORs them. - + For example, if you specify the -p and -u options, lsof will display all files for the specified PID or for the specified UID. @@ -1014,7 +1014,7 @@ D. Miscellaneous Lsof Options for arguments to the last option. Example: $ lsof -g -- 1 - + Where `1' is a file path, not PGID ID 1. diff --git a/00XCONFIG b/00XCONFIG index 6db0db03..a496a5a4 100644 --- a/00XCONFIG +++ b/00XCONFIG @@ -516,7 +516,7 @@ HPUX_IPC_S_PATCH If this environment variable has a value of "1", the "N", ipc_s lacks ipc_ipis; any other non-NULL value is considered an error; a NULL value, HPUX_IPC_S_PATCH is determined by testing. - + default: determined with q4 and grep HPUX_KERNBITS specifies the number of bits (32 or 64) in the HP-UX diff --git a/AFSConfig b/AFSConfig index 0c68cbd3..376eeecb 100755 --- a/AFSConfig +++ b/AFSConfig @@ -16,7 +16,7 @@ trap 'rm -f $AH $AV; $ISIG; exit 1' 1 2 3 15 stty -a 2>&1 | grep isig > /dev/null if test $? -eq 0 then - stty -a 2>&1 | egrep -e -isig > /dev/null + stty -a 2>&1 | grep -E -e -isig > /dev/null if test $? -eq 0 then ISIG="stty -isig" @@ -26,7 +26,7 @@ fi # Decide how to use echo. -ECHO=`echo -n ""` +ECHO=$(echo -n "") if test "X$ECHO" = "X-n " then EC="\c" @@ -41,12 +41,12 @@ fi CELL="" if test -r /usr/vice/etc/ThisCell then - cell=`awk '{print $1}' /usr/vice/etc/ThisCell` + cell=$(awk '{print $1}' /usr/vice/etc/ThisCell) if test -d /afs/$cell then CELL=$cell else - CELL=`echo $cell | sed 's/\([^.]*\)\..*/\1/'` + CELL=$(echo $cell | sed 's/\([^.]*\)\..*/\1/') if test "X$CELL" != "X" then if test ! -d /afs/$CELL @@ -101,7 +101,7 @@ echo "=====================================================================" echo "" if test -r $AH then - AHP=`cat $AH` + AHP=$(cat $AH) if test -r $AHP then if test -r $AHP/afs/afs.h @@ -232,7 +232,7 @@ what applies to your configuration. echo "" echo $EO "AFS header file path: $EC" read ANS EXCESS - fc=`expr "${ANS}X" : '\(.\).*'` + fc=$(expr "${ANS}X" : '\(.\).*') if test "X$fc" = "X/" then if test -r $ANS/afs/afs.h @@ -264,7 +264,7 @@ then echo "" echo "=====================================================================" echo "" - AVN=`cat $AV` + AVN=$(cat $AV) cat << .CAT_MARK The AFS version was previously specified as: $AVN .CAT_MARK @@ -293,8 +293,8 @@ fi if test -r $AFSD then - ANS=`strings $AFSD | grep "Base configuration afs" | sed 's/^.*ion afs\([^ ]*\) .*/\1/'` - TV=`echo $ANS | sed 's/^\([0-9]*\)\.\([0-9]*\)\(.*\)/\1 \2 \3/' | awk '{printf "%d.%d%s\n",$1,$2,$3}'` + ANS=$(strings $AFSD | grep "Base configuration afs" | sed 's/^.*ion afs\([^ ]*\) .*/\1/') + TV=$(echo $ANS | sed 's/^\([0-9]*\)\.\([0-9]*\)\(.*\)/\1 \2 \3/' | awk '{printf "%d.%d%s\n",$1,$2,$3}') if test "X$ANS" = "X$TV" then echo "" @@ -337,7 +337,7 @@ do echo "" echo $EO "Please enter the AFS version number: $EC" read ANS EXCESS - TV=`echo $ANS | sed 's/^\([0-9]*\)\.\([0-9]*\)\(.*\)/\1 \2 \3/' | awk '{printf "%d.%d%s\n",$1,$2,$3}'` + TV=$(echo $ANS | sed 's/^\([0-9]*\)\.\([0-9]*\)\(.*\)/\1 \2 \3/' | awk '{printf "%d.%d%s\n",$1,$2,$3}') if test "X$ANS" = "X$TV" then echo $TV > $AV diff --git a/Configure b/Configure index 005cc0af..59cbd1c2 100755 --- a/Configure +++ b/Configure @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/sh # # Configure -- configure lsof # @@ -311,7 +311,7 @@ do echo "rm -f ${LSOF_LIB}/${LSOF_LIBMKF}" exit 0 ;; - + -d|-dialects) if test -r ./00DIALECTS -a -r ./version # { then @@ -1031,7 +1031,7 @@ case $LSOF_TGT in # { done # } # Do other libproc-based Darwin lsof setups. - + if test -r ${LSOF_INCLUDE}/utmpx.h # { then LSOF_CFGF="$LSOF_CFGF -DHASUTMPX" @@ -1043,7 +1043,7 @@ case $LSOF_TGT in # { rm -f $LSOF_HLP exit 1 fi # } - + # Configure for /dev/kmem-based Darwin lsof. echo "Configuring /dev/kmem-based Darwin lsof" @@ -1637,7 +1637,7 @@ kernel generation process. fi # } # Clear LSOF_UNSUP message for supported versions of FreeBSD. - + case $LSOF_VERS in # { 4090|8020|8030|8040|9000|10000|11000|12000|13000) LSOF_UNSUP="" @@ -2516,7 +2516,7 @@ LOCKF_OWNER4 else if test "X$HPUX_BASE" = "X/dev/kmem" # { then - + # Configure for /dev/kmem-based HP-UX lsof. if test "X$HPUX_BOOTFILE" = "X" # { @@ -3044,7 +3044,7 @@ return(0); } fi # } if test "X$LSOF_VERS" = "X" # { then - + # Validate the NetBSD version. case $LSOF_VSTR in # { @@ -3808,7 +3808,7 @@ return(0); } then mkdir dialects/n+obsd/include fi # } - rm -f $LSOF_TMP1 $LSOF_TMP2 $LSOF_TMP3 $LSOF_TMP4 + rm -f $LSOF_TMP1 $LSOF_TMP2 $LSOF_TMP3 $LSOF_TMP4 echo "/^struct netcred" > $LSOF_TMP1 echo "1,.-1d" >> $LSOF_TMP1 echo "/^};" >> $LSOF_TMP1 @@ -4260,7 +4260,7 @@ return(0); } then mkdir dialects/n+obsd/include fi # } - rm -f $LSOF_TMP1 $LSOF_TMP2 $LSOF_TMP3 $LSOF_TMP4 + rm -f $LSOF_TMP1 $LSOF_TMP2 $LSOF_TMP3 $LSOF_TMP4 echo "/^struct netcred" > $LSOF_TMP1 echo "1,.-1d" >> $LSOF_TMP1 echo "/^};" >> $LSOF_TMP1 @@ -4736,7 +4736,7 @@ return(0); } $LSOF_CC ${LSOF_TMPC}.c -m64 -o ${LSOF_TMPC}.x > /dev/null 2>&1 if test $? -eq 0 # { then - /bin/file ${LSOF_TMPC}.x | /bin/grep 64 > /dev/null + /bin/file ${LSOF_TMPC}.x | /bin/grep 64 > /dev/null if test $? -eq 0 # { then LSOF_TMP1="-m64" @@ -4752,7 +4752,7 @@ return(0); } $LSOF_CC ${LSOF_TMPC}.c -mcpu=v9 -o ${LSOF_TMPC}.x > /dev/null 2>&1 if test $? -eq 0 # { then - /bin/file ${LSOF_TMPC}.x | /bin/grep 64 > /dev/null + /bin/file ${LSOF_TMPC}.x | /bin/grep 64 > /dev/null if test $? -eq 0 # { then LSOF_TMP1="-mcpu=v9" @@ -4808,7 +4808,7 @@ return(0); } LSOF_TMP4=`$LSOF_CC ${LSOF_TMPC}.c $LSOF_TMP3 -o ${LSOF_TMPC}.x 2>&1` if test $? -eq 0 # { then - /bin/file ${LSOF_TMPC}.x | /bin/grep 64 > /dev/null + /bin/file ${LSOF_TMPC}.x | /bin/grep 64 > /dev/null if test $? -ne 0 # { then LSOF_TMP3="" @@ -5435,7 +5435,7 @@ return(0); } # Handle unknown abbreviation. - *) + *) echo "Can't configure for $LSOF_TGT." cat $LSOF_HLP rm -f $LSOF_HLP diff --git a/Customize b/Customize index 12fa6f9b..46070025 100755 --- a/Customize +++ b/Customize @@ -533,7 +533,7 @@ Consult the 00DCACHE and 00FAQ files of the lsof distribution for more information. The current path options are: - + .CAT_MARK grep HASENVDC $OLD | tail $TA | egrep "^#define" diff --git a/Inventory b/Inventory index 6b16fe52..aa91e495 100755 --- a/Inventory +++ b/Inventory @@ -9,7 +9,7 @@ trap '$ISIG; exit 1' 1 2 3 15 stty -a 2>&1 | grep isig > /dev/null if test $? -eq 0 then - stty -a 2>&1 | egrep -e -isig > /dev/null + stty -a 2>&1 | grep -E -e -isig > /dev/null if test $? -eq 0 then ISIG="stty -isig" @@ -19,7 +19,7 @@ fi # Establish echo type -- Berkeley or SYSV. -j=`echo -n ""` +j=$(echo -n "") if test "X$j" = "X-n " then EC="\c" @@ -71,7 +71,7 @@ done # The current directory is assumed to be the lsof distribution home. -D=`pwd` +D=$(pwd) # If .ck00MAN exists, the manifest has already been checked. # See if the caller wants to check it again. @@ -125,11 +125,11 @@ echo "" echo $EO "Examining ${D}:$EC" ERR=0 OK=1 -for i in `cat 00MANIFEST | sed 's/\*$//'` +for i in $(cat 00MANIFEST | sed 's/\*$//') do if test "X$i" != "X" then - j=`expr $i : '\(.*\)/$'` + j=$(expr $i : '\(.*\)/$') if test "X$j" != "X" -a "X$j" != "X0" then @@ -146,7 +146,7 @@ do OK=0 fi else - s=`expr $i : '\(.*\):$'` + s=$(expr $i : '\(.*\):$') if test "X$s" != "X" -a "X$s" != "X0" then diff --git a/Lsof.8 b/Lsof.8 index ace90b55..40597e9b 100644 --- a/Lsof.8 +++ b/Lsof.8 @@ -724,7 +724,7 @@ Multiple occurrences of this information can appear in a file's NAME column. .IP .B -E -specfies that endpoint supported files should be displayed +specifies that endpoint supported files should be displayed with endpoint information, but not the files of the endpoints. .TP \w'names'u+4 .B +|\-f [cfgGn] diff --git a/NEW/usage.c b/NEW/usage.c index ff16d7cf..9051dd88 100644 --- a/NEW/usage.c +++ b/NEW/usage.c @@ -413,7 +413,7 @@ usage(xv, fh, version) (void) snpf(buf, sizeof(buf), "+c w COMMAND width (%d)", CMDL); (void) fprintf(stderr, " %-25.25s", buf); - (void) fprintf(stderr, " %s\n", + (void) fprintf(stderr, " %s\n", #if defined(HASNCACHE) "-C no kernel name cache"); diff --git a/OLD/lsof.h b/OLD/lsof.h index 06903fa5..1114f138 100644 --- a/OLD/lsof.h +++ b/OLD/lsof.h @@ -568,7 +568,7 @@ struct int_lst { typedef struct lsof_rx { /* regular expression table entry */ char *exp; /* original regular expression */ regex_t cx; /* compiled expression */ - int mc; /* match count */ + int mc; /* match count */ } lsof_rx_t; extern lsof_rx_t *CmdRx; extern int NCmdRxU; @@ -638,7 +638,7 @@ extern struct str_lst *Cmdl; extern int CmdLim; extern int Cmdni; extern int Cmdnx; - + # if defined(HASSELINUX) typedef struct cntxlist { char *cntx; /* zone name */ @@ -909,7 +909,7 @@ extern struct lfile *Lf, *Plf; struct lproc { char *cmd; /* command name */ - + # if defined(HASSELINUX) char *cntx; /* security context */ # endif /* defined(HASSELINUX) */ diff --git a/OLD/main.c b/OLD/main.c index 054cdcdf..858fffb7 100644 --- a/OLD/main.c +++ b/OLD/main.c @@ -235,7 +235,7 @@ main(argc, argv) #else /* !defined(HASZONES) */ "", #endif /* defined(HASZONES) */ - + #if defined(HASSELINUX) "Z:" #else /* !defined(HASSELINUX) */ @@ -477,7 +477,7 @@ main(argc, argv) || FieldSel[i].id == LSOF_FID_NI) continue; #endif /* !defined(HASFSTRUCT) */ - + #if defined(HASSELINUX) if ((FieldSel[i].id == LSOF_FID_CNTX) && !CntxStatus) continue; @@ -987,7 +987,7 @@ main(argc, argv) } break; #endif /* defined(HASZONES) */ - + #if defined(HASSELINUX) case 'Z': if (!CntxStatus) { @@ -1162,7 +1162,7 @@ main(argc, argv) */ if ((Cmdl && Cmdni) || CmdRx) Selflags |= SELCMD; - + #if defined(HASSELINUX) if (CntxArg) Selflags |= SELCNTX; @@ -1479,7 +1479,7 @@ main(argc, argv) } } for (i = 0; i < NCmdRxU; i++) { - + /* * Check command regular expressions. */ @@ -1668,7 +1668,7 @@ main(argc, argv) } } #endif /* defined(HASZONES) */ - + #if defined(HASSELINUX) if (CntxArg) { diff --git a/OLD/misc.c b/OLD/misc.c index ba79ffd5..06dfc86e 100644 --- a/OLD/misc.c +++ b/OLD/misc.c @@ -1036,7 +1036,7 @@ lstatsafely(path, buf) struct stat *buf; /* stat buffer address */ { if (Fblock) { - if (!Fwarn) + if (!Fwarn) (void) fprintf(stderr, "%s: avoiding stat(%s): -b was specified.\n", Pn, path); @@ -1574,7 +1574,7 @@ statsafely(path, buf) struct stat *buf; /* stat buffer address */ { if (Fblock) { - if (!Fwarn) + if (!Fwarn) (void) fprintf(stderr, "%s: avoiding stat(%s): -b was specified.\n", Pn, path); diff --git a/OLD/print.c b/OLD/print.c index c0af284f..73be6c76 100644 --- a/OLD/print.c +++ b/OLD/print.c @@ -212,7 +212,7 @@ fill_portmap() * and UDP members. */ for (; p; p = p->pml_next) { - + /* * Determine the port map entry's protocol; ignore all but TCP and UDP. */ @@ -893,7 +893,7 @@ print_file() FsColW = len; } else (void) printf(" %*.*s", FsColW, FsColW, cp); - + } # endif /* !defined(HASNOFSADDR) */ @@ -1973,7 +1973,7 @@ printiproto(p) } if (s) (void) snpf(Lf->iproto, sizeof(Lf->iproto), "%.*s", IPROTOL-1, s); - else { + else { if (m < 0) { for (i = 0, m = 1; i < IPROTOL-2; i++) m *= 10; @@ -2105,7 +2105,7 @@ printname(nl) NcacheReload = 0; } if ((cp = ncache_lookup(buf, sizeof(buf), &fp))) { - char *cp1; + char *cp1; if (*cp == '\0') goto print_nma; @@ -2745,13 +2745,13 @@ printunkaf(fam, ty) #endif /* defined(pseudo_AF_KEY) */ #if defined(AF_KEY) /* Security Association DB socket */ - case AF_KEY: + case AF_KEY: s = "KEY"; break; #endif /* defined(AF_KEY) */ #if defined(AF_NCA) /* NCA socket */ - case AF_NCA: + case AF_NCA: s = "NCA"; break; #endif /* defined(AF_NCA) */ @@ -2763,7 +2763,7 @@ printunkaf(fam, ty) #endif /* defined(AF_POLICY) */ #if defined(AF_PPP) /* PPP socket */ - case AF_PPP: + case AF_PPP: s = "PPP"; break; #endif /* defined(AF_PPP) */ diff --git a/OLD/proc.c b/OLD/proc.c index e181994b..15ee2b41 100644 --- a/OLD/proc.c +++ b/OLD/proc.c @@ -331,7 +331,7 @@ alloc_lproc(pid, pgid, ppid, uid, cmd, pss, sf) */ Lp->zn = (char *)NULL; #endif /* defined(HASZONES) */ - + #if defined(HASSELINUX) /* * Clear the security context pointer. The dialect's own code will @@ -601,7 +601,7 @@ is_cmd_excl(cmd, pss, sf) /* * The command is not excluded if no command selection was requested, * or if its name matches any -c specification. - * + * */ if ((Selflags & SELCMD) == 0) return(0); @@ -956,7 +956,7 @@ process_pinfo(f) int i; /* temporary index */ char nma[1024]; /* name addition buffer */ pxinfo_t *pp; /* previous pipe info */ - + if (!FeptE) return; for (Lf = Lp->file; Lf; Lf = Lf->next) { @@ -1172,7 +1172,7 @@ print_proc() if (FieldSel[LSOF_FIX_ZONE].st && Fzone && Lp->zn) (void) printf("%c%s%c", LSOF_FID_ZONE, Lp->zn, Terminator); #endif /* defined(HASZONES) */ - + #if defined(HASSELINUX) if (FieldSel[LSOF_FIX_CNTX].st && Fcntx && Lp->cntx && CntxStatus) (void) printf("%c%s%c", LSOF_FID_CNTX, Lp->cntx, Terminator); diff --git a/README.md b/README.md index 9a2b3482..54d19552 100644 --- a/README.md +++ b/README.md @@ -38,8 +38,8 @@ the "legacy" branch. This branch is just for reference. to "master" branch. lsof had supported many OSes. A term "dialect" represents code for -supporting OSes. Because of limitted resources, we will maintain the -part of them. The current status of maintaince is as follows: +supporting OSes. Because of limited resources, we will maintain the +part of them. The current status of maintenance is as follows:
freebsd
@@ -51,7 +51,7 @@ part of them. The current status of maintaince is as follows:
If you are interested in maintaining a dialect, let us know via the -issue tracker of GitHub (https://github.com/lsof-org/lsof/issues). If +issue tracker of GitHub (https://github.com/lsof-org/lsof/issues). If we cannot find a volunteer for a dialect, we will remove the dialect. Many texts in the source tree still refers purdue.edu as the home of diff --git a/arg.c b/arg.c index fe393d83..e55b36c8 100644 --- a/arg.c +++ b/arg.c @@ -288,7 +288,7 @@ ck_file_arg(i, ac, av, fv, rs, sbp) } sfp->i = (INODETYPE)sb.st_ino; sfp->mode = sb.st_mode & S_IFMT; - + #if defined(CKFA_EXPDEV) /* * Expand device numbers before saving, so that they match the @@ -487,7 +487,7 @@ ctrl_dcache(c) char *c; /* control string */ { int rc = 0; - + if (!c) { (void) fprintf(stderr, "%s: no device cache option control string\n", Pn); @@ -1646,7 +1646,7 @@ enter_network_address(na) n.af = AF_INET; he = lkup_hostnm(hn, &n); #endif /* defined(HASIPv6) */ - + if (!he) { fprintf(stderr, "%s: unknown host name (%s) in: -i ", Pn, hn); @@ -1733,7 +1733,7 @@ enter_network_address(na) * If no protocol has been specified, look up the port * numbers for the service name for both TCP and UDP. */ - if((se = getservbyname(sn, "tcp"))) + if ((se = getservbyname(sn, "tcp"))) pt = (int)ntohs(se->s_port); if ((se1 = getservbyname(sn, "udp"))) pu = (int)ntohs(se1->s_port); @@ -2055,7 +2055,7 @@ enter_state_spec(ss) cp = ssc; err = 0; while (*cp) { - + /* * Determine inclusion or exclusion for this state name. */ diff --git a/check.bash b/check.bash index b8d9c271..09b638ce 100755 --- a/check.bash +++ b/check.bash @@ -1,12 +1,12 @@ set -e if [ $# = 0 ]; then - echo Usage: $0 DIALECT 1>&2 + echo "Usage: $0 DIALECT" 1>&2 exit 1 fi if ! [ -d dialects/$1 ]; then - echo No such dialect: $1 1>&2 + echo "No such dialect: $1" 1>&2 exit 1 fi @@ -14,8 +14,8 @@ echo echo RUNTIME ENVIRONMENT INFORMATION echo ============================================================================= dialect=$1 -echo $dialect -echo $BASH_VERSION +echo "$dialect" +echo "$BASH_VERSION" shopt export @@ -46,7 +46,7 @@ run_one() chmod a+x $x name=$(basename $x .bash) if [ ${x%%/*} = "dialects" ]; then - prefix=${dialect}- + prefix=${dialect}- fi report=/tmp/${prefix}$name-$$.report @@ -58,17 +58,17 @@ run_one() set -e ncases=$((ncases + 1)) if [ "$s" = 0 ]; then - s=ok - nsuccessful=$(($nsuccessful + 1)) - rm -f "$report" + s=ok + nsuccessful=$((nsuccessful + 1)) + rm -f "$report" elif [ "$s" = 2 ]; then - s=skipped - nskipped=$((nskipped + 1)) - REPORTS="${REPORTS} ${report}" + s=skipped + nskipped=$((nskipped + 1)) + REPORTS="${REPORTS} ${report}" else - s=failed - nfailed=$((nfailed + 1)) - REPORTS="${REPORTS} ${report}" + s=failed + nfailed=$((nfailed + 1)) + REPORTS="${REPORTS} ${report}" fi printf "%s\n" $s @@ -91,11 +91,11 @@ done report() { for r in "$@"; do - echo - echo $r - echo ----------------------------------------------------------------------------- - cat $r - rm $r + echo + echo $r + echo ----------------------------------------------------------------------------- + cat $r + rm $r done } @@ -109,13 +109,13 @@ printf "failed: %d\n" $nfailed if [ $nfailed = 0 ]; then printf "All %d test cases are passed successfully\n" $ncases if [ $nskipped = 0 ]; then - : + : elif [ $nskipped = 1 ]; then - printf "but 1 case is skipped\n" - report $REPORTS + printf "but 1 case is skipped\n" + report $REPORTS else - printf "but %d cases are skipped\n" $nskipped - report $REPORTS + printf "but %d cases are skipped\n" $nskipped + report $REPORTS fi exit 0 elif [ $nfailed = 1 ]; then diff --git a/dialects/aix/ddev.c b/dialects/aix/ddev.c index fe45fdfc..861b159c 100644 --- a/dialects/aix/ddev.c +++ b/dialects/aix/ddev.c @@ -89,7 +89,7 @@ getchan(p) int ch; char *s; - if (!(s = strrchr(p, '/'))) + if (!(s = strrchr(p, '/'))) return(-1); if (*(++s) == '\0') return(-1); diff --git a/dialects/aix/dnode.c b/dialects/aix/dnode.c index 1287eeaf..c11335c1 100644 --- a/dialects/aix/dnode.c +++ b/dialects/aix/dnode.c @@ -879,7 +879,7 @@ process_node(va) #if defined(HAS_SANFS) case N_SANFS: if (sans) { - + /* * DEBUG: this code is insufficient. It can't be completed until * IBM makes the SANFS header files available in /usr/include. diff --git a/dialects/aix/dnode2.c b/dialects/aix/dnode2.c index 162c8053..c90234c5 100644 --- a/dialects/aix/dnode2.c +++ b/dialects/aix/dnode2.c @@ -76,5 +76,5 @@ readj2lino(ga, li) li->size = i.i_size; li->dev_def = li->nlink_def = li->number_def = li->size_def = 1; return(0); -} +} #endif /* defined(HAS_JFS2) */ diff --git a/dialects/aix/dproc.c b/dialects/aix/dproc.c index 94a1f63e..19257d6b 100644 --- a/dialects/aix/dproc.c +++ b/dialects/aix/dproc.c @@ -251,7 +251,7 @@ ckkv(d, er, ev, ea) #define OSLEVEL "oslevel" #define OSLEVELPATH "/usr/bin/oslevel" - + if (stat(OSLEVELPATH, &sb)) { # if AIXV<4100 @@ -538,7 +538,7 @@ gather_proc_info() */ ckscko = (sf & SelProc) ? 0 : 1; } - + #else /* AIXV>=4300 */ /* * For AIX 4.3 and above, skip processes excluded by the procsinfo @@ -602,7 +602,7 @@ gather_proc_info() * from the PROCINFO structure. Try the offsets 0, 48, and * -48. Note: these offsets are heuristic attempts to adjust * to differences in the user struct as observed on two systems - * whose header files differed. U_maxofile + * whose header files differed. U_maxofile * follows U_loader by the same number of elements in both * user structs, so the U_loader offset should be the same as * the U_maxofile offset. diff --git a/dialects/aix/machine.h b/dialects/aix/machine.h index d8f4a463..1aef698e 100644 --- a/dialects/aix/machine.h +++ b/dialects/aix/machine.h @@ -62,7 +62,7 @@ * For gcc's sake, some redefinitions after including insure * the off64_t and offset_t types are aligned on an 8 byte boundary. */ - + # if AIXV>=4300 #define _KERNEL 1 # endif /* AIXV>=4300 */ diff --git a/dialects/darwin/kmem/ddev.c b/dialects/darwin/kmem/ddev.c index 5766b155..3dec3958 100644 --- a/dialects/darwin/kmem/ddev.c +++ b/dialects/darwin/kmem/ddev.c @@ -356,7 +356,7 @@ readdev(skip) (size_t)sizeof(struct l_dev *), compdev); BNdev = rmdupdev(&BSdev, BNdev, "block"); } - + # if !defined(NOWARNBLKDEV) else { if (!Fwarn) diff --git a/dialects/darwin/kmem/dfile.c b/dialects/darwin/kmem/dfile.c index 8f877bbc..0bb66bb1 100644 --- a/dialects/darwin/kmem/dfile.c +++ b/dialects/darwin/kmem/dfile.c @@ -89,7 +89,7 @@ struct pshminfo { off_t pshm_length; mode_t pshm_mode; uid_t pshm_uid; - gid_t pshm_gid; + gid_t pshm_gid; char pshm_name[PSHMNAMLEN + 1]; void *pshm_memobject; }; diff --git a/dialects/darwin/kmem/dlsof.h b/dialects/darwin/kmem/dlsof.h index f5e50ebc..42b5b9ff 100644 --- a/dialects/darwin/kmem/dlsof.h +++ b/dialects/darwin/kmem/dlsof.h @@ -300,7 +300,7 @@ struct sfile { }; -#define XDR_VOID (const xdrproc_t)xdr_void +#define XDR_VOID (const xdrproc_t)xdr_void #define XDR_PMAPLIST (const xdrproc_t)xdr_pmaplist diff --git a/dialects/darwin/kmem/dnode.c b/dialects/darwin/kmem/dnode.c index 66540333..de0e8ba7 100644 --- a/dialects/darwin/kmem/dnode.c +++ b/dialects/darwin/kmem/dnode.c @@ -855,7 +855,7 @@ process_node(va) * Save node number. */ Lf->inode = (INODETYPE)sb.st_ino; - Lf->inp_ty = 1; + Lf->inp_ty = 1; /* * Optionally save link count. */ diff --git a/dialects/darwin/kmem/dproc.c b/dialects/darwin/kmem/dproc.c index c1f37270..1cc5287b 100644 --- a/dialects/darwin/kmem/dproc.c +++ b/dialects/darwin/kmem/dproc.c @@ -615,7 +615,7 @@ read_procs() MALLOC_S msz; struct proc *p; struct phash *ph, *phn; - + if (!Akp) { /* diff --git a/dialects/darwin/libproc/ddev.c b/dialects/darwin/libproc/ddev.c index d89be26f..ae54c819 100644 --- a/dialects/darwin/libproc/ddev.c +++ b/dialects/darwin/libproc/ddev.c @@ -426,7 +426,7 @@ readdev(skip) (size_t)sizeof(struct l_dev *), compdev); BNdev = rmdupdev(&BSdev, BNdev, "block"); } - + # if !defined(NOWARNBLKDEV) else { if (!Fwarn) diff --git a/dialects/darwin/libproc/dfile.c b/dialects/darwin/libproc/dfile.c index ca0227b3..f0cd03eb 100644 --- a/dialects/darwin/libproc/dfile.c +++ b/dialects/darwin/libproc/dfile.c @@ -456,8 +456,8 @@ process_pipe_common(pi) (SZOFFTYPE)pi->pipeinfo.pipe_stat.vst_size); } } - - + + void process_pipe(pid, fd) int pid; /* PID */ diff --git a/dialects/darwin/libproc/dlsof.h b/dialects/darwin/libproc/dlsof.h index c3a1c704..4f2bccfe 100644 --- a/dialects/darwin/libproc/dlsof.h +++ b/dialects/darwin/libproc/dlsof.h @@ -79,7 +79,7 @@ typedef uintptr_t KA_T; #define FREE_P MALLOC_P #define MALLOC_S size_t #define MAXSYSCMDL (MAXCOMLEN - 1) /* max system command name length */ -#define MOUNTED MNT_MNTTAB +#define MOUNTED MNT_MNTTAB #define QSORT_P void #define READLEN_T int #define STRNCPY_L size_t @@ -126,7 +126,7 @@ struct sfile { }; -#define XDR_VOID (const xdrproc_t)xdr_void +#define XDR_VOID (const xdrproc_t)xdr_void #define XDR_PMAPLIST (const xdrproc_t)xdr_pmaplist # if !defined(offsetof) diff --git a/dialects/darwin/libproc/dproc.c b/dialects/darwin/libproc/dproc.c index 016189f2..691261b3 100644 --- a/dialects/darwin/libproc/dproc.c +++ b/dialects/darwin/libproc/dproc.c @@ -744,7 +744,7 @@ process_text(pid) #define TWD " twd" /* per-thread current working directory * fd name */ - + static void process_threads(pid, n) int pid; /* PID */ diff --git a/dialects/du/ddev.c b/dialects/du/ddev.c index 3e1ed63a..b988c9d4 100644 --- a/dialects/du/ddev.c +++ b/dialects/du/ddev.c @@ -518,7 +518,7 @@ readdev(skip) * and/or their "/dev/fd" filesystem. The problem is that when applied to * "/dev/fs", getdirentries() returns the wrong size, which can cause readdir() * to run off the end of it's internal buffer and return bogus file names. - * + * * The changes from the original NetBSD file are: * * - uses of the field dd_flags in the DIR structure have been removed since diff --git a/dialects/du/dproc.c b/dialects/du/dproc.c index 51c671a3..759b5869 100644 --- a/dialects/du/dproc.c +++ b/dialects/du/dproc.c @@ -497,7 +497,7 @@ get_kernel_access() rv = knlist(Nl); else #endif /* DUV>=40000 */ - + rv = nlist(Nmlst, Nl); if (rv == -1) { (void) fprintf(stderr, @@ -969,7 +969,7 @@ vpo2vp(vpo) if (!ka || kread(ka, (char *)&bfa, sizeof(bfa))) return(ka); return((KA_T)bfa.vp); -} +} #endif /* DUV>=50000 */ diff --git a/dialects/freebsd/dlsof.h b/dialects/freebsd/dlsof.h index f97da384..3a055f0b 100644 --- a/dialects/freebsd/dlsof.h +++ b/dialects/freebsd/dlsof.h @@ -62,7 +62,7 @@ * complaint about register use. */ -#include +#include #define PCPU_MD_FIELDS \ struct alpha_pcb pc_idlepcb; /* pcb for idling */ \ u_int64_t pc_idlepcbphys; /* pa of pc_idlepcb */ \ diff --git a/dialects/freebsd/dnode.c b/dialects/freebsd/dnode.c index 54274ceb..1b335c0c 100644 --- a/dialects/freebsd/dnode.c +++ b/dialects/freebsd/dnode.c @@ -378,7 +378,7 @@ process_node(va) # endif /* FREEBSDV>=2000 */ #endif /* defined(HASPROCFS) */ -#if defined(HASPSEUDOFS) +#if defined(HASPSEUDOFS) struct pfs_node pn; struct pfs_node *pnp; #endif /* defined(HASPSEUDOFS) */ @@ -442,7 +442,7 @@ process_node(va) p = (struct pfsnode *)NULL; #endif /* defined(HASPROCFS) */ -#if defined(HASPSEUDOFS) +#if defined(HASPSEUDOFS) pnp = (struct pfs_node *)NULL; #endif /* defined(HASPSEUDOFS) */ diff --git a/dialects/freebsd/dnode2.c b/dialects/freebsd/dnode2.c index 517a2bc5..07d4600b 100644 --- a/dialects/freebsd/dnode2.c +++ b/dialects/freebsd/dnode2.c @@ -149,7 +149,7 @@ readzfsnode(za, zi, vr) * A gcc work-around */ -int _cv_timedwait_sbt(struct cv *cvp, struct lock_object *lock, +int _cv_timedwait_sbt(struct cv *cvp, struct lock_object *lock, sbintime_t sbt, sbintime_t pr, int flags) { return(0); diff --git a/dialects/freebsd/dsock.c b/dialects/freebsd/dsock.c index a67bcca7..219e3dd6 100644 --- a/dialects/freebsd/dsock.c +++ b/dialects/freebsd/dsock.c @@ -366,7 +366,7 @@ process_socket(sa) (s.so_snd.sb_state & SBS_CANTSENDMORE) ? #else /* !defined(HASSBSTATE) */ (s.so_state & SS_CANTSENDMORE) ? -#endif /* defined(HASSBSTATE) */ +#endif /* defined(HASSBSTATE) */ ", CANTSENDMORE" : "", #if defined(HASSBSTATE) @@ -407,7 +407,7 @@ process_socket(sa) fp = (int)ntohs(inp.inp_fport); } } - + #if defined(HASIPv6) && defined(HASINRIAIPv6) else { la = (unsigned char *)&inp.inp_laddr6; @@ -551,7 +551,7 @@ process_socket(sa) unl = ua->sun_len - offsetof(struct sockaddr_un, sun_path); # else /* FREEBSDV<4060 */ unl = sizeof(ua->sun_path) - 1; -# endif /* FREEBSDV>4060 */ +# endif /* FREEBSDV>4060 */ if ((unl < 0) || (unl >= sizeof(ua->sun_path))) unl = sizeof(ua->sun_path) - 1; ua->sun_path[unl] = '\0'; diff --git a/dialects/hpux/kmem/dmnt.c b/dialects/hpux/kmem/dmnt.c index ce5e1b5c..ea388f96 100644 --- a/dialects/hpux/kmem/dmnt.c +++ b/dialects/hpux/kmem/dmnt.c @@ -120,7 +120,7 @@ completevfs(vfs, dev) * with statsafely(). */ if (v && v->vfs_name[0]) { - + struct stat sb; if (!(vfs->dir = mkstrcpy(v->vfs_name, (MALLOC_S *)NULL))) { @@ -232,7 +232,7 @@ readvfs(lv) # if HPUXV<1000 (void) completevfs(vp, (dev_t *)&m.m_dev, &v); # else /* HPUXV>=1000 */ - (void) completevfs(vp, v.vfs_dev ? (dev_t *)&v.vfs_dev + (void) completevfs(vp, v.vfs_dev ? (dev_t *)&v.vfs_dev : (dev_t *)&m.m_dev, &v); # endif /* HPUXV<1000 */ diff --git a/dialects/hpux/kmem/dnode.c b/dialects/hpux/kmem/dnode.c index 919a8804..72242251 100644 --- a/dialects/hpux/kmem/dnode.c +++ b/dialects/hpux/kmem/dnode.c @@ -252,7 +252,7 @@ getnodety(v) /* * Caution: this AFS test should be the last one. */ - + else if (avops) { if (avops == (unsigned long)v->v_op) return(N_AFS); @@ -489,7 +489,7 @@ process_node(va) if (!v->v_data || readrnode((KA_T)v->v_data, &r)) { (void) snpf(Namech, Namechl, "vnode at %s: can't read rnode (%s)", - print_kptr(va, tbuf, sizeof(tbuf)), + print_kptr(va, tbuf, sizeof(tbuf)), print_kptr((KA_T)v->v_data, (char *)NULL, 0)); enter_nm(Namech); return; diff --git a/dialects/hpux/kmem/hpux11/nfs_clnt.h b/dialects/hpux/kmem/hpux11/nfs_clnt.h index 6b2df972..67f2a713 100644 --- a/dialects/hpux/kmem/hpux11/nfs_clnt.h +++ b/dialects/hpux/kmem/hpux11/nfs_clnt.h @@ -22,9 +22,9 @@ #undef TCP_NODELAY #undef TCP_MAXSEG -typedef struct kcondvar { - uint32_t _dummy1[6]; -} kcondvar_t; +typedef struct kcondvar { + uint32_t _dummy1[6]; +} kcondvar_t; typedef struct mntinfo { kmutex_t mi_lock; diff --git a/dialects/hpux/pstat/dlsof.h b/dialects/hpux/pstat/dlsof.h index dff34e5c..6fe63a29 100644 --- a/dialects/hpux/pstat/dlsof.h +++ b/dialects/hpux/pstat/dlsof.h @@ -83,7 +83,7 @@ #define _APP32_64BIT_OFF_T TMP_APP32_64BIT_OFF_T #undef TMP_APP32_64BIT_OFF_T # endif - + #include #include @@ -122,7 +122,7 @@ typedef unsigned long long KA_T; #define XDR_VOID (xdrproc_t)xdr_void -/* +/* * Local macros */ diff --git a/dialects/hpux/pstat/dproc.c b/dialects/hpux/pstat/dproc.c index 63f25cb3..6ee8ac15 100644 --- a/dialects/hpux/pstat/dproc.c +++ b/dialects/hpux/pstat/dproc.c @@ -670,7 +670,7 @@ process_text(p) link_lfile(); } } - + /* * read_det() -- read the pst_filedetails structure diff --git a/dialects/hpux/pstat/dsock.c b/dialects/hpux/pstat/dsock.c index fff407c9..9be50134 100644 --- a/dialects/hpux/pstat/dsock.c +++ b/dialects/hpux/pstat/dsock.c @@ -136,7 +136,7 @@ make_sock(f, sh, s) size_t sz; /* * Zero the destination pst_socket structure and propagate its file and node - * IDs from the stream head. Also propagate the linger time. + * IDs from the stream head. Also propagate the linger time. */ (void)memset((void *)s, 0, sizeof(struct pst_socket)); s->pst_hi_fileid = sh->val.head.pst_hi_fileid; @@ -1102,7 +1102,7 @@ process_socket(f, s) Lf->sz_def = 1; } else Lf->off_def = 1; - + #if defined(HASTCPTPIQ) /* * Enter queue sizes. @@ -1155,7 +1155,7 @@ process_socket(f, s) if (Fnet && (!FnetTy || (FnetTy != 6))) Lf->sf |= SELNET; (void) snpf(Lf->type, sizeof(Lf->type), - + #if defined(HASIPv6) "IPv4" #else /* !defined(HASIPv6) */ @@ -1460,7 +1460,7 @@ process_stream(f, ckscko) if (s[hx].type == PS_STR_HEAD) break; } - if (hx >= nsn) { + if (hx >= nsn) { enter_nm("no stream head located"); return; } diff --git a/dialects/linux/dlsof.h b/dialects/linux/dlsof.h index 16f04e28..f1b88c4a 100644 --- a/dialects/linux/dlsof.h +++ b/dialects/linux/dlsof.h @@ -60,7 +60,7 @@ #include #include # endif /* !defined(HASNORPC_H) */ - + #if defined(HASSELINUX) #include #endif /* defined(HASSELINUX) */ diff --git a/dialects/linux/dproc.c b/dialects/linux/dproc.c index 206a9818..6fe2e58b 100644 --- a/dialects/linux/dproc.c +++ b/dialects/linux/dproc.c @@ -343,7 +343,7 @@ gather_proc_info() * Get the PID's command name. */ (void) make_proc_path(pidpath, n, &path, &pathl, "stat"); - if ((prv = read_id_stat(path, pid, &cmd, &ppid, &pgid)) < 0) + if ((prv = read_id_stat(path, pid, &cmd, &ppid, &pgid)) < 0) cmd = "(unknown)"; #if defined(HASTASKS) @@ -1704,7 +1704,7 @@ read_id_stat(p, id, cmd, ppid, pgid) if (ch == '(') /* a '(' advances the balance count */ pc++; if (ch == ')') { - + /* * Balance parentheses when a closure is encountered. When * they are balanced, this is the end of the command. diff --git a/dialects/linux/dsock.c b/dialects/linux/dsock.c index 374e5104..c367a646 100644 --- a/dialects/linux/dsock.c +++ b/dialects/linux/dsock.c @@ -1041,7 +1041,7 @@ enter_uxsinfo (up) static void fill_uxicino (si, ic) INODETYPE si; /* UNIX socket inode number */ - INODETYPE ic; /* incomining UNIX socket connection + INODETYPE ic; /* incoming UNIX socket connection * inode number */ { uxsin_t *psi; /* pointer to socket's information */ @@ -1137,7 +1137,7 @@ get_diagmsg(sockfd) /* - * get_uxpeeri() - get UNIX socket peer inode information + * get_uxpeeri() - get UNIX socket peer inode information */ static void @@ -1173,9 +1173,9 @@ get_uxpeeri() goto get_uxpeeri_exit; hp = (struct nlmsghdr *)rb; while (NLMSG_OK(hp, nb)) { - if(hp->nlmsg_type == NLMSG_DONE) + if (hp->nlmsg_type == NLMSG_DONE) goto get_uxpeeri_exit; - if(hp->nlmsg_type == NLMSG_ERROR) { + if (hp->nlmsg_type == NLMSG_ERROR) { (void) fprintf(stderr, "%s: netlink UNIX socket msg peer info error\n", Pn); goto get_uxpeeri_exit; @@ -1231,7 +1231,7 @@ parse_diag(dm, len) } break; case UNIX_DIAG_ICONS: - icct = RTA_PAYLOAD(rp), + icct = RTA_PAYLOAD(rp), icp = (uint32_t *)RTA_DATA(rp); for (i = 0; i < icct; i += sizeof(uint32_t), icp++) { @@ -1382,8 +1382,8 @@ process_uxsinfo(f) } } #endif /* defined(HASEPTOPTS) && defined(HASUXSOCKEPT) */ - - + + #if defined(HASEPTOPTS) /* * enter_netsinfo_common() -- enter inet or inet6 socket info @@ -2060,7 +2060,7 @@ get_ipx(p) (void) fclose(xs); } - + /* * get_netlink() - get /proc/net/netlink info */ @@ -2075,7 +2075,7 @@ get_netlink(p) INODETYPE inode; struct nlksin *np, *lp; static char *vbuf = (char *)NULL; - static size_t vsz = (size_t)0; + static size_t vsz = (size_t)0; FILE *xs; /* * Do second time cleanup or first time setup. @@ -2784,7 +2784,7 @@ get_sctpaddrs(fp, i, nf, x) break; if (cp) cp = (char *)realloc((MALLOC_P *)cp, al + tl + 1); - else + else cp = (char *)malloc(al + tl + 1); if (!cp) break; @@ -2852,7 +2852,7 @@ get_tcpudp(p, pr, clr) * If no hash buckets have been allocated, do so now. */ } else { - + /* * Open the /proc/net/sockstat file and establish the hash bucket * count from its "sockets: used" line. @@ -2895,7 +2895,7 @@ get_tcpudp(p, pr, clr) /* * Open the /proc/net file, assign a page size buffer to the stream, and * read it. - */ + */ if (!(fs = open_proc_stream(p, "r", &vbuf, &vsz, 0))) return; nf = 12; @@ -3220,7 +3220,7 @@ get_tcpudp6(p, pr, clr) #endif /* defined(HASEPTOPTS) */ } } else { - + /* * Open the /proc/net/sockstat6 file and establish the hash bucket * count from its "TCP6: inuse" and "UDP6: inuse" lines. @@ -3731,7 +3731,7 @@ print_ax25info(ap) (void) snpf(&pbuf[pl], sizeof(pbuf) - pl, "(Sq=%lu ", ap->sq); pl = strlen(pbuf); cp = ""; - } else + } else cp = "("; if (ap->rqs) { (void) snpf(&pbuf[pl], sizeof(pbuf) - pl, "%sRq=%lu ", cp, ap->rq); @@ -3977,7 +3977,7 @@ process_proc_sock(p, pbr, s, ss, l, lss) if ((ss & SB_INO) && (ap = check_ax25((INODETYPE)s->st_ino)) ) { - + /* * The inode is connected to an AX25 /proc record. * @@ -4107,7 +4107,7 @@ process_proc_sock(p, pbr, s, ss, l, lss) * Store the state, optionally prefixed by a space, in the * form "st=x...x". */ - + if (nl > (len = ((cp == Namech) ? 0 : 1) + 3 + rp->spl)) { (void) snpf(cp, nl, "%sst=%s", (cp == Namech) ? "" : " ", rp->sp); @@ -4312,7 +4312,7 @@ process_proc_sock(p, pbr, s, ss, l, lss) cp = "SLOW"; break; #endif /* defined(ETH_P_SLOW) */ - + #if defined(ETH_P_WCCP) case ETH_P_WCCP: cp = "WCCP"; @@ -4531,7 +4531,7 @@ process_proc_sock(p, pbr, s, ss, l, lss) Namech[Namechl - 1] = '\0'; (void) enter_nm(Namech); if (Sfile) { - + /* * See if this UNIX domain socket was specified as a search * argument. @@ -4648,7 +4648,7 @@ process_proc_sock(p, pbr, s, ss, l, lss) * Store the state, optionally prefixed by a space, in the * form "st=x...x". */ - + if (nl > (len = ((cp == Namech) ? 0 : 1) + 3 + rp->spl)) { (void) snpf(cp, nl, "%sst=%s", (cp == Namech) ? "" : " ", rp->sp); @@ -4906,10 +4906,10 @@ process_proc_sock(p, pbr, s, ss, l, lss) sp->addr ? sp->addr : "", (sp->laddrs || sp->lport) ? " " : "", sp->laddrs ? sp->laddrs : "", - sp->lport ? "[" : "", - sp->lport ? sp->lport : "", + sp->lport ? "[" : "", + sp->lport ? sp->lport : "", sp->lport ? "]" : "" - ); + ); } else { /* @@ -4922,16 +4922,16 @@ process_proc_sock(p, pbr, s, ss, l, lss) (sp->addr && sp->assocID) ? "," : "", sp->assocID ? sp->assocID : "", sp->laddrs ? sp->laddrs : "", - sp->lport ? "[" : "", - sp->lport ? sp->lport : "", - sp->lport ? "]" : "", + sp->lport ? "[" : "", + sp->lport ? sp->lport : "", + sp->lport ? "]" : "", ((sp->laddrs || sp->lport) && (sp->raddrs || sp->rport)) ? "<->" : "", sp->raddrs ? sp->raddrs : "", - sp->rport ? "[" : "", - sp->rport ? sp->rport : "", + sp->rport ? "[" : "", + sp->rport ? sp->rport : "", sp->rport ? "]" : "" - ); + ); } if (Namech[0]) enter_nm(Namech); @@ -5007,7 +5007,7 @@ process_proc_sock(p, pbr, s, ss, l, lss) prp = &Namech[i]; sz = (ssize_t)(Namechl - i - 1); } - if ((getxattr(pbr, "system.sockprotoname", prp, sz)) < 0) + if ((getxattr(pbr, "system.sockprotoname", prp, sz)) < 0) enter_nm("can't identify protocol"); else enter_nm(Namech); diff --git a/dialects/n+obsd/dlsof.h b/dialects/n+obsd/dlsof.h index 2aa21694..31274196 100644 --- a/dialects/n+obsd/dlsof.h +++ b/dialects/n+obsd/dlsof.h @@ -53,7 +53,7 @@ #include #include - + # if defined(HAS_LWP_H) #include # endif /* defined(HAS_LWP_H) */ @@ -185,7 +185,7 @@ struct nameidata; /* to satisfy a function prototype in msdosfsmount.h */ # endif /* !defined(TF_ECN_PERMIT) */ # if !defined(TF_RCVD_CE) -#define TF_RCVD_CE 0x00010000 /* send ECE in subsequent segs */ +#define TF_RCVD_CE 0x00010000 /* send ECE in subsequent segs */ # endif /* !defined(TF_RCVD_CE) */ # if !defined(TF_SEND_CWR) @@ -516,7 +516,7 @@ struct mounts { extern int Np; /* number of kernel processes */ -# if defined(HASKVMGETPROC2) +# if defined(HASKVMGETPROC2) struct kinfo_proc2 *P; /* local process table copy */ # else /* ! defined(HASKVMGETPROC2) */ struct kinfo_proc *P; /* local process table copy */ diff --git a/dialects/n+obsd/dmnt.c b/dialects/n+obsd/dmnt.c index e3d42994..adf9c9e2 100644 --- a/dialects/n+obsd/dmnt.c +++ b/dialects/n+obsd/dmnt.c @@ -37,10 +37,10 @@ static char copyright[] = #if defined(NETBSDV) && defined(HASSTATVFS) /* - * NetBSD needs the statvfs structure to be defined without the + * NetBSD needs the statvfs structure to be defined without the * pre-definition of _KERNEL. */ - + #include #endif /* defined(NETBSDV) && defined(HASSTATVFS) */ diff --git a/dialects/n+obsd/dnode.c b/dialects/n+obsd/dnode.c index ae643237..bc48e028 100644 --- a/dialects/n+obsd/dnode.c +++ b/dialects/n+obsd/dnode.c @@ -407,7 +407,7 @@ process_node(va) #if defined(HASKERNFS) case VT_KERNFS: - + /* * Read the kernfs_node. */ @@ -978,7 +978,7 @@ process_node(va) case INODE: #if defined(HASI_FFS) - + Lf->sz = (SZOFFTYPE)i.i_ffs_size; Lf->sz_def = 1; break; @@ -1116,9 +1116,9 @@ process_node(va) # endif /* defined(HASI_E2FS_PTR) */ break; - + #endif /* defined(HASEXT2FS) */ - + } break; } @@ -1364,7 +1364,7 @@ process_node(va) } else if (nty == PFSNODE) { for (pfi = Procfsid; pfi; pfi = pfi->next) { if ((pfi->pid && pfi->pid == p.pfs_pid) - + # if defined(HASPINODEN) || ((Lf->inp_ty == 1) && (pfi->inode == Lf->inode)) # endif /* defined(HASPINODEN) */ diff --git a/dialects/n+os/dnode.c b/dialects/n+os/dnode.c index 419000e1..3e2a4cd9 100644 --- a/dialects/n+os/dnode.c +++ b/dialects/n+os/dnode.c @@ -380,7 +380,7 @@ process_node(va) /* * Caution: this AFS test should be the last one. */ - + else if (avops) { if ((KA_T)v->v_op == avops) Ntype = N_AFS; diff --git a/dialects/n+os/dproc.c b/dialects/n+os/dproc.c index ef8529cb..ad8fd6aa 100644 --- a/dialects/n+os/dproc.c +++ b/dialects/n+os/dproc.c @@ -372,7 +372,7 @@ get_kernel_access() * the AFS module name list file. Make sure that other symbols that * appear in both name list files have the same values. */ - if (get_Nl_value("arFID", Drive_Nl, &v[0]) >= 0 + if (get_Nl_value("arFID", Drive_Nl, &v[0]) >= 0 && get_Nl_value("avol", Drive_Nl, &v[1]) >= 0 && get_Nl_value("avol", Drive_Nl, &v[2]) >= 0 && (!vo[0] || !v[1] || !v[2])) @@ -552,7 +552,7 @@ process_map(map) * Look for non-map and non-sub-map vm map entries that have an object * with a shadow whose pager pointer addresses a non-swap-file istruct * that has a vnode pointer. Process the unique vnodes found. - */ + */ #if STEPV<40 vme = vmm.header; ne = vmm.nentries; diff --git a/dialects/osr/dnode.c b/dialects/osr/dnode.c index c341cc73..3ea37fa2 100644 --- a/dialects/osr/dnode.c +++ b/dialects/osr/dnode.c @@ -333,7 +333,7 @@ process_node(na) } /* * Get the module names of all queue elements of the stream's - * sd_wrq queue. Skip module names that end in "head", + * sd_wrq queue. Skip module names that end in "head", * match the last component of the /dev name, or match the * cdevsw[].d_name. */ diff --git a/dialects/osr/dproc.c b/dialects/osr/dproc.c index 4319a2ba..aa576846 100644 --- a/dialects/osr/dproc.c +++ b/dialects/osr/dproc.c @@ -123,7 +123,7 @@ gather_proc_info() unsigned int uid; #if defined(HASFSTRUCT) - static MALLOC_S npofb = 0; + static MALLOC_S npofb = 0; char *pof; static char *pofb = (char *)NULL; #endif /* defined(HASFSTRUCT) */ @@ -906,7 +906,7 @@ readfsinfo() (void) fprintf(stderr, "%s: sysfs(GETNFSTYP) error: %s\n", Pn, strerror(errno)); Exit(1); - } + } if (Fsinfomax == 0) return; if (!(Fsinfo = (char **)malloc((MALLOC_S)(Fsinfomax * sizeof(char *))))) @@ -1410,7 +1410,7 @@ LNC_enter(le, nm, nl, fs) lc->u.ln.rp = le->u.ln.rp; lc->u.ln.dp = le->u.ln.dp; } else { - + /* * Make a device-inode entry. */ @@ -1932,7 +1932,7 @@ SYSV_load() * Do first-time setup, as required. */ if (s5nce == 0) { - + /* * Quit if the SYSV name cache address is unknown. */ @@ -1943,7 +1943,7 @@ SYSV_load() */ # if OSRV<500 - s5nce = Var.v_s5cacheents; + s5nce = Var.v_s5cacheents; # else /* OSRV>=500 */ if (get_Nl_value("nsfnc", Drive_Nl, &v) < 0 || !v || kread(v, (char *)&s5nce, sizeof(s5nce))) diff --git a/dialects/osr/dsock.c b/dialects/osr/dsock.c index b872ce4d..cbd92173 100644 --- a/dialects/osr/dsock.c +++ b/dialects/osr/dsock.c @@ -72,7 +72,7 @@ process_socket(i) struct sockaddr_in si; struct un_dev ud; #endif /* OSRV<500 */ - + (void) snpf(Lf->type, sizeof(Lf->type), "sock"); /* * Read socket. @@ -362,7 +362,7 @@ udp_tm(tm) */ if (!Lbolt) return; - if (Hz < 0 + if (Hz < 0 || kread((KA_T)Lbolt, (char *)&lbolt, sizeof(lbolt)) || tm >= lbolt || (et = (time_t)((lbolt - tm) / Hz)) == 0) diff --git a/dialects/sun/ddev.c b/dialects/sun/ddev.c index 58e7edaf..3af52321 100644 --- a/dialects/sun/ddev.c +++ b/dialects/sun/ddev.c @@ -185,7 +185,7 @@ printdevname(dev, rdev, f, nty) safestrprt(c->cd.name, stdout, f); return(1); - } + } } } /* @@ -238,7 +238,7 @@ read_clone() MALLOC_S pl; struct pseudo *p; struct stat sb; - + if (Clone || Pseudo) return; /* diff --git a/dialects/sun/dnode.c b/dialects/sun/dnode.c index f3bb6ee9..300fc5a1 100644 --- a/dialects/sun/dnode.c +++ b/dialects/sun/dnode.c @@ -298,7 +298,7 @@ static CTF_exception_t CTF_exceptions[] = { { ZNODE_TYPE_NAME, "z_size" }, { NULL, NULL } }; - + /* * ZFS function prototypes @@ -1590,7 +1590,7 @@ process_node(va) /* * See if this Solaris node is served by spec_vnodeops. */ - if (Spvops && Spvops == (KA_T)v->v_op) + if (Spvops && Spvops == (KA_T)v->v_op) Ntype = N_SPEC; /* * Determine the Solaris lock state. @@ -1611,7 +1611,7 @@ process_node(va) */ switch (Ntype) { case N_SPEC: - + /* * A N_SPEC node is a node that resides in in an underlying file system * type -- e.g. NFS, HSFS. Its vnode points to an snode. Subsequent @@ -2023,7 +2023,7 @@ process_node(va) return; break; #endif /* defined(HAS_AFS) */ - + #if solaris>=20500 case N_AUTO: @@ -2890,7 +2890,7 @@ process_node(va) break; } if (dns) { - if ((Lf->inode = (INODETYPE)dn.door_index)) + if ((Lf->inode = (INODETYPE)dn.door_index)) Lf->inp_ty = 1; } break; @@ -3499,7 +3499,7 @@ process_node(va) && nn.nm_mountpt) { if (!readvnode((KA_T)nn.nm_mountpt, &fv) && fv.v_vfsp) { - if ((nvfs = readvfs((KA_T)fv.v_vfsp, (struct vfs *)NULL, + if ((nvfs = readvfs((KA_T)fv.v_vfsp, (struct vfs *)NULL, nn.nm_filevp)) && !nvfs->dir) { @@ -5100,7 +5100,7 @@ read_nzn(na, nza, zn) zn->z_size = zp.zp_size; } } else { - + /* * Make sure z_link and z_size are defined when z_phys isn't. */ diff --git a/dialects/sun/dproc.c b/dialects/sun/dproc.c index afa89119..a40ae77e 100644 --- a/dialects/sun/dproc.c +++ b/dialects/sun/dproc.c @@ -1060,7 +1060,7 @@ open_kvm() #if solaris>=20501 && solaris<70000 if ((Kmd = open((Memory ? Memory : KMEM), O_RDONLY)) < 0) { - (void) fprintf(stderr, "%s: open(\"/dev/mem\"): %s\n", Pn, + (void) fprintf(stderr, "%s: open(\"/dev/mem\"): %s\n", Pn, strerror(errno)); Exit(1); } @@ -1095,7 +1095,7 @@ open_kvm() * avl_node_t. These avl_nodes connect to other avl nodes embedded in * objects of the same type. The avl_tree contains knowledge about the * size of the structure and the offset of the AVL node in the object - * so we can convert between AVL nodes and (in this case) struct seg. + * so we can convert between AVL nodes and (in this case) struct seg. * * This code was provided by Casper Dik . */ @@ -1196,7 +1196,7 @@ process_text(pa) if (kread((KA_T)s.s_data, (char *)&vn, sizeof(vn))) break; if (vn.vp) { - + /* * This is a virtual node segment. * @@ -1270,7 +1270,7 @@ process_text(pa) if (kread((KA_T)s.s_data, (char *)&vn, sizeof(vn))) break; if (vn.vp) { - + /* * This is a virtual node segment. * @@ -1327,7 +1327,7 @@ readfsinfo() (void) fprintf(stderr, "%s: sysfs(GETNFSTYP) error: %s\n", Pn, strerror(errno)); Exit(1); - } + } if (Fsinfomax == 0) return; if (!(Fsinfo = (char **)malloc((MALLOC_S)(Fsinfomax * sizeof(char *))))) diff --git a/dialects/sun/dsock.c b/dialects/sun/dsock.c index f686679c..b3161804 100644 --- a/dialects/sun/dsock.c +++ b/dialects/sun/dsock.c @@ -972,7 +972,7 @@ process_VSOCK(va, v, so) if (Ftcptpi & TCPTPI_FLAGS) { union { uint_t flags; - uint_t + uint_t udpb_debug : 1, /* SO_DEBUG option */ udpb_dontroute : 1, /* SO_DONTROUTE option */ udpb_broadcast : 1, /* SO_BROADCAST option */ diff --git a/dialects/uw/dnode.c b/dialects/uw/dnode.c index 9cdab58a..e022ee20 100644 --- a/dialects/uw/dnode.c +++ b/dialects/uw/dnode.c @@ -308,7 +308,7 @@ examine_stream(vs, q, mch, mn, sn, sqp) } if (!ab) { (void) fprintf(stderr, - "%s: no space for stream chain", Pn); + "%s: no space for stream chain", Pn); Exit(1); } } diff --git a/dialects/uw/dnode1.c b/dialects/uw/dnode1.c index 628d2be5..988f38d6 100644 --- a/dialects/uw/dnode1.c +++ b/dialects/uw/dnode1.c @@ -45,7 +45,7 @@ static char copyright[] = * length st_buffer[] element in the * stack_trace struct, defined in * */ - + #endif /* !defined(DYNAMIC_STACK_TRACE) */ #undef IFMT diff --git a/dialects/uw/dproc.c b/dialects/uw/dproc.c index 3b3875d2..c6f368f4 100644 --- a/dialects/uw/dproc.c +++ b/dialects/uw/dproc.c @@ -512,7 +512,7 @@ readfsinfo() (void) fprintf(stderr, "%s: sysfs(GETNFSTYP) error: %s\n", Pn, strerror(errno)); Exit(1); - } + } if (Fsinfomax == 0) return; if (!(Fsinfo = (char **)malloc((MALLOC_S)(Fsinfomax * sizeof(char *))))) diff --git a/dialects/uw/dsock.c b/dialects/uw/dsock.c index 10e11f4f..af9f9b76 100644 --- a/dialects/uw/dsock.c +++ b/dialects/uw/dsock.c @@ -840,7 +840,7 @@ process_socket(pr, q) } else { Lf->lts.type = 1; Lf->lts.state.i = (int)inp.inp_tstate; - } + } } else enter_nm("no address for this protocol"); } else diff --git a/dialects/uw/uw7/fs/procfs/prdata.h b/dialects/uw/uw7/fs/procfs/prdata.h index e7130b0c..405bdde8 100644 --- a/dialects/uw/uw7/fs/procfs/prdata.h +++ b/dialects/uw/uw7/fs/procfs/prdata.h @@ -17,7 +17,7 @@ extern "C" { #include /* REQUIRED */ #include /* REQUIRED */ -#elif defined(_KERNEL) +#elif defined(_KERNEL) #include /* SVR4.2COMPAT */ #include /* SVR4.0COMPAT */ @@ -37,13 +37,13 @@ extern "C" { typedef struct prcommon { lock_t prc_mutex; /* Lock for prc_flags and prc_rdwriters */ uchar_t prc_flags; /* flags */ - ulong_t prc_rdwriters; /* # holding or queued for process r/w lock + ulong_t prc_rdwriters; /* # holding or queued for process r/w lock */ sv_t prc_rdwrdone; /* sync object to wait for r/w refs done */ - sv_t prc_stopsv; /* sync object to wait for proc or LWP stop + sv_t prc_stopsv; /* sync object to wait for proc or LWP stop @@ -91,7 +91,7 @@ typedef enum prnodetype { } prnodetype_t; typedef struct prnode { - lock_t pr_mutex; /* Locks pr_flags and child + lock_t pr_mutex; /* Locks pr_flags and child pr_files */ prnodetype_t pr_type; /* Node type */ mode_t pr_mode; /* File mode */ @@ -100,9 +100,9 @@ pr_files */ prcommon_t *pr_common; /* common data structure */ prcommon_t *pr_pcommon; /* process common data structure */ struct vnode *pr_parent; /* Parent directory */ - struct vnode **pr_files; /* Contained files (for directory) + struct vnode **pr_files; /* Contained files (for directory) */ - struct vnode *pr_next; /* List in chain of (invalid) + struct vnode *pr_next; /* List in chain of (invalid) vnodes */ uint_t pr_index; /* Position within parent */ struct vnode pr_vnode; /* Embedded vnode */ @@ -125,7 +125,7 @@ typedef struct prntable { char *prn_comp; /* Name within directory */ prnodetype_t prn_ctype; /* Node type of result vnode */ int prn_zvisible; /* Visibility if a zombie */ - int prn_nasvisible; /* Visibility if no address space + int prn_nasvisible; /* Visibility if no address space */ vtype_t prn_ftype; /* File type of result vnode */ mode_t prn_mode; /* File mode of result vnode */ @@ -167,7 +167,7 @@ extern caddr_t prgetpsaddr(lwp_t *); extern void prdebugon(lwp_t *); extern void prdebugoff(lwp_t *); extern void prgetpfamily(const user_t *up, struct pfamily *fp); -extern int prwritectl_family(ulong_t, vnode_t *, uio_t *, int, cred_t +extern int prwritectl_family(ulong_t, vnode_t *, uio_t *, int, cred_t *); extern boolean_t pr_p_rdwr(prcommon_t *, boolean_t); extern void pr_v_rdwr(prcommon_t *); @@ -216,7 +216,7 @@ extern void prchlvl(lid_t); /* * Determine whether or not a set (of arbitrary size) is empty. */ -#define prisempty(sp) setisempty((ulong_t *)(sp), +#define prisempty(sp) setisempty((ulong_t *)(sp), sizeof(*(sp))/sizeof(ulong_t)) #endif /* _KERNEL */ diff --git a/dialects/uw/uw7/sys/fs/fifonode.h b/dialects/uw/uw7/sys/fs/fifonode.h index 39a68571..c54910f4 100644 --- a/dialects/uw/uw7/sys/fs/fifonode.h +++ b/dialects/uw/uw7/sys/fs/fifonode.h @@ -1,11 +1,11 @@ /* - * Copyright (c) 1998 The Santa Cruz Operation, Inc.. All Rights Reserved. - * - * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF THE - * SANTA CRUZ OPERATION INC. - * - * The copyright notice above does not evidence any actual or intended - * publication of such source code. + * Copyright (c) 1998 The Santa Cruz Operation, Inc.. All Rights Reserved. + * + * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF THE + * SANTA CRUZ OPERATION INC. + * + * The copyright notice above does not evidence any actual or intended + * publication of such source code. */ #ifndef _FS_FIFOFS_FIFONODE_H /* wrapper symbol for kernel use */ diff --git a/dialects/uw/uw7/sys/fs/namenode.h b/dialects/uw/uw7/sys/fs/namenode.h index 2c92a0a9..6dc5cfad 100644 --- a/dialects/uw/uw7/sys/fs/namenode.h +++ b/dialects/uw/uw7/sys/fs/namenode.h @@ -1,11 +1,11 @@ /* - * Copyright (c) 1998 The Santa Cruz Operation, Inc.. All Rights Reserved. - * - * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF THE - * SANTA CRUZ OPERATION INC. - * - * The copyright notice above does not evidence any actual or intended - * publication of such source code. + * Copyright (c) 1998 The Santa Cruz Operation, Inc.. All Rights Reserved. + * + * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF THE + * SANTA CRUZ OPERATION INC. + * + * The copyright notice above does not evidence any actual or intended + * publication of such source code. */ #ifndef _FS_NAMEFS_NAMENODE_H /* wrapper symbol for kernel use */ diff --git a/lib/ckkv.c b/lib/ckkv.c index 09781a11..7a4f3e02 100644 --- a/lib/ckkv.c +++ b/lib/ckkv.c @@ -56,7 +56,7 @@ ckkv(d, er, ev, ea) * test */ { -# if defined(HASKERNIDCK) +# if defined(HASKERNIDCK) struct utsname u; if (Fwarn) diff --git a/lib/dvch.c b/lib/dvch.c index f54b6800..9606c14c 100644 --- a/lib/dvch.c +++ b/lib/dvch.c @@ -421,7 +421,7 @@ dcpath(rw, npw) /* * ``%h'' converts to the home directory. */ - + case 'h': if (!p && !(p = getpwuid(Myuid))) { if (!Fwarn) @@ -520,7 +520,7 @@ dcpath(rw, npw) "%s: WARNING: ignoring environment: %s", Pn, HASPERSDCPATH); safestrprt(cp2, stderr, 1); - } + } wpp = 0; } } diff --git a/lib/rdev.c b/lib/rdev.c index e141898d..b1a3cb0b 100644 --- a/lib/rdev.c +++ b/lib/rdev.c @@ -366,7 +366,7 @@ readdev(skip) (size_t)sizeof(struct l_dev *), compdev); BNdev = rmdupdev(&BSdev, BNdev, "block"); } - + # if !defined(NOWARNBLKDEV) else { if (!Fwarn) diff --git a/lib/regex.c b/lib/regex.c index 88e959d0..bb83c1cf 100644 --- a/lib/regex.c +++ b/lib/regex.c @@ -235,7 +235,7 @@ char *realloc (); #ifndef MB_LEN_MAX # define MB_LEN_MAX 1 #endif - + /* Get the interface, including the syntax bits. */ /* Disabled by V. Abell on January 29, 2001: #include */ #include "../regex.h" @@ -306,7 +306,7 @@ char *realloc (); /* As in Harbison and Steele. */ # define SIGN_EXTEND_CHAR(c) ((((unsigned char) (c)) ^ 128) - 128) #endif - + #ifndef emacs /* How many characters in the character set. */ # define CHAR_SET_SIZE 256 @@ -343,7 +343,7 @@ init_syntax_once () # define SYNTAX(c) re_syntax_table[(unsigned char) (c)] #endif /* emacs */ - + /* Should we use malloc or alloca? If REGEX_MALLOC is not defined, we use `alloca' instead of `malloc'. This is because using malloc in re_search* or re_match* could cause memory leaks when C-g is used in @@ -452,7 +452,7 @@ static int re_match_2_internal PARAMS ((struct re_pattern_buffer *bufp, int pos, struct re_registers *regs, int stop)); - + /* These are the command codes that appear in compiled regular expressions. Some opcodes are followed by argument bytes. A command code can specify any interpretation whatsoever for its @@ -591,7 +591,7 @@ typedef enum notsyntaxspec #endif /* emacs */ } re_opcode_t; - + /* Common operations on the compiled pattern. */ /* Store NUMBER in two contiguous bytes starting at DESTINATION. */ @@ -668,7 +668,7 @@ extract_number_and_incr (destination, source) # endif /* not EXTRACT_MACROS */ #endif /* DEBUG */ - + /* If DEBUG is defined, Regex prints many voluminous messages about what it is doing (if the variable `debug' is nonzero). If linked with the main program in `iregex.c', you can enter patterns and strings @@ -1092,7 +1092,7 @@ printchar (c) # define DEBUG_PRINT_DOUBLE_STRING(w, s1, sz1, s2, sz2) #endif /* not DEBUG */ - + /* Set by `re_set_syntax' to the current regexp syntax to recognize. Can also be assigned to arbitrarily: each pattern buffer stores its own syntax, so it can be changed between regex compilations. */ @@ -1126,7 +1126,7 @@ re_set_syntax (syntax) #ifdef _LIBC weak_alias (__re_set_syntax, re_set_syntax) #endif - + /* This table gives an error message for each of the error codes listed in regex.h. Obviously the order here has to be same as there. POSIX doesn't require that we do anything for REG_NOERROR, @@ -1206,7 +1206,7 @@ static const size_t re_error_msgid_idx[] = REG_ESIZE_IDX, REG_ERPAREN_IDX }; - + /* Avoiding alloca during matching, to placate r_alloc. */ /* Define MATCH_MAY_ALLOCATE unless we need to make sure that the @@ -1244,7 +1244,7 @@ static const size_t re_error_msgid_idx[] = # undef MATCH_MAY_ALLOCATE #endif - + /* Failure stack declarations and macros; both re_compile_fastmap and re_match_2 use a failure stack. These have to be macros because of REGEX_ALLOCATE_STACK. */ @@ -1610,7 +1610,7 @@ typedef struct } /* POP_FAILURE_POINT */ - + /* Structure for per-register (a.k.a. per-group) information. Other register information, such as the starting and ending positions (which are addresses), and the list of @@ -1670,7 +1670,7 @@ typedef union static char reg_unset_dummy; #define REG_UNSET_VALUE (®_unset_dummy) #define REG_UNSET(e) ((e) == REG_UNSET_VALUE) - + /* Subroutine declarations and macros for regex_compile. */ static reg_errcode_t regex_compile _RE_ARGS ((const char *pattern, size_t size, @@ -1947,7 +1947,7 @@ typedef struct || STREQ (string, "punct") || STREQ (string, "graph") \ || STREQ (string, "cntrl") || STREQ (string, "blank")) #endif - + #ifndef MATCH_MAY_ALLOCATE /* If we cannot allocate large objects within re_match_2_internal, @@ -1995,7 +1995,7 @@ regex_grow_registers (num_regs) } #endif /* not MATCH_MAY_ALLOCATE */ - + static boolean group_in_compile_stack _RE_ARGS ((compile_stack_type compile_stack, regnum_t regnum)); @@ -3417,7 +3417,7 @@ regex_compile (pattern, size, syntax, bufp) return REG_NOERROR; } /* regex_compile */ - + /* Subroutines for `regex_compile'. */ /* Store OP at LOC followed by two-byte integer parameter ARG. */ @@ -3619,7 +3619,7 @@ compile_range (range_start_char, p_ptr, pend, translate, syntax, b) return ret; } - + /* re_compile_fastmap computes a ``fastmap'' for the compiled pattern in BUFP. A fastmap records which of the (1 << BYTEWIDTH) possible characters can start a string that matches the pattern. This fastmap @@ -3925,7 +3925,7 @@ re_compile_fastmap (bufp) #ifdef _LIBC weak_alias (__re_compile_fastmap, re_compile_fastmap) #endif - + /* Set REGS to hold NUM_REGS registers, storing them in STARTS and ENDS. Subsequent matches using PATTERN_BUFFER and REGS will use this memory for recording register information. STARTS and ENDS @@ -3963,7 +3963,7 @@ re_set_registers (bufp, regs, num_regs, starts, ends) #ifdef _LIBC weak_alias (__re_set_registers, re_set_registers) #endif - + /* Searching routines. */ /* Like re_search_2, below, but only one string is specified, and @@ -4145,7 +4145,7 @@ re_search_2 (bufp, string1, size1, string2, size2, startpos, range, regs, stop) #ifdef _LIBC weak_alias (__re_search_2, re_search_2) #endif - + /* This converts PTR, a pointer into one of the search strings `string1' and `string2' into an offset from the beginning of that string. */ #define POINTER_TO_OFFSET(ptr) \ @@ -4224,7 +4224,7 @@ weak_alias (__re_search_2, re_search_2) to actually save any registers when none are active. */ #define NO_HIGHEST_ACTIVE_REG (1 << BYTEWIDTH) #define NO_LOWEST_ACTIVE_REG (NO_HIGHEST_ACTIVE_REG + 1) - + /* Matching routines. */ #ifndef emacs /* Emacs never uses this. */ @@ -5678,7 +5678,7 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop) return -1; /* Failure to match. */ } /* re_match_2 */ - + /* Subroutine definitions for re_match_2. */ @@ -5941,7 +5941,7 @@ bcmp_translate (s1, s2, len, translate) } return 0; } - + /* Entry points for GNU code. */ /* re_compile_pattern is the GNU regular expression compiler: it @@ -5982,7 +5982,7 @@ re_compile_pattern (pattern, length, bufp) #ifdef _LIBC weak_alias (__re_compile_pattern, re_compile_pattern) #endif - + /* Entry points compatible with 4.2 BSD regex library. We don't define them unless specifically requested. */ @@ -6053,7 +6053,7 @@ re_exec (s) } #endif /* _REGEX_RE_COMP */ - + /* POSIX.2 functions. Don't define these for Emacs. */ #ifndef emacs diff --git a/lib/rmnt.c b/lib/rmnt.c index 05942c30..9003cdf6 100644 --- a/lib/rmnt.c +++ b/lib/rmnt.c @@ -64,7 +64,7 @@ static char copyright[] = * containing an integer file system type, and MOUNTS_STAT_FSTYPE to * specify the member name of the integer in the local mounts structure * where RMNT_STAT_FSTYPE is to be copied. - * + * */ #if !defined(RMNT_EXPDEV) diff --git a/lib/rnch.c b/lib/rnch.c index 7d7c479e..d189371a 100644 --- a/lib/rnch.c +++ b/lib/rnch.c @@ -710,7 +710,7 @@ ncache_load() # else /* !defined(NCACHE_NODEID) */ lc->pa = ncache_addr(lc->dp); # endif /* defined(NCACHE_NODEID) */ - + } } diff --git a/lib/snpf.c b/lib/snpf.c index c20b91f9..2854ed83 100644 --- a/lib/snpf.c +++ b/lib/snpf.c @@ -336,7 +336,7 @@ dopr(bp, ep, fmt, args) else len = (len * 10) + (int)(ch - '0'); goto nextch; - case '*': + case '*': if (pointflag) maxwidth = va_arg(args, int); else @@ -546,7 +546,7 @@ fmtllnum(bp, ep, value, base, dosign, ljust, len, zpad) base = -base; } do { - convert[place++] = + convert[place++] = (caps ? "0123456789ABCDEF" : "0123456789abcdef") [uvalue % (unsigned)base]; uvalue = (uvalue / (unsigned)base); @@ -555,7 +555,7 @@ fmtllnum(bp, ep, value, base, dosign, ljust, len, zpad) padlen = len - place; if (padlen < 0) padlen = 0; - if(ljust) + if (ljust) padlen = -padlen; if (zpad && padlen > 0) { if (signvalue) { @@ -618,7 +618,7 @@ fmtnum(bp, ep, value, base, dosign, ljust, len, zpad) base = -base; } do { - convert[place++] = + convert[place++] = (caps ? "0123456789ABCDEF" : "0123456789abcdef") [uvalue % (unsigned)base]; uvalue = (uvalue / (unsigned)base); diff --git a/lsof.h b/lsof.h index 15e9c502..abfb4731 100644 --- a/lsof.h +++ b/lsof.h @@ -616,7 +616,7 @@ struct int_lst { typedef struct lsof_rx { /* regular expression table entry */ char *exp; /* original regular expression */ regex_t cx; /* compiled expression */ - int mc; /* match count */ + int mc; /* match count */ } lsof_rx_t; extern lsof_rx_t *CmdRx; extern int NCmdRxU; @@ -655,7 +655,7 @@ extern struct str_lst *Cmdl; extern int CmdLim; extern int Cmdni; extern int Cmdnx; - + # if defined(HASSELINUX) typedef struct cntxlist { char *cntx; /* zone name */ @@ -928,7 +928,7 @@ extern struct lfile *Lf, *Plf; struct lproc { char *cmd; /* command name */ - + # if defined(HASSELINUX) char *cntx; /* security context */ # endif /* defined(HASSELINUX) */ diff --git a/lsof_fields.h b/lsof_fields.h index 85f9d3cd..8275f953 100644 --- a/lsof_fields.h +++ b/lsof_fields.h @@ -48,7 +48,7 @@ * * A field is displayed in the form: * - * + * * Output fields are normally terminated with a NL ('\n'), but the field * terminator can be set to NUL with the -0 (zero) option to lsof. * diff --git a/main.c b/main.c index e58aa1ad..da66659b 100644 --- a/main.c +++ b/main.c @@ -235,7 +235,7 @@ main(argc, argv) #else /* !defined(HASZONES) */ "", #endif /* defined(HASZONES) */ - + #if defined(HASSELINUX) "Z:" #else /* !defined(HASSELINUX) */ @@ -477,7 +477,7 @@ main(argc, argv) || FieldSel[i].id == LSOF_FID_NI) continue; #endif /* !defined(HASFSTRUCT) */ - + #if defined(HASSELINUX) if ((FieldSel[i].id == LSOF_FID_CNTX) && !CntxStatus) continue; @@ -1001,7 +1001,7 @@ main(argc, argv) } break; #endif /* defined(HASZONES) */ - + #if defined(HASSELINUX) case 'Z': if (!CntxStatus) { @@ -1176,7 +1176,7 @@ main(argc, argv) */ if ((Cmdl && Cmdni) || CmdRx) Selflags |= SELCMD; - + #if defined(HASSELINUX) if (CntxArg) Selflags |= SELCNTX; @@ -1215,7 +1215,7 @@ main(argc, argv) Selflags = SelAll; } else { if (GOx1 >= argc && (Selflags & (SELNA|SELNET)) != 0 - && (Selflags & ~(SELNA|SELNET)) == 0) + && (Selflags & ~(SELNA|SELNET)) == 0) Selinet = 1; AllProc = 0; } @@ -1589,7 +1589,7 @@ main(argc, argv) } } for (i = 0; i < NCmdRxU; i++) { - + /* * Check command regular expressions. */ @@ -1778,7 +1778,7 @@ main(argc, argv) } } #endif /* defined(HASZONES) */ - + #if defined(HASSELINUX) if (CntxArg) { @@ -1928,7 +1928,7 @@ GetOpt(ct, opt, rules, err) * option following the possible value, so that the next call * to GetOpt() will find it. */ - if(opt[GOx1][GOx2 + 1] != '\0') { + if (opt[GOx1][GOx2 + 1] != '\0') { GObk[0] = GOx1; GObk[1] = ++GOx2; GOv = &opt[GOx1++][GOx2]; diff --git a/misc.c b/misc.c index bebaac6d..bfa6a731 100644 --- a/misc.c +++ b/misc.c @@ -1044,7 +1044,7 @@ lstatsafely(path, buf) struct stat *buf; /* stat buffer address */ { if (Fblock) { - if (!Fwarn) + if (!Fwarn) (void) fprintf(stderr, "%s: avoiding stat(%s): -b was specified.\n", Pn, path); @@ -1584,7 +1584,7 @@ statsafely(path, buf) struct stat *buf; /* stat buffer address */ { if (Fblock) { - if (!Fwarn) + if (!Fwarn) (void) fprintf(stderr, "%s: avoiding stat(%s): -b was specified.\n", Pn, path); diff --git a/print.c b/print.c index 45fb550c..4d6905c8 100644 --- a/print.c +++ b/print.c @@ -211,7 +211,7 @@ fill_portmap() * and UDP members. */ for (; p; p = p->pml_next) { - + /* * Determine the port map entry's protocol; ignore all but TCP and UDP. */ @@ -909,7 +909,7 @@ print_file() FsColW = len; } else (void) printf(" %*.*s", FsColW, FsColW, cp); - + } # endif /* !defined(HASNOFSADDR) */ @@ -1998,7 +1998,7 @@ printiproto(p) } if (s) (void) snpf(Lf->iproto, sizeof(Lf->iproto), "%.*s", IPROTOL-1, s); - else { + else { if (m < 0) { for (i = 0, m = 1; i < IPROTOL-2; i++) m *= 10; @@ -2130,7 +2130,7 @@ printname(nl) NcacheReload = 0; } if ((cp = ncache_lookup(buf, sizeof(buf), &fp))) { - char *cp1; + char *cp1; if (*cp == '\0') goto print_nma; @@ -2770,13 +2770,13 @@ printunkaf(fam, ty) #endif /* defined(pseudo_AF_KEY) */ #if defined(AF_KEY) /* Security Association DB socket */ - case AF_KEY: + case AF_KEY: s = "KEY"; break; #endif /* defined(AF_KEY) */ #if defined(AF_NCA) /* NCA socket */ - case AF_NCA: + case AF_NCA: s = "NCA"; break; #endif /* defined(AF_NCA) */ @@ -2788,7 +2788,7 @@ printunkaf(fam, ty) #endif /* defined(AF_POLICY) */ #if defined(AF_PPP) /* PPP socket */ - case AF_PPP: + case AF_PPP: s = "PPP"; break; #endif /* defined(AF_PPP) */ diff --git a/proc.c b/proc.c index 682183b1..f47cef3d 100644 --- a/proc.c +++ b/proc.c @@ -343,7 +343,7 @@ alloc_lproc(pid, pgid, ppid, uid, cmd, pss, sf) */ Lp->zn = (char *)NULL; #endif /* defined(HASZONES) */ - + #if defined(HASSELINUX) /* * Clear the security context pointer. The dialect's own code will @@ -613,7 +613,7 @@ is_cmd_excl(cmd, pss, sf) /* * The command is not excluded if no command selection was requested, * or if its name matches any -c specification. - * + * */ if ((Selflags & SELCMD) == 0) return(0); @@ -1016,7 +1016,7 @@ process_pinfo(f) */ { pxinfo_t *pp; /* previous pipe info */ - + if (!FeptE) return; for (Lf = Lp->file; Lf; Lf = Lf->next) { @@ -1454,7 +1454,7 @@ print_proc() if (FieldSel[LSOF_FIX_ZONE].st && Fzone && Lp->zn) (void) printf("%c%s%c", LSOF_FID_ZONE, Lp->zn, Terminator); #endif /* defined(HASZONES) */ - + #if defined(HASSELINUX) if (FieldSel[LSOF_FIX_CNTX].st && Fcntx && Lp->cntx && CntxStatus) (void) printf("%c%s%c", LSOF_FID_CNTX, Lp->cntx, Terminator); diff --git a/regex.h b/regex.h index d1b41a80..27bb8e56 100644 --- a/regex.h +++ b/regex.h @@ -219,7 +219,7 @@ typedef unsigned long int reg_syntax_t; stored in the pattern buffer, so changing this does not affect already-compiled regexps. */ extern reg_syntax_t re_syntax_options; - + /* Define combinations of the above bits for the standard possibilities. (The [[[ comments delimit what gets put into the Texinfo file, so don't delete them!) */ @@ -288,7 +288,7 @@ extern reg_syntax_t re_syntax_options; | RE_NO_BK_PARENS | RE_NO_BK_REFS \ | RE_NO_BK_VBAR | RE_UNMATCHED_RIGHT_PAREN_ORD) /* [[[end syntaxes]]] */ - + /* Maximum number of duplicates an interval can allow. Some systems (erroneously) define this in other header files, but we want our value, so remove any previous define. */ @@ -363,7 +363,7 @@ typedef enum REG_ESIZE, /* Compiled pattern bigger than 2^16 bytes. */ REG_ERPAREN /* Unmatched ) or \); not returned from regcomp. */ } reg_errcode_t; - + /* This data structure represents a compiled pattern. Before calling the pattern compiler, the fields `buffer', `allocated', `fastmap', `translate', and `no_sub' can be set. After the pattern has been @@ -443,7 +443,7 @@ struct re_pattern_buffer }; typedef struct re_pattern_buffer regex_t; - + /* Type for byte offsets within the string. POSIX mandates this. */ typedef int regoff_t; @@ -474,7 +474,7 @@ typedef struct regoff_t rm_so; /* Byte offset from string's start to substring's start. */ regoff_t rm_eo; /* Byte offset from string's start to substring's end. */ } regmatch_t; - + /* Declarations for routines. */ /* To avoid duplicating every routine declaration -- once with a @@ -603,7 +603,7 @@ extern void regfree _RE_ARGS ((regex_t *__preg)); #endif /* C++ */ #endif /* regex.h */ - + /* Local variables: make-backup-files: t diff --git a/scripts/big_brother.pl b/scripts/big_brother.pl index 7114097d..8a197575 100755 --- a/scripts/big_brother.pl +++ b/scripts/big_brother.pl @@ -188,7 +188,7 @@ sub timestamp { # $path = absolute or relative path to file to test for executabiity. # Paths that begin with neither '/' nor '.' that arent't found as # simple references are also tested with the path prefixes of the -# PATH environment variable. +# PATH environment variable. sub isexec { diff --git a/scripts/count_pf.pl b/scripts/count_pf.pl index c8f45bc0..fc0299cd 100755 --- a/scripts/count_pf.pl +++ b/scripts/count_pf.pl @@ -72,7 +72,7 @@ # $path = absolute or relative path to file to test for executabiity. # Paths that begin with neither '/' nor '.' that arent't found as # simple references are also tested with the path prefixes of the -# PATH environment variable. +# PATH environment variable. sub isexec { diff --git a/scripts/identd.pl b/scripts/identd.pl index db9faa43..20661fb8 100755 --- a/scripts/identd.pl +++ b/scripts/identd.pl @@ -3,7 +3,7 @@ # identd.pl : An implementation of RFC 1413 Ident Server # using Vic Abell's lsof. # -# - Started from inetd with 'nowait' option. This entry in +# - Started from inetd with 'nowait' option. This entry in # /etc/inetd.conf will suffice : # # ident stream tcp nowait root /usr/local/bin/identd.pl -t200 @@ -108,7 +108,7 @@ # $path = absolute or relative path to file to test for executabiity. # Paths that begin with neither '/' nor '.' that arent't found as # simple references are also tested with the path prefixes of the -# PATH environment variable. +# PATH environment variable. sub isexec { diff --git a/scripts/idrlogin.pl b/scripts/idrlogin.pl index dd330a93..ab1c3e4f 100755 --- a/scripts/idrlogin.pl +++ b/scripts/idrlogin.pl @@ -1,7 +1,7 @@ #!/usr/bin/perl # # idrlogin.pl -- sample Perl 5 script to identify the network source of a -# network (remote) login via rlogind, sshd, or telnetd +# network (remote) login via rlogind, sshd, or telnetd # IMPORTANT DEFINITIONS @@ -173,7 +173,7 @@ sub save_proc { # $path = absolute or relative path to file to test for executabiity. # Paths that begin with neither '/' nor '.' that arent't found as # simple references are also tested with the path prefixes of the -# PATH environment variable. +# PATH environment variable. sub isexec { diff --git a/scripts/shared.pl b/scripts/shared.pl index 616ace76..25840f0c 100755 --- a/scripts/shared.pl +++ b/scripts/shared.pl @@ -385,7 +385,7 @@ sub Sort_by_PID_and_FD { # $path = absolute or relative path to file to test for executabiity. # Paths that begin with neither '/' nor '.' that arent't found as # simple references are also tested with the path prefixes of the -# PATH environment variable. +# PATH environment variable. sub isexec { diff --git a/scripts/sort_res.pl b/scripts/sort_res.pl index 381e17bd..374dcda4 100755 --- a/scripts/sort_res.pl +++ b/scripts/sort_res.pl @@ -18,7 +18,7 @@ # distribution in the file COPYING); if not, write to the Free Software # Foundation,Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # -# Note : +# Note : # -This script uses lsof released by Victor A. Abell # -lsof path recovery comes from standard perl scripts in there. # @@ -26,7 +26,7 @@ # perl sort_res.pl -> display used resources + size # or perl sort_res.pl # -# 12/2005 (FabF) +# 12/2005 (FabF) # -size reset in loop (script was broken in 4.76) # -isexec looking in .. (like other scripts) # -display for one or all processes @@ -48,11 +48,11 @@ if ($ARGV[0] ne ""){ $cmd="$LSOF -nPl -Fcns -c".$ARGV[0]."|"; }else{ - $cmd="$LSOF -nPl -Fcns|"; + $cmd="$LSOF -nPl -Fcns|"; } #Parse lsof output to gather command, resource name, pid and size -#Some extradata stand to keep script genericity +#Some extradata stand to keep script genericity $i=0; if (open(FILE, $cmd)){ while (defined ($line=)){ @@ -93,7 +93,7 @@ $dgroup{$i} = { name => $data{$k}{name}, size => $data{$k}{size}}; $cname = $data{$k}{name}; $i++; - } + } } #Size sort on resource hash @@ -112,7 +112,7 @@ # $path = absolute or relative path to file to test for executabiity. # Paths that begin with neither '/' nor '.' that arent't found as # simple references are also tested with the path prefixes of the -# PATH environment variable. +# PATH environment variable. sub isexec { diff --git a/scripts/watch_a_file.pl b/scripts/watch_a_file.pl index 74d1d597..095c8215 100755 --- a/scripts/watch_a_file.pl +++ b/scripts/watch_a_file.pl @@ -72,7 +72,7 @@ # $path = absolute or relative path to file to test for executabiity. # Paths that begin with neither '/' nor '.' that arent't found as # simple references are also tested with the path prefixes of the -# PATH environment variable. +# PATH environment variable. sub isexec { diff --git a/store.c b/store.c index 41c995ec..4111a730 100644 --- a/store.c +++ b/store.c @@ -357,7 +357,7 @@ int TaskCmdLim = TASKCMDL; /* TASKCMD column width limit (same as * CmdLim) */ int TaskPrtCmd = 0; /* task print task command flag */ int TaskPrtTid = 0; /* task print TID flag */ -int TcpStAlloc = 0; /* allocated (possibly unused) entries in TCP +int TcpStAlloc = 0; /* allocated (possibly unused) entries in TCP * state tables */ unsigned char *TcpStI = (unsigned char *)NULL; /* included TCP states */ @@ -376,7 +376,7 @@ char Terminator = '\n'; /* output field terminator */ int TaskTidColW = 0; /* task TID column width */ int TmLimit = TMLIMIT; /* Readlink() and stat() timeout (seconds) */ int TypeColW; /* TYPE column width */ -int UdpStAlloc = 0; /* allocated (possibly unused) entries in UDP +int UdpStAlloc = 0; /* allocated (possibly unused) entries in UDP * state tables */ unsigned char *UdpStI = (unsigned char *)NULL; /* included UDP states */ diff --git a/support/GitHub-release/ITaP b/support/GitHub-release/ITaP index e3026c4a..0a115b4e 100644 --- a/support/GitHub-release/ITaP +++ b/support/GitHub-release/ITaP @@ -1,47 +1,47 @@ -From: McCartney, William G -Sent: Wednesday, June 27, 2018 16:35 -To: Victor Abell -Cc: Vic Abell -Subject: RE: retiring lsof - -No objection at all Vic, and thank you for so many years of valuable service to the community. - -From one my senior people: “Lsof is one of the most amazing UNIX tools that retired PUCC -wizard Vic wrote and still supports. Github is a much better answer than running a server in -ITaP for it.” - -Best wishes, Gerry- - -From: Victor Abell -Sent: Wednesday, June 27, 2018 5:06 AM -To: McCartney, William G -Cc: Vic Abell -Subject: retiring lsof - -Gerry, - -Since I retired from ITaP in 2003, I have received support from ITaP -to continue distributing lsof, the open source UNIX tool that I developed -at PUCC and released in 1994. That support extends to a Visiting -Scholar appointment and a Sun Solaris system, lsof.itap.purdue.edu -from which lsof is distributed. - -I am nearing 80 in age and it is time for me to end my support before -circumstances do it for me. I announced that intention to the lsof –l -mailing list (lsof-l@lists.purdue.edu) and several readers replied that -they would like to continue support by moving lsof to the GitHub -open source development platform (https://github.com/). - -Because the lsof source code contains a Purdue Research Foundation -copyright, I have been discussing the release with Joseph R. Kasper -(JRKasper@prf.org) in Purdue’s Office of Technology Commercialization. -Joe is supportive of the move, but asks if I have discussed it with anyone -in ITaP. Only Greg Veldman (gv@purdue.edu) , who has provided -support for lsof.itap, has been aware of the GitHub request. -I have been remiss in not contacting you about this. Please excuse my -omission and let me know if you have any objection to the release of -lsof to GitHub. - -Regards, - -Vic Abell +From: McCartney, William G +Sent: Wednesday, June 27, 2018 16:35 +To: Victor Abell +Cc: Vic Abell +Subject: RE: retiring lsof + +No objection at all Vic, and thank you for so many years of valuable service to the community. + +From one my senior people: “Lsof is one of the most amazing UNIX tools that retired PUCC +wizard Vic wrote and still supports. Github is a much better answer than running a server in +ITaP for it.” + +Best wishes, Gerry- + +From: Victor Abell +Sent: Wednesday, June 27, 2018 5:06 AM +To: McCartney, William G +Cc: Vic Abell +Subject: retiring lsof + +Gerry, + +Since I retired from ITaP in 2003, I have received support from ITaP +to continue distributing lsof, the open source UNIX tool that I developed +at PUCC and released in 1994. That support extends to a Visiting +Scholar appointment and a Sun Solaris system, lsof.itap.purdue.edu +from which lsof is distributed. + +I am nearing 80 in age and it is time for me to end my support before +circumstances do it for me. I announced that intention to the lsof –l +mailing list (lsof-l@lists.purdue.edu) and several readers replied that +they would like to continue support by moving lsof to the GitHub +open source development platform (https://github.com/). + +Because the lsof source code contains a Purdue Research Foundation +copyright, I have been discussing the release with Joseph R. Kasper +(JRKasper@prf.org) in Purdue’s Office of Technology Commercialization. +Joe is supportive of the move, but asks if I have discussed it with anyone +in ITaP. Only Greg Veldman (gv@purdue.edu) , who has provided +support for lsof.itap, has been aware of the GitHub request. +I have been remiss in not contacting you about this. Please excuse my +omission and let me know if you have any objection to the release of +lsof to GitHub. + +Regards, + +Vic Abell diff --git a/support/GitHub-release/Purdue b/support/GitHub-release/Purdue index 872be726..d7fd3609 100644 --- a/support/GitHub-release/Purdue +++ b/support/GitHub-release/Purdue @@ -1,157 +1,156 @@ -From: Sandel, Ken L. -Sent: Tuesday, July 10, 2018 14:28 -To: Victor Abell -Subject: RE: One more question regarding GitHub release - -Vic, - -For clarity – I approved the release. - -Ken - -Ken L. Sandel -Senior Director, Sponsored Program Services -Senior Intellectual Property Officer -Purdue University -610 Purdue Mall -Hovde Hall Room 328 -West Lafayette, IN 47907 -sandel@purdue.edu -(765) 494-1063 (office) -(765) 426-2530 (cell) - -From: Kasper, Joseph R. -Sent: Tuesday, July 10, 2018 11:23 AM -To: Victor Abell -Cc: Sandel, Ken L. -Subject: RE: One more question regarding GitHub release - -Hi Vic, - -My apologies for not following up. Mr. Sandel approves the release on GitHub under the copyright -notice text currently in use. - -Best, -Joe - -Joseph R. Kasper, Ph.D. -Senior Business Development Manager & Director of Marketing -Office of Technology Commercialization -765-588-3486 -jrkasper@prf.org -Purdue Technology Center Aerospace -1801 Newman Road -West Lafayette, IN 47906 -www.innovation-entrepreneurship-purdue.com -www.prf.org/otc/ - - -CONFIDENTIALITY NOTICE: This email and any attachments are for the exclusive and confidential use of the intended recipient. If you are not -the intended recipient, please do not read, distribute or take action in reliance upon this message. If you have received this in error, please -notify us immediately by return email and promptly delete this message and its attachments from your computer system. - - - - -From: Victor Abell -Sent: Monday, July 9, 2018 8:26 PM -To: Kasper, Joseph R. -Subject: RE: One more question regarding GitHub release - -Joe, - -Has there been any word from Ken about the release -of lsof to GitHub? - -Vic - -From: Kasper, Joseph R. [mailto:JRKasper@prf.org] -Sent: Thursday, June 28, 2018 1:15 PM -To: Victor Abell -Subject: RE: One more question regarding GitHub release - -Hi Vic, - -One more request. Ken would like a copy of the email from Gerry. If for any reason you aren’t -comfortable sending it to me, please contact Ken directly (765-494-1063, sandel@purdue.edu). - -If this last piece of information is satisfactory to Ken, I expect to get his approval. - -Thanks for your cooperation throughout this process. - -Best, -Joe - -From: Victor Abell -Sent: Thursday, June 28, 2018 7:43 AM -To: Kasper, Joseph R. -Subject: RE: One more question regarding GitHub release - -Joe, - -I sent e-mail to Gerry McCartney and in his answer he -says he has no objection. - -Vic - -From: Kasper, Joseph R. [mailto:JRKasper@prf.org] -Sent: Tuesday, June 26, 2018 4:03 PM -To: Victor Abell -Subject: RE: One more question regarding GitHub release - -Hi Vic, - -Thanks for the extra detail. I think it would put Ken’s mind at ease if you have Gerry’s blessing. Let me -know if you’ll reach out to him. - -Best, -Joe - -From: Victor Abell -Sent: Tuesday, June 26, 2018 3:57 PM -To: Kasper, Joseph R. -Subject: RE: One more question regarding GitHub release - -Joe, - -I have had no communication with ITaP about the move to GitHub. -The extent of their involvement with lsof has been minimal – the -Visiting Scholar appointment and the maintenance of a distribution -system. - -I know Gerry McCartney well. Would it be helpful if I contacted -him about the GitHub move? - -Vic - -From: Kasper, Joseph R. [mailto:JRKasper@prf.org] -Sent: Tuesday, June 26, 2018 3:44 PM -To: Vic Abell; Victor Abell -Subject: One more question regarding GitHub release - -Hi Vic, - -Ken Sandel, Senior IP Officer, just got back to me. He wants to know if the leadership of ITaP supports -the contribution to Github. Please let me know. If you have any communication to this effect that you -can forward to me, it would be helpful. - -Best, -Joe - -Joseph R. Kasper, Ph.D. -Business Development Manager -Purdue Research Foundation -Office of Technology Commercialization -765-588-3486 -jrkasper@prf.org -Purdue Technology Center Aerospace -1801 Newman Road -West Lafayette, IN 47906 -www.innovation-entrepreneurship-purdue.com -www.prf.org/otc/ - - -CONFIDENTIALITY NOTICE: This email and any attachments are for the exclusive and confidential use of the intended recipient. If you are not -the intended recipient, please do not read, distribute or take action in reliance upon this message. If you have received this in error, please -notify us immediately by return email and promptly delete this message and its attachments from your computer system. - +From: Sandel, Ken L. +Sent: Tuesday, July 10, 2018 14:28 +To: Victor Abell +Subject: RE: One more question regarding GitHub release + +Vic, + +For clarity – I approved the release. + +Ken + +Ken L. Sandel +Senior Director, Sponsored Program Services +Senior Intellectual Property Officer +Purdue University +610 Purdue Mall +Hovde Hall Room 328 +West Lafayette, IN 47907 +sandel@purdue.edu +(765) 494-1063 (office) +(765) 426-2530 (cell) + +From: Kasper, Joseph R. +Sent: Tuesday, July 10, 2018 11:23 AM +To: Victor Abell +Cc: Sandel, Ken L. +Subject: RE: One more question regarding GitHub release + +Hi Vic, + +My apologies for not following up. Mr. Sandel approves the release on GitHub under the copyright +notice text currently in use. + +Best, +Joe + +Joseph R. Kasper, Ph.D. +Senior Business Development Manager & Director of Marketing +Office of Technology Commercialization +765-588-3486 +jrkasper@prf.org +Purdue Technology Center Aerospace +1801 Newman Road +West Lafayette, IN 47906 +www.innovation-entrepreneurship-purdue.com +www.prf.org/otc/ + + +CONFIDENTIALITY NOTICE: This email and any attachments are for the exclusive and confidential use of the intended recipient. If you are not +the intended recipient, please do not read, distribute or take action in reliance upon this message. If you have received this in error, please +notify us immediately by return email and promptly delete this message and its attachments from your computer system. + + + + +From: Victor Abell +Sent: Monday, July 9, 2018 8:26 PM +To: Kasper, Joseph R. +Subject: RE: One more question regarding GitHub release + +Joe, + +Has there been any word from Ken about the release +of lsof to GitHub? + +Vic + +From: Kasper, Joseph R. [mailto:JRKasper@prf.org] +Sent: Thursday, June 28, 2018 1:15 PM +To: Victor Abell +Subject: RE: One more question regarding GitHub release + +Hi Vic, + +One more request. Ken would like a copy of the email from Gerry. If for any reason you aren’t +comfortable sending it to me, please contact Ken directly (765-494-1063, sandel@purdue.edu). + +If this last piece of information is satisfactory to Ken, I expect to get his approval. + +Thanks for your cooperation throughout this process. + +Best, +Joe + +From: Victor Abell +Sent: Thursday, June 28, 2018 7:43 AM +To: Kasper, Joseph R. +Subject: RE: One more question regarding GitHub release + +Joe, + +I sent e-mail to Gerry McCartney and in his answer he +says he has no objection. + +Vic + +From: Kasper, Joseph R. [mailto:JRKasper@prf.org] +Sent: Tuesday, June 26, 2018 4:03 PM +To: Victor Abell +Subject: RE: One more question regarding GitHub release + +Hi Vic, + +Thanks for the extra detail. I think it would put Ken’s mind at ease if you have Gerry’s blessing. Let me +know if you’ll reach out to him. + +Best, +Joe + +From: Victor Abell +Sent: Tuesday, June 26, 2018 3:57 PM +To: Kasper, Joseph R. +Subject: RE: One more question regarding GitHub release + +Joe, + +I have had no communication with ITaP about the move to GitHub. +The extent of their involvement with lsof has been minimal – the +Visiting Scholar appointment and the maintenance of a distribution +system. + +I know Gerry McCartney well. Would it be helpful if I contacted +him about the GitHub move? + +Vic + +From: Kasper, Joseph R. [mailto:JRKasper@prf.org] +Sent: Tuesday, June 26, 2018 3:44 PM +To: Vic Abell; Victor Abell +Subject: One more question regarding GitHub release + +Hi Vic, + +Ken Sandel, Senior IP Officer, just got back to me. He wants to know if the leadership of ITaP supports +the contribution to Github. Please let me know. If you have any communication to this effect that you +can forward to me, it would be helpful. + +Best, +Joe + +Joseph R. Kasper, Ph.D. +Business Development Manager +Purdue Research Foundation +Office of Technology Commercialization +765-588-3486 +jrkasper@prf.org +Purdue Technology Center Aerospace +1801 Newman Road +West Lafayette, IN 47906 +www.innovation-entrepreneurship-purdue.com +www.prf.org/otc/ + + +CONFIDENTIALITY NOTICE: This email and any attachments are for the exclusive and confidential use of the intended recipient. If you are not +the intended recipient, please do not read, distribute or take action in reliance upon this message. If you have received this in error, please +notify us immediately by return email and promptly delete this message and its attachments from your computer system. diff --git a/tests/Add2TestDB b/tests/Add2TestDB index 893c8a13..015d8f9f 100755 --- a/tests/Add2TestDB +++ b/tests/Add2TestDB @@ -28,9 +28,9 @@ fi # Form a new data base line. new="" -for i in `LC_ALL=C sort < config.cflags` +for i in $(LC_ALL=C sort < config.cflags) do - w=`echo $i | sed 's/^-D//'` + w=$(echo $i | sed 's/^-D//') if test "X$new" = "X" then new=$w @@ -65,7 +65,7 @@ echo "$new" >> TestDB.new if test -d OLD then - dt=`date` + dt=$(date) dtm="========== $dt ==========" if test -r OLD/TestDB then diff --git a/tests/CkTestDB b/tests/CkTestDB index 127e3623..a63ba004 100755 --- a/tests/CkTestDB +++ b/tests/CkTestDB @@ -33,9 +33,9 @@ fi # Form a data base line. new="" -for i in `LC_ALL=C sort < config.cflags` +for i in $(LC_ALL=C sort < config.cflags) do - w=`echo $i | sed 's/^-D//'` + w=$(echo $i | sed 's/^-D//') if test "X$new" = "X" then new=$w @@ -85,7 +85,7 @@ fi # Establish echo type -- Berkeley or SYSV. -j=`echo -n ""` +j=$(echo -n "") if test "X$j" = "X-n " then EC="\c" diff --git a/tests/LTbigf.c b/tests/LTbigf.c index ed740e79..d1aa9ef1 100644 --- a/tests/LTbigf.c +++ b/tests/LTbigf.c @@ -64,7 +64,7 @@ main(argc, argv) pn++; else pn = argv[0]; - + (void) printf("%s ... %s\n", pn, LT_DONT_DO_TEST); return(0); } @@ -341,7 +341,7 @@ main(argc, argv) (void) PrtMsgX(em, Pn, cleanup, 1); /* * Construct the path. If LT_BIGSZOFF_PATH is defined in the environment, - * use it. otherwise construct a path in the CWD. + * use it. otherwise construct a path in the CWD. */ if (!(Path = LTopt_p)) { (void) snprintf(buf, sizeof(buf), "./config.LTbigf%ld", diff --git a/tests/LTlib.c b/tests/LTlib.c index c9c482f1..e04a5eff 100644 --- a/tests/LTlib.c +++ b/tests/LTlib.c @@ -73,7 +73,7 @@ static char copyright[] = * Define major and minor extraction macros that work on 64 bit AIX * architectures. */ - + #define major_S(d) (ISDEVNO64(d) ? major64(d) : minor(d & ~SDEV_REMOTE)) #define minor_S(d) (ISDEVNO64(d) ? (minor64(d) & ~SDEV_REMOTE) : minor(d)) #undef X2DEV_T @@ -95,7 +95,7 @@ static char copyright[] = #define minor_S(dev) dv_subunit(dev) #define unit_S(dev) dv_unit(dev) #define minor_X(dp, em) dv_subunit(x2dev(dp, em)) -#define unit_X(dp, em) dv_unit(x2dev(dp, em)) +#define unit_X(dp, em) dv_unit(x2dev(dp, em)) #endif /* defined(LT_DIAL_bsdi) */ @@ -413,7 +413,7 @@ ConvStatDev(dev, ldev) /* * Use the pre-defined *_S() macros to do the decomposition. */ - ldev->maj = (unsigned int)major_S(*dev); + ldev->maj = (unsigned int)major_S(*dev); ldev->min = (unsigned int)minor_S(*dev); ldev->unit = (unsigned int)unit_S(*dev); return((char *)NULL); @@ -681,7 +681,7 @@ GetOpt(ct, opt, rules, em, pn) * value belongs to the option, position to the option following the * possible value, so that the next call to GetOpt() will find it. */ - if(opt[GOx1][GOx2 + 1] != '\0') { + if (opt[GOx1][GOx2 + 1] != '\0') { GOv = &opt[GOx1++][GOx2]; } else if (++GOx1 >= ct) GOv = (char *)NULL; diff --git a/tests/LTlock.c b/tests/LTlock.c index 04bf6496..b0306302 100644 --- a/tests/LTlock.c +++ b/tests/LTlock.c @@ -424,7 +424,7 @@ cleanup() } -/* +/* * lkfile() -- lock the test file */ @@ -626,7 +626,7 @@ tstwlsof(opt, xlk) ti = -1; break; } - ti = (ti * 10) + (int)*tcp - (int)'0'; + ti = (ti * 10) + (int)*tcp - (int)'0'; } if (Fd != ti) break; diff --git a/tests/LTnfs.c b/tests/LTnfs.c index 1d20b1b9..d5019a31 100644 --- a/tests/LTnfs.c +++ b/tests/LTnfs.c @@ -407,7 +407,7 @@ FindNFSfile(ff, szbuf) ti = -1; break; } - ti = (ti * 10) + (int)*tcp - (int)'0'; + ti = (ti * 10) + (int)*tcp - (int)'0'; } if (Fd != ti) break; diff --git a/tests/LTnlink.c b/tests/LTnlink.c index 8fa39e9a..be513731 100644 --- a/tests/LTnlink.c +++ b/tests/LTnlink.c @@ -449,7 +449,7 @@ FindFile(opt, ff, ie, tfdc, ibuf, xlnk, szbuf) ti = -1; break; } - ti = (ti * 10) + (int)*tcp - (int)'0'; + ti = (ti * 10) + (int)*tcp - (int)'0'; } if (Fd != ti) break; diff --git a/tests/LTszoff.c b/tests/LTszoff.c index 419dd3fb..9de433dd 100644 --- a/tests/LTszoff.c +++ b/tests/LTszoff.c @@ -423,7 +423,7 @@ testlsof(tt, opt, xval) ti = -1; break; } - ti = (ti * 10) + (int)*tcp - (int)'0'; + ti = (ti * 10) + (int)*tcp - (int)'0'; } if (Fd != ti) break; diff --git a/tests/LTunix.c b/tests/LTunix.c index 6e12c33a..2c95f4d8 100644 --- a/tests/LTunix.c +++ b/tests/LTunix.c @@ -299,7 +299,7 @@ FindUsocks() ti = -1; break; } - ti = (ti * 10) + (int)*tcp - (int)'0'; + ti = (ti * 10) + (int)*tcp - (int)'0'; } for (tj = 0; tj < 2; tj++) { if (ff[tj]) diff --git a/tests/Makefile b/tests/Makefile index 2923bb88..64efe18b 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -19,7 +19,7 @@ LIBOBJ= ${LTOBJ} BASTST= LTbasic STDTST= LTnlink LTsock LTszoff LTunix -OPTTST= LTbigf LTdnlc LTlock LTnfs +OPTTST= LTbigf LTdnlc LTlock LTnfs all: ${CKTSTDB} ${BASTST} ${STDTST} FRC @./${CKTSTDB}; xv=$$?; \ diff --git a/usage.c b/usage.c index f5853bd8..0511f99c 100644 --- a/usage.c +++ b/usage.c @@ -892,7 +892,7 @@ usage(xv, fh, version) if (FieldSel[i].id == LSOF_FID_ZONE) continue; #endif /* !defined(HASZONES) */ - + #if defined(HASSELINUX) if ((FieldSel[i].id == LSOF_FID_CNTX) && !CntxStatus) continue; diff --git a/zipme b/zipme index 33faade9..22fac321 100755 --- a/zipme +++ b/zipme @@ -3,7 +3,7 @@ # zipme -- make a bzip2'd tar archive of ~/src/lsof4 cd $HOME/src/lsof4 -V=`sed '/VN/s/.ds VN \(.*\)/\1/' $HOME/src/lsof4/version` +V=$(sed '/VN/s/.ds VN \(.*\)/\1/' $HOME/src/lsof4/version) if test $? -ne 0 then echo $V