@@ -2019,7 +2019,7 @@ main(int argc, char **argv)
2019
2019
#if defined(HAVE_FORK ) || defined(HAVE_VFORK )
2020
2020
zflag = optarg ;
2021
2021
#else
2022
- warning ("-z ignored . Fork subprocess not implemented.\n" );
2022
+ error ("-z cannot be used . Fork subprocess not implemented.\n" );
2023
2023
#endif
2024
2024
break ;
2025
2025
@@ -2106,11 +2106,19 @@ main(int argc, char **argv)
2106
2106
}
2107
2107
2108
2108
if (ndo -> ndo_Aflag && ndo -> ndo_xflag )
2109
- warning ("-A and -x[x] are mutually exclusive. -A ignored ." );
2109
+ error ("-A and -x[x] are mutually exclusive." );
2110
2110
if (ndo -> ndo_Aflag && ndo -> ndo_Xflag )
2111
- warning ("-A and -X[X] are mutually exclusive. -A ignored ." );
2111
+ error ("-A and -X[X] are mutually exclusive." );
2112
2112
if (ndo -> ndo_xflag && ndo -> ndo_Xflag )
2113
- warning ("-x[x] and -X[X] are mutually exclusive. -x[x] ignored." );
2113
+ error ("-x[x] and -X[X] are mutually exclusive." );
2114
+ if (Cflag != 0 && WFileName == NULL )
2115
+ error ("-C cannot be used without -w.\n" );
2116
+ if (Gflag != 0 && WFileName == NULL )
2117
+ error ("-G cannot be used without -w.\n" );
2118
+ #if defined(HAVE_FORK ) || defined(HAVE_VFORK )
2119
+ if (zflag != NULL && (WFileName == NULL || (Cflag == 0 && Gflag == 0 )))
2120
+ error ("-z cannot be used without -w and (-C or -G).\n" );
2121
+ #endif
2114
2122
2115
2123
if (cnt != -1 )
2116
2124
if ((int )packets_to_skip > (INT_MAX - cnt ))
@@ -2141,7 +2149,7 @@ main(int argc, char **argv)
2141
2149
}
2142
2150
2143
2151
if (ndo -> ndo_fflag != 0 && (VFileName != NULL || RFileName != NULL ))
2144
- error ("-f can not be used with -V or -r" );
2152
+ error ("-f cannot be used with -V or -r. " );
2145
2153
2146
2154
if (VFileName != NULL && RFileName != NULL )
2147
2155
error ("-V and -r are mutually exclusive." );
0 commit comments