fsutil.c (75557) | fsutil.c (75927) |
---|---|
1/* 2 * Copyright (c) 1980, 1986, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 22 unchanged lines hidden (view full) --- 31 * SUCH DAMAGE. 32 */ 33 34#ifndef lint 35#if 0 36static const char sccsid[] = "@(#)utilities.c 8.6 (Berkeley) 5/19/95"; 37#endif 38static const char rcsid[] = | 1/* 2 * Copyright (c) 1980, 1986, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 22 unchanged lines hidden (view full) --- 31 * SUCH DAMAGE. 32 */ 33 34#ifndef lint 35#if 0 36static const char sccsid[] = "@(#)utilities.c 8.6 (Berkeley) 5/19/95"; 37#endif 38static const char rcsid[] = |
39 "$FreeBSD: head/sbin/fsck_ffs/fsutil.c 75557 2001-04-16 22:22:21Z mckusick $"; | 39 "$FreeBSD: head/sbin/fsck_ffs/fsutil.c 75927 2001-04-24 22:38:08Z mckusick $"; |
40#endif /* not lint */ 41 42#include <sys/param.h> 43#include <sys/types.h> 44#include <sys/stat.h> 45 46#include <ufs/ufs/dinode.h> 47#include <ufs/ufs/dir.h> --- 211 unchanged lines hidden (view full) --- 259} 260 261void 262rwerror(mesg, blk) 263 char *mesg; 264 ufs_daddr_t blk; 265{ 266 | 40#endif /* not lint */ 41 42#include <sys/param.h> 43#include <sys/types.h> 44#include <sys/stat.h> 45 46#include <ufs/ufs/dinode.h> 47#include <ufs/ufs/dir.h> --- 211 unchanged lines hidden (view full) --- 259} 260 261void 262rwerror(mesg, blk) 263 char *mesg; 264 ufs_daddr_t blk; 265{ 266 |
267 if (bkgrdcheck) 268 exit(EEXIT); |
|
267 if (preen == 0) 268 printf("\n"); 269 pfatal("CANNOT %s: %ld", mesg, blk); 270 if (reply("CONTINUE") == 0) 271 exit(EEXIT); 272} 273 274void --- 365 unchanged lines hidden (view full) --- 640{ 641 va_list ap; 642#if __STDC__ 643 va_start(ap, fmt); 644#else 645 va_start(ap); 646#endif 647 if (!preen) { | 269 if (preen == 0) 270 printf("\n"); 271 pfatal("CANNOT %s: %ld", mesg, blk); 272 if (reply("CONTINUE") == 0) 273 exit(EEXIT); 274} 275 276void --- 365 unchanged lines hidden (view full) --- 642{ 643 va_list ap; 644#if __STDC__ 645 va_start(ap, fmt); 646#else 647 va_start(ap); 648#endif 649 if (!preen) { |
648 (void)vfprintf(stderr, fmt, ap); | 650 (void)vfprintf(stdout, fmt, ap); |
649 va_end(ap); 650 if (usedsoftdep) | 651 va_end(ap); 652 if (usedsoftdep) |
651 (void)fprintf(stderr, | 653 (void)fprintf(stdout, |
652 "\nUNEXPECTED SOFT UPDATE INCONSISTENCY\n"); 653 /* 654 * Force foreground fsck to clean up inconsistency. 655 */ 656 if (bkgrdflag) { 657 cmd.value = FS_NEEDSFSCK; 658 cmd.size = 1; 659 if (sysctlbyname("vfs.ffs.setflags", 0, 0, 660 &cmd, sizeof cmd) == -1) 661 pwarn("CANNOT SET FS_NEEDSFSCK FLAG\n"); | 654 "\nUNEXPECTED SOFT UPDATE INCONSISTENCY\n"); 655 /* 656 * Force foreground fsck to clean up inconsistency. 657 */ 658 if (bkgrdflag) { 659 cmd.value = FS_NEEDSFSCK; 660 cmd.size = 1; 661 if (sysctlbyname("vfs.ffs.setflags", 0, 0, 662 &cmd, sizeof cmd) == -1) 663 pwarn("CANNOT SET FS_NEEDSFSCK FLAG\n"); |
662 fprintf(stderr, "CANNOT RUN IN BACKGROUND\n"); | 664 fprintf(stdout, "CANNOT RUN IN BACKGROUND\n"); |
663 ckfini(0); 664 exit(EEXIT); 665 } 666 return; 667 } 668 if (cdevname == NULL) 669 cdevname = "fsck"; | 665 ckfini(0); 666 exit(EEXIT); 667 } 668 return; 669 } 670 if (cdevname == NULL) 671 cdevname = "fsck"; |
670 (void)fprintf(stderr, "%s: ", cdevname); 671 (void)vfprintf(stderr, fmt, ap); 672 (void)fprintf(stderr, | 672 (void)fprintf(stdout, "%s: ", cdevname); 673 (void)vfprintf(stdout, fmt, ap); 674 (void)fprintf(stdout, |
673 "\n%s: UNEXPECTED%sINCONSISTENCY; RUN fsck MANUALLY.\n", 674 cdevname, usedsoftdep ? " SOFT UPDATE " : " "); 675 /* 676 * Force foreground fsck to clean up inconsistency. 677 */ 678 if (bkgrdflag) { 679 cmd.value = FS_NEEDSFSCK; 680 cmd.size = 1; --- 20 unchanged lines hidden (view full) --- 701{ 702 va_list ap; 703#if __STDC__ 704 va_start(ap, fmt); 705#else 706 va_start(ap); 707#endif 708 if (preen) | 675 "\n%s: UNEXPECTED%sINCONSISTENCY; RUN fsck MANUALLY.\n", 676 cdevname, usedsoftdep ? " SOFT UPDATE " : " "); 677 /* 678 * Force foreground fsck to clean up inconsistency. 679 */ 680 if (bkgrdflag) { 681 cmd.value = FS_NEEDSFSCK; 682 cmd.size = 1; --- 20 unchanged lines hidden (view full) --- 703{ 704 va_list ap; 705#if __STDC__ 706 va_start(ap, fmt); 707#else 708 va_start(ap); 709#endif 710 if (preen) |
709 (void)fprintf(stderr, "%s: ", cdevname); 710 (void)vfprintf(stderr, fmt, ap); | 711 (void)fprintf(stdout, "%s: ", cdevname); 712 (void)vfprintf(stdout, fmt, ap); |
711 va_end(ap); 712} 713 714/* 715 * Stub for routines from kernel. 716 */ 717void 718#if __STDC__ --- 6 unchanged lines hidden (view full) --- 725{ 726 va_list ap; 727#if __STDC__ 728 va_start(ap, fmt); 729#else 730 va_start(ap); 731#endif 732 pfatal("INTERNAL INCONSISTENCY:"); | 713 va_end(ap); 714} 715 716/* 717 * Stub for routines from kernel. 718 */ 719void 720#if __STDC__ --- 6 unchanged lines hidden (view full) --- 727{ 728 va_list ap; 729#if __STDC__ 730 va_start(ap, fmt); 731#else 732 va_start(ap); 733#endif 734 pfatal("INTERNAL INCONSISTENCY:"); |
733 (void)vfprintf(stderr, fmt, ap); | 735 (void)vfprintf(stdout, fmt, ap); |
734 va_end(ap); 735 exit(EEXIT); 736} | 736 va_end(ap); 737 exit(EEXIT); 738} |