main.c (73db93b889129cdabe8e9e65dcc1aea49cc08396) | main.c (9708ba9f29bd83e21d532f89f93b8c3bf945e843) |
---|---|
1/*- 2 * SPDX-License-Identifier: BSD-2-Clause 3 * 4 * Copyright (C) 1995 Wolfgang Solfrank 5 * Copyright (c) 1995 Martin Husemann 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 34 unchanged lines hidden (view full) --- 43#include "fsutil.h" 44#include "ext.h" 45 46int alwaysno; /* assume "no" for all questions */ 47int alwaysyes; /* assume "yes" for all questions */ 48int preen; /* set when preening */ 49int rdonly; /* device is opened read only (supersedes above) */ 50int skipclean; /* skip clean file systems if preening */ | 1/*- 2 * SPDX-License-Identifier: BSD-2-Clause 3 * 4 * Copyright (C) 1995 Wolfgang Solfrank 5 * Copyright (c) 1995 Martin Husemann 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 34 unchanged lines hidden (view full) --- 43#include "fsutil.h" 44#include "ext.h" 45 46int alwaysno; /* assume "no" for all questions */ 47int alwaysyes; /* assume "yes" for all questions */ 48int preen; /* set when preening */ 49int rdonly; /* device is opened read only (supersedes above) */ 50int skipclean; /* skip clean file systems if preening */ |
51int allow_mmap; /* Allow the use of mmap(), if possible */ |
|
51 52static void usage(void) __dead2; 53 54static void 55usage(void) 56{ 57 58 fprintf(stderr, "%s\n%s\n", --- 4 unchanged lines hidden (view full) --- 63 64int 65main(int argc, char **argv) 66{ 67 int ret = 0, erg; 68 int ch; 69 70 skipclean = 1; | 52 53static void usage(void) __dead2; 54 55static void 56usage(void) 57{ 58 59 fprintf(stderr, "%s\n%s\n", --- 4 unchanged lines hidden (view full) --- 64 65int 66main(int argc, char **argv) 67{ 68 int ret = 0, erg; 69 int ch; 70 71 skipclean = 1; |
71 while ((ch = getopt(argc, argv, "CfFnpy")) != -1) { | 72 allow_mmap = 1; 73 while ((ch = getopt(argc, argv, "CfFnpyM")) != -1) { |
72 switch (ch) { 73 case 'C': /* for fsck_ffs compatibility */ 74 break; 75 case 'f': 76 skipclean = 0; 77 break; 78 case 'F': 79 /* --- 13 unchanged lines hidden (view full) --- 93 alwaysyes = 1; 94 alwaysno = 0; 95 break; 96 97 case 'p': 98 preen = 1; 99 break; 100 | 74 switch (ch) { 75 case 'C': /* for fsck_ffs compatibility */ 76 break; 77 case 'f': 78 skipclean = 0; 79 break; 80 case 'F': 81 /* --- 13 unchanged lines hidden (view full) --- 95 alwaysyes = 1; 96 alwaysno = 0; 97 break; 98 99 case 'p': 100 preen = 1; 101 break; 102 |
103 case 'M': 104 allow_mmap = 0; 105 break; 106 |
|
101 default: 102 usage(); 103 break; 104 } 105 } 106 argc -= optind; 107 argv += optind; 108 --- 49 unchanged lines hidden --- | 107 default: 108 usage(); 109 break; 110 } 111 } 112 argc -= optind; 113 argv += optind; 114 --- 49 unchanged lines hidden --- |