main.c (217769) | main.c (221110) |
---|---|
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 --- 25 unchanged lines hidden (view full) --- 34 The Regents of the University of California. All rights reserved.\n"; 35#endif /* not lint */ 36 37#ifndef lint 38static char sccsid[] = "@(#)main.c 8.6 (Berkeley) 5/14/95"; 39#endif /* not lint */ 40#endif 41#include <sys/cdefs.h> | 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 --- 25 unchanged lines hidden (view full) --- 34 The Regents of the University of California. All rights reserved.\n"; 35#endif /* not lint */ 36 37#ifndef lint 38static char sccsid[] = "@(#)main.c 8.6 (Berkeley) 5/14/95"; 39#endif /* not lint */ 40#endif 41#include <sys/cdefs.h> |
42__FBSDID("$FreeBSD: head/sbin/fsck_ffs/main.c 217769 2011-01-24 06:17:05Z mckusick $"); | 42__FBSDID("$FreeBSD: head/sbin/fsck_ffs/main.c 221110 2011-04-27 02:55:03Z des $"); |
43 44#include <sys/param.h> 45#include <sys/file.h> 46#include <sys/mount.h> 47#include <sys/resource.h> 48#include <sys/stat.h> 49#include <sys/sysctl.h> 50#include <sys/uio.h> --- 351 unchanged lines hidden (view full) --- 402 } 403 /* 404 * Write the superblock so we don't try to recover the 405 * journal on another pass. 406 */ 407 sblock.fs_mtime = time(NULL); 408 sbdirty(); 409 } | 43 44#include <sys/param.h> 45#include <sys/file.h> 46#include <sys/mount.h> 47#include <sys/resource.h> 48#include <sys/stat.h> 49#include <sys/sysctl.h> 50#include <sys/uio.h> --- 351 unchanged lines hidden (view full) --- 402 } 403 /* 404 * Write the superblock so we don't try to recover the 405 * journal on another pass. 406 */ 407 sblock.fs_mtime = time(NULL); 408 sbdirty(); 409 } |
410 | 410 |
411 /* 412 * Cleared if any questions answered no. Used to decide if 413 * the superblock should be marked clean. 414 */ 415 resolved = 1; 416 /* 417 * 1: scan inodes tallying blocks used 418 */ --- 152 unchanged lines hidden (view full) --- 571 (size_t)-1); 572 build_iovec(&iov, &iovlen, "errmsg", errmsg, 573 sizeof(errmsg)); 574 build_iovec(&iov, &iovlen, "update", NULL, 0); 575 build_iovec(&iov, &iovlen, "reload", NULL, 0); 576 /* 577 * XX: We need the following line until we clean up 578 * nmount parsing of root mounts and NFS root mounts. | 411 /* 412 * Cleared if any questions answered no. Used to decide if 413 * the superblock should be marked clean. 414 */ 415 resolved = 1; 416 /* 417 * 1: scan inodes tallying blocks used 418 */ --- 152 unchanged lines hidden (view full) --- 571 (size_t)-1); 572 build_iovec(&iov, &iovlen, "errmsg", errmsg, 573 sizeof(errmsg)); 574 build_iovec(&iov, &iovlen, "update", NULL, 0); 575 build_iovec(&iov, &iovlen, "reload", NULL, 0); 576 /* 577 * XX: We need the following line until we clean up 578 * nmount parsing of root mounts and NFS root mounts. |
579 */ | 579 */ |
580 build_iovec(&iov, &iovlen, "ro", NULL, 0); 581 if (nmount(iov, iovlen, mntp->f_flags) == 0) { 582 return (0); 583 } 584 pwarn("mount reload of '%s' failed: %s %s\n\n", 585 mntp->f_mntonname, strerror(errno), errmsg); 586 return (1); 587 } --- 38 unchanged lines hidden (view full) --- 626 } 627 statfsp = NULL; 628 return (statfsp); 629} 630 631static void 632usage(void) 633{ | 580 build_iovec(&iov, &iovlen, "ro", NULL, 0); 581 if (nmount(iov, iovlen, mntp->f_flags) == 0) { 582 return (0); 583 } 584 pwarn("mount reload of '%s' failed: %s %s\n\n", 585 mntp->f_mntonname, strerror(errno), errmsg); 586 return (1); 587 } --- 38 unchanged lines hidden (view full) --- 626 } 627 statfsp = NULL; 628 return (statfsp); 629} 630 631static void 632usage(void) 633{ |
634 (void) fprintf(stderr, 635 "usage: %s [-BFprfny] [-b block] [-c level] [-m mode] " 636 "filesystem ...\n", 637 getprogname()); 638 exit(1); | 634 (void) fprintf(stderr, 635 "usage: %s [-BFprfny] [-b block] [-c level] [-m mode] " 636 "filesystem ...\n", 637 getprogname()); 638 exit(1); |
639} | 639} |