[BACK]Return to setup.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / sbin / fsck_ext2fs

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/sbin/fsck_ext2fs/setup.c between version 1.15 and 1.16

version 1.15, 2004/03/22 19:46:53 version 1.16, 2004/10/29 17:37:30
Line 464  calcsb(dev, devfd, fs)
Line 464  calcsb(dev, devfd, fs)
         struct partition *pp;          struct partition *pp;
         char *cp;          char *cp;
   
         cp = strchr(dev, '\0') - 1;          cp = strchr(dev, '\0');
         if ((cp == (char *)-1 || (*cp < 'a' || *cp > 'h')) && !isdigit(*cp)) {          if (cp-- == dev ||
               ((*cp < 'a' || *cp > 'h') && !isdigit((unsigned char)*cp))) {
                 pfatal("%s: CANNOT FIGURE OUT FILE SYSTEM PARTITION\n", dev);                  pfatal("%s: CANNOT FIGURE OUT FILE SYSTEM PARTITION\n", dev);
                 return (0);                  return (0);
         }          }
         lp = getdisklabel(dev, devfd);          lp = getdisklabel(dev, devfd);
         if (isdigit(*cp))          if (isdigit((unsigned char)*cp))
                 pp = &lp->d_partitions[0];                  pp = &lp->d_partitions[0];
         else          else
                 pp = &lp->d_partitions[*cp - 'a'];                  pp = &lp->d_partitions[*cp - 'a'];

Legend:
Removed from v.1.15  
changed lines
  Added in v.1.16

CVSweb <webmaster@jp.NetBSD.org>