diff options
| author | yu, larry liu - Sun Microsystems - Beijing China <Larry.Liu@Sun.COM> | 2009-06-17 19:20:05 +0800 |
|---|---|---|
| committer | yu, larry liu - Sun Microsystems - Beijing China <Larry.Liu@Sun.COM> | 2009-06-17 19:20:05 +0800 |
| commit | 65908c77dfc02644236ba18bffe67b5ed6f23135 (patch) | |
| tree | 90d89cc047a404c32e2537573bee1d8566a562e3 /usr/src/cmd/format/ctlr_ata.c | |
| parent | 6ccacea7930c58faadb6224d30e24c5658b67c81 (diff) | |
| download | illumos-joyent-65908c77dfc02644236ba18bffe67b5ed6f23135.tar.gz | |
PSARC 2008/769 Multiple disk sector size support.
6710930 Solaris needs to support large sector size hard drive disk
Diffstat (limited to 'usr/src/cmd/format/ctlr_ata.c')
| -rw-r--r-- | usr/src/cmd/format/ctlr_ata.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/usr/src/cmd/format/ctlr_ata.c b/usr/src/cmd/format/ctlr_ata.c index 2f417b9b78..c8f982d71b 100644 --- a/usr/src/cmd/format/ctlr_ata.c +++ b/usr/src/cmd/format/ctlr_ata.c @@ -19,7 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2008 Sun Microsystems, Inc. All rights reserved. + * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -155,7 +155,7 @@ ata_rdwr(int dir, int fd, diskaddr_t blk64, int secnt, caddr_t bufaddr, blkno = (blkaddr_t)blk64; bzero((caddr_t)&dadkio_rwcmd, sizeof (struct dadkio_rwcmd)); - tmpsec = secnt * 512; + tmpsec = secnt * cur_blksz; /* Doing raw read */ dadkio_rwcmd.cmd = (dir == DIR_READ) ? DADKIO_RWCMD_READ : @@ -213,12 +213,15 @@ ata_rdwr(int dir, int fd, diskaddr_t blk64, int secnt, caddr_t bufaddr, int ata_ck_format() { - unsigned char bufaddr[2048]; + char *bufaddr; int status; + bufaddr = (char *)zalloc(4 * cur_blksz); status = ata_rdwr(DIR_READ, cur_file, (diskaddr_t)1, 4, (caddr_t)bufaddr, 0, NULL); + free(bufaddr); + return (!status); } |
