setup.c (88031) | setup.c (92806) |
---|---|
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[] = "@(#)setup.c 8.10 (Berkeley) 5/9/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[] = "@(#)setup.c 8.10 (Berkeley) 5/9/95"; 37#endif 38static const char rcsid[] = |
39 "$FreeBSD: head/sbin/fsck_ffs/setup.c 88031 2001-12-17 01:33:27Z iedowse $"; | 39 "$FreeBSD: head/sbin/fsck_ffs/setup.c 92806 2002-03-20 17:55:10Z obrien $"; |
40#endif /* not lint */ 41 42#define DKTYPENAMES 43#include <sys/param.h> 44#include <sys/stat.h> 45#include <sys/disklabel.h> 46#include <sys/file.h> 47#include <sys/sysctl.h> --- 457 unchanged lines hidden (view full) --- 505 * When done the cgsblock macro can be calculated and the fs_ncg field 506 * can be used. Do NOT attempt to use other macros without verifying that 507 * their needed information is available! 508 */ 509static int 510calcsb(dev, devfd, fs) 511 char *dev; 512 int devfd; | 40#endif /* not lint */ 41 42#define DKTYPENAMES 43#include <sys/param.h> 44#include <sys/stat.h> 45#include <sys/disklabel.h> 46#include <sys/file.h> 47#include <sys/sysctl.h> --- 457 unchanged lines hidden (view full) --- 505 * When done the cgsblock macro can be calculated and the fs_ncg field 506 * can be used. Do NOT attempt to use other macros without verifying that 507 * their needed information is available! 508 */ 509static int 510calcsb(dev, devfd, fs) 511 char *dev; 512 int devfd; |
513 register struct fs *fs; | 513 struct fs *fs; |
514{ | 514{ |
515 register struct disklabel *lp; 516 register struct partition *pp; 517 register char *cp; | 515 struct disklabel *lp; 516 struct partition *pp; 517 char *cp; |
518 int i; 519 520 cp = strchr(dev, '\0') - 1; 521 if (cp == (char *)-1 || ((*cp < 'a' || *cp > 'h') && !isdigit(*cp))) { 522 pfatal("%s: CANNOT FIGURE OUT FILE SYSTEM PARTITION\n", dev); 523 return (0); 524 } 525 lp = getdisklabel(dev, devfd); --- 59 unchanged lines hidden --- | 518 int i; 519 520 cp = strchr(dev, '\0') - 1; 521 if (cp == (char *)-1 || ((*cp < 'a' || *cp > 'h') && !isdigit(*cp))) { 522 pfatal("%s: CANNOT FIGURE OUT FILE SYSTEM PARTITION\n", dev); 523 return (0); 524 } 525 lp = getdisklabel(dev, devfd); --- 59 unchanged lines hidden --- |