Mercurial > illumos > illumos-gate
changeset 12323:c4a76aa91cfd
6913353 bootadm update-menu specifies wrong partition number in GRUB findroot OpenSolaris
author | Shidokht Yadegari <Shidokht.Yadegari@Sun.COM> |
---|---|
date | Thu, 06 May 2010 14:24:48 -0700 |
parents | 2d0b03fa06b5 |
children | 4bb2188bbac6 |
files | usr/src/lib/libfdisk/common/libfdisk.c |
diffstat | 1 files changed, 6 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/usr/src/lib/libfdisk/common/libfdisk.c Thu May 06 15:16:09 2010 -0600 +++ b/usr/src/lib/libfdisk/common/libfdisk.c Thu May 06 14:24:48 2010 -0700 @@ -19,8 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2010 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. + * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. */ #include <stdio.h> @@ -301,8 +300,10 @@ * for the linux swap signature. */ label_offset = (part_start + DK_LABEL_LOC) * sec_sz; - if ((rval = lseek(epp->dev_fd, label_offset, SEEK_SET)) < 0) + if (lseek(epp->dev_fd, label_offset, SEEK_SET) < 0) { + rval = EIO; goto done; + } if ((rval = read(epp->dev_fd, buf, sec_sz)) < sec_sz) { rval = EIO; @@ -325,7 +326,8 @@ seek_offset += part_start; seek_offset *= sec_sz; - if ((rval = lseek(epp->dev_fd, seek_offset, SEEK_SET)) < 0) { + if (lseek(epp->dev_fd, seek_offset, SEEK_SET) < 0) { + rval = EIO; break; }