Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 19 Jan 1998 08:28:29 -0800 (PST)
From:      Bruce Evans <bde@FreeBSD.ORG>
To:        cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG, cvs-sbin@FreeBSD.ORG
Subject:   cvs commit: src/sbin/fsck setup.c
Message-ID:  <199801191628.IAA19962@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
bde         1998/01/19 08:28:29 PST

  Modified files:
    sbin/fsck            setup.c 
  Log:
  Guard against a block size of 0 in the label.  When the first
  superblock is invalid, fsck looks at the label to help guess where
  the next superblock should be.  If the partition type is 4.2BSD,
  fsck assumed that the block size was valid and divided by it, so
  it dumped core if the size was 0.
  
  Initialization of the label was broken almost 3 years ago in rev.1.9
  of newfs/newfs.c.  Newfs does not change the label at all, so there
  is no problem (except the breakage of the automatic search for
  backup superblocks) unless something else sets the partition type
  to 4.2BSD.  However, it is too easy to set partition types to
  4.2.BSD by copying an old label or by using a disktab entry to
  create the label.
  
  PR:	2537
  
  Revision  Changes    Path
  1.8       +5 -0      src/sbin/fsck/setup.c



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199801191628.IAA19962>