Ignore:
Timestamp:
Jan 1, 2014, 12:47:38 AM (7 years ago)
Author:
Bruno Cornec
Message:
  • Update mindi-busybox to 1.21.1
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.2/mindi-busybox/util-linux/fsck_minix.c

    r2725 r3232  
    1414 *      Sent out to the mailing-list for testing.
    1515 *
    16  * 14.11.91  -  Testing seems to have gone well. Added some
     16 * 14.11.91  -  Testing seems to have gone well. Added some
    1717 *      correction-code, and changed some functions.
    1818 *
     
    2323 *      things seem to work now. Yeah, sure.
    2424 *
    25  *
    26  * 19.04.92  -  Had to start over again from this old version, as a
     25 * 19.04.92  -  Had to start over again from this old version, as a
    2726 *      kernel bug ate my enhanced fsck in february.
    2827 *
    29  * 28.02.93  -  added support for different directory entry sizes..
     28 * 28.02.93  -  added support for different directory entry sizes..
    3029 *
    3130 * Sat Mar  6 18:59:42 1993, faith@cs.unc.edu: Output namelen with
     
    3635 *
    3736 * Mon Jan  3 11:06:52 1994 - Dr. Wettstein (greg%wind.uucp@plains.nodak.edu)
    38  *                Added support for file system valid flag.  Also
    39  *                added program_version variable and output of
    40  *                program name and version number when program
    41  *                is executed.
    42  *
    43  * 30.10.94 - added support for v2 filesystem
    44  *            (Andreas Schwab, schwab@issan.informatik.uni-dortmund.de)
    45  *
    46  * 10.12.94  -  added test to prevent checking of mounted fs adapted
    47  *              from Theodore Ts'o's (tytso@athena.mit.edu) e2fsck
    48  *              program.  (Daniel Quinlan, quinlan@yggdrasil.com)
     37 *                            Added support for file system valid flag.  Also
     38 *                            added program_version variable and output of
     39 *                            program name and version number when program
     40 *                            is executed.
     41 *
     42 * 30.10.94  - added support for v2 filesystem
     43 *             (Andreas Schwab, schwab@issan.informatik.uni-dortmund.de)
     44 *
     45 * 10.12.94  - added test to prevent checking of mounted fs adapted
     46 *             from Theodore Ts'o's (tytso@athena.mit.edu) e2fsck
     47 *             program.  (Daniel Quinlan, quinlan@yggdrasil.com)
    4948 *
    5049 * 01.07.96  - Fixed the v2 fs stuff to use the right #defines and such
    51  *         for modern libcs (janl@math.uio.no, Nicolai Langfeldt)
     50 *             for modern libcs (janl@math.uio.no, Nicolai Langfeldt)
    5251 *
    5352 * 02.07.96  - Added C bit fiddling routines from rmk@ecs.soton.ac.uk
    5453 *             (Russell King).  He made them for ARM.  It would seem
    55  *         that the ARM is powerful enough to do this in C whereas
     54 *             that the ARM is powerful enough to do this in C whereas
    5655 *             i386 and m64k must use assembly to get it fast >:-)
    57  *         This should make minix fsck system-independent.
    58  *         (janl@math.uio.no, Nicolai Langfeldt)
     56 *             This should make minix fsck system-independent.
     57 *             (janl@math.uio.no, Nicolai Langfeldt)
    5958 *
    6059 * 04.11.96  - Added minor fixes from Andreas Schwab to avoid compiler
    6160 *             warnings.  Added mc68k bitops from
    62  *         Joerg Dorchain <dorchain@mpi-sb.mpg.de>.
     61 *             Joerg Dorchain <dorchain@mpi-sb.mpg.de>.
    6362 *
    6463 * 06.11.96  - Added v2 code submitted by Joerg Dorchain, but written by
     
    8786 * enforced (but it's not much fun on a character device :-).
    8887 */
     88
     89//usage:#define fsck_minix_trivial_usage
     90//usage:       "[-larvsmf] BLOCKDEV"
     91//usage:#define fsck_minix_full_usage "\n\n"
     92//usage:       "Check MINIX filesystem\n"
     93//usage:     "\n    -l  List all filenames"
     94//usage:     "\n    -r  Perform interactive repairs"
     95//usage:     "\n    -a  Perform automatic repairs"
     96//usage:     "\n    -v  Verbose"
     97//usage:     "\n    -s  Output superblock information"
     98//usage:     "\n    -m  Show \"mode not cleared\" warnings"
     99//usage:     "\n    -f  Force file system check"
    89100
    90101#include <mntent.h>
     
    11201131        }
    11211132        printf("Zone %d: %sin use, counted=%d\n",
    1122                i, zone_in_use(i) ? "" : "not ", zone_count[i]);
     1133            i, zone_in_use(i) ? "" : "not ", zone_count[i]);
    11231134    }
    11241135}
     
    11721183        }
    11731184        printf("Zone %d: %sin use, counted=%d\n",
    1174                i, zone_in_use(i) ? "" : "not ", zone_count[i]);
     1185            i, zone_in_use(i) ? "" : "not ", zone_count[i]);
    11751186    }
    11761187}
     
    12421253    else if (OPT_repair)
    12431254        printf("Filesystem on %s is dirty, needs checking\n",
    1244                device_name);
     1255            device_name);
    12451256
    12461257    read_tables();
     
    12691280                free_cnt++;
    12701281        printf("\n%6u inodes used (%u%%)\n", (INODES - free_cnt),
    1271                100 * (INODES - free_cnt) / INODES);
     1282            100 * (INODES - free_cnt) / INODES);
    12721283        for (i = FIRSTZONE, free_cnt = 0; i < ZONES; i++)
    12731284            if (!zone_in_use(i))
    12741285                free_cnt++;
    12751286        printf("%6u zones used (%u%%)\n\n"
    1276                "%6u regular files\n"
    1277                "%6u directories\n"
    1278                "%6u character device files\n"
    1279                "%6u block device files\n"
    1280                "%6u links\n"
    1281                "%6u symbolic links\n"
    1282                "------\n"
    1283                "%6u files\n",
    1284                (ZONES - free_cnt), 100 * (ZONES - free_cnt) / ZONES,
    1285                regular, directory, chardev, blockdev,
    1286                links - 2 * directory + 1, symlinks,
    1287                total - 2 * directory + 1);
     1287            "%6u regular files\n"
     1288            "%6u directories\n"
     1289            "%6u character device files\n"
     1290            "%6u block device files\n"
     1291            "%6u links\n"
     1292            "%6u symbolic links\n"
     1293            "------\n"
     1294            "%6u files\n",
     1295            (ZONES - free_cnt), 100 * (ZONES - free_cnt) / ZONES,
     1296            regular, directory, chardev, blockdev,
     1297            links - 2 * directory + 1, symlinks,
     1298            total - 2 * directory + 1);
    12881299    }
    12891300    if (changed) {
Note: See TracChangeset for help on using the changeset viewer.