summaryrefslogtreecommitdiff
path: root/src/fstabinfo.c
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2007-05-14 12:24:18 +0000
committerRoy Marples <roy@marples.name>2007-05-14 12:24:18 +0000
commit0942916b729e375df32dae5874c74aaf4f5743a1 (patch)
treee02e63aa20ad55047eae69ce2ab63e6f43894a00 /src/fstabinfo.c
parent86c7d44d66a64d923294cf5d830b8fd3bf0e3db1 (diff)
downloadopenrc-0942916b729e375df32dae5874c74aaf4f5743a1.tar.gz
openrc-0942916b729e375df32dae5874c74aaf4f5743a1.tar.bz2
openrc-0942916b729e375df32dae5874c74aaf4f5743a1.tar.xz
Allow time for pidfiles to be created, #178274.
Use int instead of char for getopt, #178084 thanks to drizztbsd.
Diffstat (limited to 'src/fstabinfo.c')
-rw-r--r--src/fstabinfo.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/fstabinfo.c b/src/fstabinfo.c
index 7ab5b59..1533476 100644
--- a/src/fstabinfo.c
+++ b/src/fstabinfo.c
@@ -78,15 +78,15 @@ int main (int argc, char **argv)
int result = EXIT_FAILURE;
char *token;
int n = 0;
- char c;
+ int opt;
- while ((c = getopt_long (argc, argv, getoptstring,
- longopts, (int *) 0)) != -1)
+ while ((opt = getopt_long (argc, argv, getoptstring,
+ longopts, (int *) 0)) != -1)
{
#ifdef HAVE_GETMNTENT
fp = setmntent ("/etc/fstab", "r");
#endif
- switch (c) {
+ switch (opt) {
case 'f':
while ((token = strsep (&optarg, ",")))
while ((ent = GET_ENT))