summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>1996-05-11 05:05:12 +0000
committerMiles Bader <miles@gnu.org>1996-05-11 05:05:12 +0000
commit830cc2ea7613de4c0693c596b38b140cc02f0c64 (patch)
treed2fad70f3b25573dbeba7ba96e2e09275295e7a2
parent73b474d7a53dd1608cf9f34bf899c36e0f42ea9e (diff)
(parse_opt): Use ARGP_ERR_UNKNOWN instead of EINVAL.
-rw-r--r--utils/devprobe.c3
-rw-r--r--utils/fsysopts.c3
-rw-r--r--utils/hurdids.c3
-rw-r--r--utils/login.c3
-rw-r--r--utils/portinfo.c11
-rw-r--r--utils/settrans.c2
-rw-r--r--utils/showtrans.c3
-rw-r--r--utils/storeinfo.c2
-rw-r--r--utils/vmstat.c5
-rw-r--r--utils/w.c3
10 files changed, 26 insertions, 12 deletions
diff --git a/utils/devprobe.c b/utils/devprobe.c
index 558ed717..e29e1e32 100644
--- a/utils/devprobe.c
+++ b/utils/devprobe.c
@@ -87,7 +87,8 @@ main (int argc, char **argv)
error (0, err, "%s", arg);
break;
- default: return EINVAL;
+ default:
+ return ARGP_ERR_UNKNOWN;
}
return 0;
}
diff --git a/utils/fsysopts.c b/utils/fsysopts.c
index 45f586cd..84b91aa5 100644
--- a/utils/fsysopts.c
+++ b/utils/fsysopts.c
@@ -76,7 +76,8 @@ main(int argc, char *argv[])
case 'R': recursive = 1; break;
case 'L': deref = 1; break;
- default: return EINVAL;
+ default:
+ return ARGP_ERR_UNKNOWN;
}
return 0;
}
diff --git a/utils/hurdids.c b/utils/hurdids.c
index c6e377a5..37fd4f7d 100644
--- a/utils/hurdids.c
+++ b/utils/hurdids.c
@@ -63,7 +63,8 @@ main(int argc, char *argv[])
case 'g': show_gids = 1; break;
case 'n': show_names = 1; break;
case 'i': show_ids = 1; break;
- default: return EINVAL;
+ default:
+ return ARGP_ERR_UNKNOWN;
}
return 0;
}
diff --git a/utils/login.c b/utils/login.c
index 8daac0bb..46ba1191 100644
--- a/utils/login.c
+++ b/utils/login.c
@@ -583,7 +583,8 @@ main(int argc, char *argv[])
}
break;
- default: return EINVAL;
+ default:
+ return ARGP_ERR_UNKNOWN;
}
return 0;
}
diff --git a/utils/portinfo.c b/utils/portinfo.c
index 5671fa1c..b4ab6cfb 100644
--- a/utils/portinfo.c
+++ b/utils/portinfo.c
@@ -39,6 +39,8 @@ static const struct argp_option options[] = {
{"verbose", 'v', 0, 0, "Give more detailed information"},
{"members", 'm', 0, 0, "Show members of port-sets"},
{"hex-names", 'x', 0, 0, "Show port names in hexadecimal"},
+ {"query-process", 'q', 0, 0, "Query the process itself for the identity of"
+ " the ports in question -- requires the process be in a sane state"},
{"hold", '*', 0, OPTION_HIDDEN},
{0,0,0,0, "Selecting which names to show:", 2},
@@ -50,6 +52,10 @@ static const struct argp_option options[] = {
{0,0,0,0, "Translating port names between tasks:", 3},
{"translate", 't', "PID", 0, "Translate port names to process PID"},
+ {"show-targets", 'h', 0, 0,
+ "Print a header describing the target process" },
+ {"no-translation-errors", 'E', 0, 0,
+ "Don't display an error if a specified port can't be translated" },
#if 0
{"search", 'a', 0, 0, "Search all processes for the given ports"},
{"target-receive", 'R', 0, 0,
@@ -135,7 +141,7 @@ main (int argc, char **argv)
case ARGP_KEY_NO_ARGS:
argp_error (state, "No process specified");
- return ED; /* Some non-EINVAL error. */
+ return EINVAL;
case ARGP_KEY_ARG:
if (state->arg_num == 0)
@@ -190,7 +196,8 @@ main (int argc, char **argv)
}
break;
- default: return EINVAL;
+ default:
+ return ARGP_ERR_UNKNOWN;
}
return 0;
}
diff --git a/utils/settrans.c b/utils/settrans.c
index cf33f0a3..4be753dc 100644
--- a/utils/settrans.c
+++ b/utils/settrans.c
@@ -130,7 +130,7 @@ main(int argc, char *argv[])
case 't': timeout = atof (arg) * 1000.0; break;
default:
- return EINVAL;
+ return ARGP_ERR_UNKNOWN;
}
return 0;
}
diff --git a/utils/showtrans.c b/utils/showtrans.c
index 2a0ac531..56255050 100644
--- a/utils/showtrans.c
+++ b/utils/showtrans.c
@@ -126,7 +126,8 @@ main (int argc, char *argv[])
case ARGP_KEY_NO_ARGS:
argp_usage (state); /* exits */
- default: return EINVAL;
+ default:
+ return ARGP_ERR_UNKNOWN;
}
return 0;
}
diff --git a/utils/storeinfo.c b/utils/storeinfo.c
index 3ed2996a..6eaae285 100644
--- a/utils/storeinfo.c
+++ b/utils/storeinfo.c
@@ -216,7 +216,7 @@ main(int argc, char *argv[])
break;
default:
- return EINVAL;
+ return ARGP_ERR_UNKNOWN;
}
return 0;
}
diff --git a/utils/vmstat.c b/utils/vmstat.c
index 11fc5703..8e43554a 100644
--- a/utils/vmstat.c
+++ b/utils/vmstat.c
@@ -129,11 +129,12 @@ main (int argc, char **argv)
case 2:
hdr_interval = atoi (arg); break;
default:
- return EINVAL;
+ return ARGP_ERR_UNKNOWN;
}
break;
- default: return EINVAL;
+ default:
+ return ARGP_ERR_UNKNOWN;
}
return 0;
}
diff --git a/utils/w.c b/utils/w.c
index 13b5457f..aa0c22ce 100644
--- a/utils/w.c
+++ b/utils/w.c
@@ -403,7 +403,8 @@ main(int argc, char *argv[])
case ARGP_KEY_ARG:
break;
- default: return EINVAL;
+ default:
+ return ARGP_ERR_UNKNOWN;
}
return 0;
}