Print this page
10133 smatch fixes for usr/src/cmd/fs.d

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/fs.d/ufs/mkfs/mkfs.c
          +++ new/usr/src/cmd/fs.d/ufs/mkfs/mkfs.c
↓ open down ↓ 29 lines elided ↑ open up ↑
  30   30   * University Copyright- Copyright (c) 1982, 1986, 1988
  31   31   * The Regents of the University of California
  32   32   * All Rights Reserved
  33   33   *
  34   34   * University Acknowledgment- Portions of this document are derived from
  35   35   * software developed by the University of California, Berkeley, and its
  36   36   * contributors.
  37   37   */
  38   38  
  39   39  /*
       40 + * Copyright (c) 2018, Joyent, Inc.
       41 + */
       42 +
       43 +/*
  40   44   * The maximum supported file system size (in sectors) is the
  41   45   * number of frags that can be represented in an int32_t field
  42   46   * (INT_MAX) times the maximum number of sectors per frag.  Since
  43   47   * the maximum frag size is MAXBSIZE, the maximum number of sectors
  44   48   * per frag is MAXBSIZE/DEV_BSIZE.
  45   49   */
  46   50  #define FS_MAX  (((diskaddr_t)INT_MAX) * (MAXBSIZE/DEV_BSIZE))
  47   51  
  48   52  /*
  49   53   * make file system for cylinder-group style file systems
↓ open down ↓ 178 lines elided ↑ open up ↑
 228  232  #include        <sys/fs/ufs_fsdir.h>
 229  233  #include        <sys/fs/ufs_inode.h>
 230  234  #include        <sys/fs/ufs_fs.h>
 231  235  #include        <sys/fs/ufs_log.h>
 232  236  #include        <sys/mntent.h>
 233  237  #include        <sys/filio.h>
 234  238  #include        <limits.h>
 235  239  #include        <sys/int_const.h>
 236  240  #include        <signal.h>
 237  241  #include        <sys/efi_partition.h>
      242 +#include        <fslib.h>
 238  243  #include        "roll_log.h"
 239  244  
 240  245  #define bcopy(f, t, n)    (void) memcpy(t, f, n)
 241  246  #define bzero(s, n)     (void) memset(s, 0, n)
 242  247  #define bcmp(s, d, n)   memcmp(s, d, n)
 243  248  
 244  249  #define index(s, r)     strchr(s, r)
 245  250  #define rindex(s, r)    strrchr(s, r)
 246  251  
 247  252  #include        <sys/stat.h>
↓ open down ↓ 5611 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX