diff options
author | Roy Marples <roy@marples.name> | 2007-04-10 11:24:58 +0000 |
---|---|---|
committer | Roy Marples <roy@marples.name> | 2007-04-10 11:24:58 +0000 |
commit | d3db9e9910ef0a472feb27cf4a9ace78e431ddd9 (patch) | |
tree | 7e01917c209258b2f459f63ba42558c3beffb2f5 /src/fstabinfo.c | |
parent | 662e308d86d63750fc1d939e68c2b5ee88fea593 (diff) |
Fix indentation
Diffstat (limited to 'src/fstabinfo.c')
-rw-r--r-- | src/fstabinfo.c | 116 |
1 files changed, 58 insertions, 58 deletions
diff --git a/src/fstabinfo.c b/src/fstabinfo.c index 6f45cc70..de37383b 100644 --- a/src/fstabinfo.c +++ b/src/fstabinfo.c @@ -46,8 +46,8 @@ static struct mntent *getmntfile (FILE *fp, const char *file) struct mntent *ent; while ((ent = getmntent (fp))) - if (strcmp (file, ent->mnt_dir) == 0) - return (ent); + if (strcmp (file, ent->mnt_dir) == 0) + return (ent); return (NULL); } @@ -74,71 +74,71 @@ int main (int argc, char **argv) #endif if (strcmp (argv[i], "--fstype") == 0 && i + 1 < argc) - { - i++; - p = argv[i]; - while ((token = strsep (&p, ","))) - while ((ent = GET_ENT)) - if (strcmp (token, ENT_TYPE (ent)) == 0) - printf ("%s\n", ENT_FILE (ent)); - result = EXIT_SUCCESS; - } + { + i++; + p = argv[i]; + while ((token = strsep (&p, ","))) + while ((ent = GET_ENT)) + if (strcmp (token, ENT_TYPE (ent)) == 0) + printf ("%s\n", ENT_FILE (ent)); + result = EXIT_SUCCESS; + } if (strcmp (argv[i], "--mount-cmd") == 0 && i + 1 < argc) - { - i++; - if ((ent = GET_ENT_FILE (argv[i])) == NULL) - continue; - printf ("-o %s -t %s %s %s\n", ENT_OPTS (ent), ENT_TYPE (ent), - ENT_DEVICE (ent), ENT_FILE (ent)); - result = EXIT_SUCCESS; - } + { + i++; + if ((ent = GET_ENT_FILE (argv[i])) == NULL) + continue; + printf ("-o %s -t %s %s %s\n", ENT_OPTS (ent), ENT_TYPE (ent), + ENT_DEVICE (ent), ENT_FILE (ent)); + result = EXIT_SUCCESS; + } if (strcmp (argv[i], "--opts") == 0 && i + 1 < argc) - { - i++; - if ((ent = GET_ENT_FILE (argv[i])) == NULL) - continue; - printf ("%s\n", ENT_OPTS (ent)); - result = EXIT_SUCCESS; - } - + { + i++; + if ((ent = GET_ENT_FILE (argv[i])) == NULL) + continue; + printf ("%s\n", ENT_OPTS (ent)); + result = EXIT_SUCCESS; + } + if (strcmp (argv[i], "--passno") == 0 && i + 1 < argc) - { - i++; - switch (argv[i][0]) - { - case '=': - case '<': - case '>': - if (sscanf (argv[i] + 1, "%d", &n) != 1) - eerrorx ("%s: invalid passno %s", argv[0], argv[i] + 1); - - while ((ent = GET_ENT)) - { - if (((argv[i][0] == '=' && n == ENT_PASS (ent)) || - (argv[i][0] == '<' && n > ENT_PASS (ent)) || - (argv[i][0] == '>' && n < ENT_PASS (ent))) && - strcmp (ENT_FILE (ent), "none") != 0) - printf ("%s\n", ENT_FILE (ent)); - } - - default: - if ((ent = GET_ENT_FILE (argv[i])) == NULL) - continue; - printf ("%d\n", ENT_PASS (ent)); - result = EXIT_SUCCESS; - } - } + { + i++; + switch (argv[i][0]) + { + case '=': + case '<': + case '>': + if (sscanf (argv[i] + 1, "%d", &n) != 1) + eerrorx ("%s: invalid passno %s", argv[0], argv[i] + 1); + + while ((ent = GET_ENT)) + { + if (((argv[i][0] == '=' && n == ENT_PASS (ent)) || + (argv[i][0] == '<' && n > ENT_PASS (ent)) || + (argv[i][0] == '>' && n < ENT_PASS (ent))) && + strcmp (ENT_FILE (ent), "none") != 0) + printf ("%s\n", ENT_FILE (ent)); + } + + default: + if ((ent = GET_ENT_FILE (argv[i])) == NULL) + continue; + printf ("%d\n", ENT_PASS (ent)); + result = EXIT_SUCCESS; + } + } END_ENT; if (result != EXIT_SUCCESS) - { - eerror ("%s: unknown option `%s'", basename (argv[0]), argv[i]); - break; - } - + { + eerror ("%s: unknown option `%s'", basename (argv[0]), argv[i]); + break; + } + } exit (result); |