diff options
author | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2008-07-21 13:33:22 +0000 |
---|---|---|
committer | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2008-07-21 13:33:22 +0000 |
commit | e1e5174942d4624e3abb8b98fe404afdbb4edad1 (patch) | |
tree | 90df2597a9ee281f4fe0aee8cfacf037e6123397 /util-linux/fsck_minix.c | |
parent | 525936195718b40ddb29f30fa87c15c1533c1d08 (diff) | |
download | busybox-w32-e1e5174942d4624e3abb8b98fe404afdbb4edad1.tar.gz busybox-w32-e1e5174942d4624e3abb8b98fe404afdbb4edad1.tar.bz2 busybox-w32-e1e5174942d4624e3abb8b98fe404afdbb4edad1.zip |
- s/super.block/superblock/g; # for consistency; -1b
Diffstat (limited to 'util-linux/fsck_minix.c')
-rw-r--r-- | util-linux/fsck_minix.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/util-linux/fsck_minix.c b/util-linux/fsck_minix.c index b0d5c6a3f..2dbd437a3 100644 --- a/util-linux/fsck_minix.c +++ b/util-linux/fsck_minix.c | |||
@@ -29,7 +29,7 @@ | |||
29 | * 28.02.93 - added support for different directory entry sizes.. | 29 | * 28.02.93 - added support for different directory entry sizes.. |
30 | * | 30 | * |
31 | * Sat Mar 6 18:59:42 1993, faith@cs.unc.edu: Output namelen with | 31 | * Sat Mar 6 18:59:42 1993, faith@cs.unc.edu: Output namelen with |
32 | * super-block information | 32 | * superblock information |
33 | * | 33 | * |
34 | * Sat Oct 9 11:17:11 1993, faith@cs.unc.edu: make exit status conform | 34 | * Sat Oct 9 11:17:11 1993, faith@cs.unc.edu: make exit status conform |
35 | * to that required by fsutil | 35 | * to that required by fsutil |
@@ -79,7 +79,7 @@ | |||
79 | * -a for automatic repairs (not implemented) | 79 | * -a for automatic repairs (not implemented) |
80 | * -r for repairs (interactive) (not implemented) | 80 | * -r for repairs (interactive) (not implemented) |
81 | * -v for verbose (tells how many files) | 81 | * -v for verbose (tells how many files) |
82 | * -s for super-block info | 82 | * -s for superblock info |
83 | * -m for minix-like "mode not cleared" warnings | 83 | * -m for minix-like "mode not cleared" warnings |
84 | * -f force filesystem check even if filesystem marked as valid | 84 | * -f force filesystem check even if filesystem marked as valid |
85 | * | 85 | * |
@@ -148,7 +148,7 @@ struct globals { | |||
148 | 148 | ||
149 | /* Bigger stuff */ | 149 | /* Bigger stuff */ |
150 | struct termios sv_termios; | 150 | struct termios sv_termios; |
151 | char super_block_buffer[BLOCK_SIZE]; | 151 | char superblock_buffer[BLOCK_SIZE]; |
152 | char add_zone_ind_blk[BLOCK_SIZE]; | 152 | char add_zone_ind_blk[BLOCK_SIZE]; |
153 | char add_zone_dind_blk[BLOCK_SIZE]; | 153 | char add_zone_dind_blk[BLOCK_SIZE]; |
154 | USE_FEATURE_MINIX2(char add_zone_tind_blk[BLOCK_SIZE];) | 154 | USE_FEATURE_MINIX2(char add_zone_tind_blk[BLOCK_SIZE];) |
@@ -183,7 +183,7 @@ struct globals { | |||
183 | #define name_depth (G.name_depth ) | 183 | #define name_depth (G.name_depth ) |
184 | #define name_component (G.name_component ) | 184 | #define name_component (G.name_component ) |
185 | #define sv_termios (G.sv_termios ) | 185 | #define sv_termios (G.sv_termios ) |
186 | #define super_block_buffer (G.super_block_buffer ) | 186 | #define superblock_buffer (G.superblock_buffer ) |
187 | #define add_zone_ind_blk (G.add_zone_ind_blk ) | 187 | #define add_zone_ind_blk (G.add_zone_ind_blk ) |
188 | #define add_zone_dind_blk (G.add_zone_dind_blk ) | 188 | #define add_zone_dind_blk (G.add_zone_dind_blk ) |
189 | #define add_zone_tind_blk (G.add_zone_tind_blk ) | 189 | #define add_zone_tind_blk (G.add_zone_tind_blk ) |
@@ -223,7 +223,7 @@ enum { | |||
223 | #define Inode1 (((struct minix1_inode *) inode_buffer)-1) | 223 | #define Inode1 (((struct minix1_inode *) inode_buffer)-1) |
224 | #define Inode2 (((struct minix2_inode *) inode_buffer)-1) | 224 | #define Inode2 (((struct minix2_inode *) inode_buffer)-1) |
225 | 225 | ||
226 | #define Super (*(struct minix_super_block *)(super_block_buffer)) | 226 | #define Super (*(struct minix_superblock *)(superblock_buffer)) |
227 | 227 | ||
228 | #if ENABLE_FEATURE_MINIX2 | 228 | #if ENABLE_FEATURE_MINIX2 |
229 | # define ZONES ((unsigned)(version2 ? Super.s_zones : Super.s_nzones)) | 229 | # define ZONES ((unsigned)(version2 ? Super.s_zones : Super.s_nzones)) |
@@ -560,7 +560,7 @@ static int map_block2(struct minix2_inode *inode, unsigned blknr) | |||
560 | } | 560 | } |
561 | #endif | 561 | #endif |
562 | 562 | ||
563 | static void write_super_block(void) | 563 | static void write_superblock(void) |
564 | { | 564 | { |
565 | /* | 565 | /* |
566 | * Set the state of the filesystem based on whether or not there | 566 | * Set the state of the filesystem based on whether or not there |
@@ -572,13 +572,13 @@ static void write_super_block(void) | |||
572 | Super.s_state &= ~MINIX_ERROR_FS; | 572 | Super.s_state &= ~MINIX_ERROR_FS; |
573 | 573 | ||
574 | xlseek(dev_fd, BLOCK_SIZE, SEEK_SET); | 574 | xlseek(dev_fd, BLOCK_SIZE, SEEK_SET); |
575 | if (BLOCK_SIZE != full_write(dev_fd, super_block_buffer, BLOCK_SIZE)) | 575 | if (BLOCK_SIZE != full_write(dev_fd, superblock_buffer, BLOCK_SIZE)) |
576 | die("cannot write super-block"); | 576 | die("cannot write superblock"); |
577 | } | 577 | } |
578 | 578 | ||
579 | static void write_tables(void) | 579 | static void write_tables(void) |
580 | { | 580 | { |
581 | write_super_block(); | 581 | write_superblock(); |
582 | 582 | ||
583 | if (IMAPS * BLOCK_SIZE != write(dev_fd, inode_map, IMAPS * BLOCK_SIZE)) | 583 | if (IMAPS * BLOCK_SIZE != write(dev_fd, inode_map, IMAPS * BLOCK_SIZE)) |
584 | die("cannot write inode map"); | 584 | die("cannot write inode map"); |
@@ -614,8 +614,8 @@ static void get_dirsize(void) | |||
614 | static void read_superblock(void) | 614 | static void read_superblock(void) |
615 | { | 615 | { |
616 | xlseek(dev_fd, BLOCK_SIZE, SEEK_SET); | 616 | xlseek(dev_fd, BLOCK_SIZE, SEEK_SET); |
617 | if (BLOCK_SIZE != full_read(dev_fd, super_block_buffer, BLOCK_SIZE)) | 617 | if (BLOCK_SIZE != full_read(dev_fd, superblock_buffer, BLOCK_SIZE)) |
618 | die("cannot read super block"); | 618 | die("cannot read superblock"); |
619 | /* already initialized to: | 619 | /* already initialized to: |
620 | namelen = 14; | 620 | namelen = 14; |
621 | dirsize = 16; | 621 | dirsize = 16; |
@@ -634,13 +634,13 @@ static void read_superblock(void) | |||
634 | version2 = 1; | 634 | version2 = 1; |
635 | #endif | 635 | #endif |
636 | } else | 636 | } else |
637 | die("bad magic number in super-block"); | 637 | die("bad magic number in superblock"); |
638 | if (ZONESIZE != 0 || BLOCK_SIZE != 1024) | 638 | if (ZONESIZE != 0 || BLOCK_SIZE != 1024) |
639 | die("only 1k blocks/zones supported"); | 639 | die("only 1k blocks/zones supported"); |
640 | if (IMAPS * BLOCK_SIZE * 8 < INODES + 1) | 640 | if (IMAPS * BLOCK_SIZE * 8 < INODES + 1) |
641 | die("bad s_imap_blocks field in super-block"); | 641 | die("bad s_imap_blocks field in superblock"); |
642 | if (ZMAPS * BLOCK_SIZE * 8 < ZONES - FIRSTZONE + 1) | 642 | if (ZMAPS * BLOCK_SIZE * 8 < ZONES - FIRSTZONE + 1) |
643 | die("bad s_zmap_blocks field in super-block"); | 643 | die("bad s_zmap_blocks field in superblock"); |
644 | } | 644 | } |
645 | 645 | ||
646 | static void read_tables(void) | 646 | static void read_tables(void) |
@@ -1296,7 +1296,7 @@ int fsck_minix_main(int argc UNUSED_PARAM, char **argv) | |||
1296 | printf("FILE SYSTEM HAS BEEN CHANGED\n"); | 1296 | printf("FILE SYSTEM HAS BEEN CHANGED\n"); |
1297 | sync(); | 1297 | sync(); |
1298 | } else if (OPT_repair) | 1298 | } else if (OPT_repair) |
1299 | write_super_block(); | 1299 | write_superblock(); |
1300 | 1300 | ||
1301 | if (OPT_manual) | 1301 | if (OPT_manual) |
1302 | tcsetattr(0, TCSANOW, &sv_termios); | 1302 | tcsetattr(0, TCSANOW, &sv_termios); |