~ubuntu-branches/debian/stretch/grub2/stretch

« back to all changes in this revision

Viewing changes to kern/emu/hostdisk.c

Tags: upstream-1.98+20100705
ImportĀ upstreamĀ versionĀ 1.98+20100705

Show diffs side-by-side

added added

removed removed

Lines of Context:
1260
1260
      for (p = path + 5; *p; ++p)
1261
1261
        if (grub_isdigit(*p))
1262
1262
          {
1263
 
            p = strchr (p, 's');
 
1263
            p = strpbrk (p, "sp");
1264
1264
            if (p)
1265
1265
              *p = '\0';
1266
1266
            break;
1507
1507
  }
1508
1508
 
1509
1509
#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__APPLE__)
1510
 
  /* FreeBSD uses "/dev/[a-z]+[0-9]+(s[0-9]+[a-z]?)?".  */
 
1510
  /* FreeBSD uses "/dev/[a-z]+[0-9]+([sp][0-9]+[a-z]?)?".  */
1511
1511
  {
1512
1512
    int dos_part = -1;
1513
1513
    int bsd_part = -1;
1521
1521
        for (p = os_dev + 5; *p; ++p)
1522
1522
          if (grub_isdigit(*p))
1523
1523
            {
1524
 
              p = strchr (p, 's');    /* msdos or apple (or ... ?) partition map */
 
1524
              p = strpbrk (p, "sp");    /* msdos or apple (or ... ?) partition map */
1525
1525
              if (p)
1526
1526
                {
1527
1527
                  p++;