Hello community, here is the log from the commit of package hdparm for openSUSE:Factory checked in at 2015-01-21 21:54:22 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/hdparm (Old) and /work/SRC/openSUSE:Factory/.hdparm.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "hdparm" Changes: -------- --- /work/SRC/openSUSE:Factory/hdparm/hdparm.changes 2014-12-16 14:50:33.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.hdparm.new/hdparm.changes 2015-01-21 21:54:25.000000000 +0100 @@ -1,0 +2,9 @@ +Sat Jan 17 19:05:36 UTC 2015 - p.drou...@gmail.com + +- Update to version 9.45 + * fixed blocksize handling in fibmap code to use result from + FIGETBSZ in more places + * fixed divide by zero exception in geom.c + * tidying up formatting in sgio.c + +------------------------------------------------------------------- Old: ---- hdparm-9.43.tar.gz New: ---- hdparm-9.45.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ hdparm.spec ++++++ --- /var/tmp/diff_new_pack.36Qf08/_old 2015-01-21 21:54:26.000000000 +0100 +++ /var/tmp/diff_new_pack.36Qf08/_new 2015-01-21 21:54:26.000000000 +0100 @@ -1,7 +1,7 @@ # # spec file for package hdparm # -# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -19,7 +19,7 @@ Name: hdparm PreReq: %fillup_prereq coreutils Provides: base:/sbin/hdparm -Version: 9.43 +Version: 9.45 Release: 0 Summary: A Program to get and set hard disk parameters License: SUSE-Permissive ++++++ hdparm-9.43.tar.gz -> hdparm-9.45.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hdparm-9.43/Changelog new/hdparm-9.45/Changelog --- old/hdparm-9.43/Changelog 2012-11-15 23:09:30.000000000 +0100 +++ new/hdparm-9.45/Changelog 2014-09-27 16:32:02.000000000 +0200 @@ -1,3 +1,14 @@ +hdparm-9.45: + - fixed blocksize handling in fibmap code to use result from FIGETBSZ in more places (Anton Altaparmakov). + - fixed divide by zero exception in geom.c + - tidying up formatting in sgio.c +hdparm-9.44: + - changed reg_flags struct to more closely match kernel definition (Lucas Magasweran). + - added fwdownload mode "E" support (Rusty Carruth). + - fix timeouts for security-erase (again!) + - change display of security "supported" to handle ambiguous reporting from drives + - don't rely upon C-library for byte-swapping + - added --dco-setmax support, courtesy of Geoff Papilion. hdparm-9.43 - rearrange flag execution so that the idle/standby/sleep "now" flags are executed last. hdparm-9.42 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hdparm-9.43/fibmap.c new/hdparm-9.45/fibmap.c --- old/hdparm-9.43/fibmap.c 2012-09-28 19:40:23.000000000 +0200 +++ new/hdparm-9.45/fibmap.c 2014-09-27 16:02:57.000000000 +0200 @@ -55,7 +55,7 @@ printf("%12llu %s %s\n", ext.byte_offset, lba_info, len_info); } -static int walk_fibmap (int fd, struct stat *st, unsigned int sectors_per_block, __u64 start_lba) +static int walk_fibmap (int fd, struct stat *st, unsigned int blksize, unsigned int sectors_per_block, __u64 start_lba) { struct file_extent ext; unsigned long num_blocks; @@ -67,12 +67,12 @@ * for each file block. This can be converted to a disk LBA using the filesystem * blocksize and LBA offset obtained earlier. */ - num_blocks = (st->st_size + st->st_blksize - 1) / st->st_blksize; + num_blocks = (st->st_size + blksize - 1) / blksize; memset(&ext, 0, sizeof(ext)); /* * Loop through the file, building a map of the extents. - * All of this is done in filesystem blocks size (fs_blksize) units. + * All of this is done in filesystem blocks size units. * * Assumptions: * Throughout the file, there can be any number of blocks backed by holes @@ -112,7 +112,7 @@ ext.first_block = blknum64; ext.last_block = blknum64 ? blknum64 : hole; ext.block_count = 1; - ext.byte_offset = blk_idx * st->st_blksize; + ext.byte_offset = blk_idx * blksize; } } handle_extent(ext, sectors_per_block, start_lba); @@ -274,7 +274,7 @@ err = walk_fiemap(fd, sectors_per_block, start_lba); if (err) - err = walk_fibmap(fd, &st, sectors_per_block, start_lba); + err = walk_fibmap(fd, &st, blksize, sectors_per_block, start_lba); close (fd); return 0; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hdparm-9.43/fwdownload.c new/hdparm-9.45/fwdownload.c --- old/hdparm-9.43/fwdownload.c 2009-07-23 14:53:35.000000000 +0200 +++ new/hdparm-9.45/fwdownload.c 2014-09-27 15:38:42.000000000 +0200 @@ -41,7 +41,10 @@ lba = ((offset / 512) << 8) | ((blockcount >> 8) & 0xff); r = malloc(sizeof(struct hdio_taskfile) + bytecount); if (!r) { - if (xfer_mode == 3) { putchar('\n'); fflush(stdout); } + if (xfer_mode == 3 || xfer_mode == 0x0e) { + putchar('\n'); + fflush(stdout); + } err = errno; perror("malloc()"); return err; @@ -49,19 +52,25 @@ init_hdio_taskfile(r, ATA_OP_DOWNLOAD_MICROCODE, RW_WRITE, LBA28_OK, lba, blockcount & 0xff, bytecount); r->lob.feat = xfer_mode; - r->oflags.lob.feat = 1; - r->iflags.lob.nsect = 1; + r->oflags.bits.lob.feat = 1; + r->iflags.bits.lob.nsect = 1; if (data && bytecount) memcpy(r->data, data, bytecount); if (do_taskfile_cmd(fd, r, timeout_secs)) { err = errno; - if (xfer_mode == 3) { putchar('\n'); fflush(stdout); } + if (xfer_mode == 3 || xfer_mode == 0x0e) { + putchar('\n'); + fflush(stdout); + } perror("FAILED"); } else { - if (xfer_mode == 3) { - if (!verbose) { putchar('.'); fflush(stdout); } + if (xfer_mode == 3 || xfer_mode == 0x0e) { + if (!verbose) { + putchar('.'); + fflush(stdout); + } switch (r->lob.nsect) { case 1: // drive wants more data case 2: // drive thinks it is all done @@ -127,6 +136,7 @@ err = ENOTSUP; goto done; } + if (xfer_mode == 0) { if ((id[119] & 0x10) && (id[120] & 0x10)) xfer_mode = 3; @@ -134,7 +144,7 @@ xfer_mode = 7; } - if (xfer_mode == 3 || xfer_mode == 30) { + if (xfer_mode == 3 || xfer_mode == 0x30 || xfer_mode == 0x0e) { /* the newer, segmented transfer mode */ xfer_min = id[234]; if (xfer_min == 0 || xfer_min == 0xffff) @@ -144,11 +154,15 @@ xfer_max = xfer_min; } - if (xfer_mode == 30) { // mode-3, using xfer_max + if (xfer_mode == 0x30) { // mode-3, using xfer_max xfer_mode = 3; xfer_size = xfer_max; } else if (xfer_mode == 3) { xfer_size = xfer_min; + } else if (xfer_mode == 0x0e) { + xfer_size = xfer_max; + } else if (xfer_mode == 0xe0) { + xfer_size = xfer_min; } else { xfer_size = st.st_size / 512; if (xfer_size > 0xffff) { @@ -174,7 +188,10 @@ if (offset >= st.st_size) { // transfer complete? err = 0; } else { - if (xfer_mode == 3) { putchar('\n'); fflush(stdout); } + if (xfer_mode == 3 || xfer_mode == 0x0e) { + putchar('\n'); + fflush(stdout); + } fprintf(stderr, "Error: drive completed transfer at %llu/%llu bytes\n", (unsigned long long)offset, (unsigned long long)st.st_size); err = EIO; @@ -189,7 +206,10 @@ break; } #endif - if (xfer_mode == 3) { putchar('\n'); fflush(stdout); } + if (xfer_mode == 3 || xfer_mode == 0x0e) { + putchar('\n'); + fflush(stdout); + } fprintf(stderr, "Error: drive expects more data than provided,\n"); fprintf(stderr, "but the transfer may have worked regardless.\n"); err = EIO; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hdparm-9.43/geom.c new/hdparm-9.45/geom.c --- old/hdparm-9.43/geom.c 2012-05-04 15:20:57.000000000 +0200 +++ new/hdparm-9.45/geom.c 2014-09-27 16:30:53.000000000 +0200 @@ -197,7 +197,8 @@ * On all (32 and 64 bit) systems, the cyls value is bit-limited. * So try and correct it using other info we have at hand. */ - if (nsectors && cyls && heads && sects) { + if (nsectors && cyls && heads && sects + && *nsectors && *cyls && *heads && *sects) { __u64 hs = (*heads) * (*sects); __u64 cyl = (*cyls); __u64 chs = cyl * hs; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hdparm-9.43/hdparm.8 new/hdparm-9.45/hdparm.8 --- old/hdparm-9.43/hdparm.8 2012-11-15 23:10:27.000000000 +0100 +++ new/hdparm-9.45/hdparm.8 2014-09-27 16:32:14.000000000 +0200 @@ -1,4 +1,4 @@ -.TH HDPARM 8 "November 2012" "Version 9.43" +.TH HDPARM 8 "September 2014" "Version 9.45" .SH NAME hdparm \- get/set SATA/IDE device parameters diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hdparm-9.43/hdparm.c new/hdparm-9.45/hdparm.c --- old/hdparm-9.43/hdparm.c 2012-11-15 23:08:51.000000000 +0100 +++ new/hdparm-9.45/hdparm.c 2014-09-27 16:05:14.000000000 +0200 @@ -38,7 +38,7 @@ extern const char *minor_str[]; -#define VERSION "v9.43" +#define VERSION "v9.45" #ifndef O_DIRECT #define O_DIRECT 040000 /* direct disk access, not easily obtained from headers */ @@ -91,7 +91,7 @@ static int security_master = 0, security_mode = 0; static int enhanced_erase = 0; static int set_security = 0; -static int do_dco_freeze = 0, do_dco_restore = 0, do_dco_identify = 0; +static int do_dco_freeze = 0, do_dco_restore = 0, do_dco_identify = 0, do_dco_setmax = 0; static unsigned int security_command = ATA_OP_SECURITY_UNLOCK; static char security_password[33], *fwpath; @@ -173,6 +173,28 @@ #define ENOIOCTLCMD ENOTTY #endif +#define DCO_CHECKSUM_WORDS 154 +// the DCO spec says that the checksum is the 2's compelement of the sum of all bytes in words 0-154 + byte 511. +static __u8 dco_verify_checksum(__u16 *dcobuffer) +{ + __u8 csum = 0; + int i; + + for(i = 0; i < DCO_CHECKSUM_WORDS; i++) { + csum += (dcobuffer[i] & 0xFF); + csum += (dcobuffer[i] >> 8); + } + // The INTEL drives have a byte OUTSIDE of the valid checksum area, + // and they erroneously include it in the checksum! WARNING: KLUDGE! + if (dcobuffer[208] != 0) { + csum += (dcobuffer[208] & 0xFF); + csum += (dcobuffer[208] >> 8); + } + // get the signature byte + csum += (dcobuffer[255] & 0xFF); + return (0-csum); +} + static void flush_buffer_cache (int fd) { sync(); @@ -708,6 +730,9 @@ get_identify_data(fd); if (id) { + __u64 lba_limit = get_lba_capacity(id); + __u64 estimate = (lba_limit / 2048ULL) / 30ULL / 60; + estimate += 30; /* fudge factor.. add another 30 minutes */ timeout = id[idx]; if (timeout && timeout <= 0xff) { /* @@ -715,19 +740,16 @@ * but we really want a better idea than that. * Norman Diamond suggests allowing 1sec per 30MB of capacity. */ - if (timeout == 0xff) { - __u64 lba_limit = get_lba_capacity(id); - __u64 estimate = (lba_limit / 2048ULL) / 30ULL / 60; - timeout = 508 + 60; /* spec says > 508 minutes */ - if (timeout < estimate) - timeout = estimate; - } else { - timeout = (timeout * 2) + 30; /* Add on a 30min margin */ - } + if (timeout == 0xff) + timeout = 508 + 90; /* spec says > 508 minutes */ + else + timeout = (timeout * 2) + 60; /* Add on a 60min margin */ } + if (timeout < estimate) + timeout = estimate; } if (!timeout) - timeout = 2 * 60; /* default: two hours */ + timeout = 12 * 60; /* default: twelve hours */ timeout *= 60; /* convert minutes to seconds */ return timeout; } @@ -752,14 +774,14 @@ r->dphase = TASKFILE_DPHASE_PIO_OUT; r->obytes = 512; r->lob.command = security_command; - r->oflags.lob.nsect = 1; + r->oflags.bits.lob.nsect = 1; r->lob.nsect = 1; data = (__u8*)r->data; data[0] = security_master & 0x01; memcpy(data+2, security_password, 32); - r->oflags.lob.command = 1; - r->oflags.lob.feat = 1; + r->oflags.bits.lob.command = 1; + r->oflags.bits.lob.feat = 1; switch (security_command) { case ATA_OP_SECURITY_ERASE_UNIT: @@ -883,8 +905,10 @@ } /* byte-swap the little-endian IDENTIFY data to match byte-order on host CPU */ id = (void *)(args + 4); - for (i = 0; i < 0x100; ++i) - __le16_to_cpus(&id[i]); + for (i = 0; i < 0x100; ++i) { + unsigned char *b = (unsigned char *)&id[i]; + id[i] = b[0] | (b[1] << 8); /* le16_to_cpu() */ + } } static void confirm_i_know_what_i_am_doing (const char *opt, const char *explanation) @@ -934,8 +958,8 @@ #else int word; for (word = 0; word < 8; ++word) { - printf("%04x", le16toh(w[0])); - ++w; + unsigned char *b = (unsigned char *)w++; + printf("%02x%02x", b[0], b[1]); putchar(word == 7 ? '\n' : ' '); } #endif @@ -991,13 +1015,78 @@ return NULL; } else { /* byte-swap the little-endian DCO data to match byte-order on host CPU */ - for (i = 0; i < 0x100; ++i) - __le16_to_cpus(&dco[i]); + for (i = 0; i < 0x100; ++i) { + unsigned char *b = (unsigned char *)&dco[i]; + dco[i] = b[0] | (b[1] << 8); /* le16_to_cpu */ + } //dump_sectors(dco, 1); return dco; } } +static void +do_dco_setmax_cmd (int fd) +{ + int err = 0; + struct hdio_taskfile *r; + __u8 *data; + __u16 *dco = (__u16 *) NULL; + + r = malloc(sizeof(struct hdio_taskfile) + 512); + if (!r) { + err = errno; + perror("malloc()"); + exit(err); + } + + // first, get the dco data + dco = get_dco_identify_data(fd, 0); + if (dco != ((__u16 *) NULL)) { + __u64 *maxlba = (__u64 *) &dco[3]; + + // first, check DCO checksum + if (dco_verify_checksum(dco) != (dco[255] >> 8)) { + printf("DCO Checksum FAILED!\n"); + exit(1); + } + if (verbose) { + printf("Original DCO:\n"); + dump_sectors(dco, 1); + } + // set the new MAXLBA to the requested sectors - 1 + *maxlba = set_max_addr - 1; + // recalculate the checksum + dco[255] = (dco[255] & 0xFF) | ((__u16) dco_verify_checksum(dco) << 8); + if (verbose) { + printf("New DCO:\n"); + dump_sectors(dco, 1); + } + + } else { + printf("DCO data is NULL!\n"); + exit(1); + } + memset(r, 0, sizeof(struct hdio_taskfile) + 512); + r->cmd_req = TASKFILE_CMD_REQ_OUT; + r->dphase = TASKFILE_DPHASE_PIO_OUT; + r->obytes = 512; + r->lob.command = ATA_OP_DCO; + r->oflags.bits.lob.command = 1; + r->lob.feat = 0xc3; + r->oflags.bits.lob.feat = 1; + data = (__u8*)r->data; + // copy data from new dco to output buffer + memcpy(data, (__u8*) dco, 512); + if ((do_taskfile_cmd(fd, r, timeout_15secs))) { + err = errno; + perror("DEVICE CONFIGURATION SET"); + } + free(r); + if (err) + exit(err); +} + + static __u64 do_get_native_max_sectors (int fd) { int err = 0; @@ -1010,18 +1099,18 @@ memset(&r, 0, sizeof(r)); r.cmd_req = TASKFILE_CMD_REQ_NODATA; r.dphase = TASKFILE_DPHASE_NONE; - r.oflags.lob.dev = 1; - r.oflags.lob.command = 1; - r.iflags.lob.command = 1; - r.iflags.lob.lbal = 1; - r.iflags.lob.lbam = 1; - r.iflags.lob.lbah = 1; + r.oflags.bits.lob.dev = 1; + r.oflags.bits.lob.command = 1; + r.iflags.bits.lob.command = 1; + r.iflags.bits.lob.lbal = 1; + r.iflags.bits.lob.lbam = 1; + r.iflags.bits.lob.lbah = 1; r.lob.dev = 0x40; if (((id[83] & 0xc400) == 0x4400) && (id[86] & 0x0400)) { - r.iflags.hob.lbal = 1; - r.iflags.hob.lbam = 1; - r.iflags.hob.lbah = 1; + r.iflags.bits.hob.lbal = 1; + r.iflags.bits.hob.lbam = 1; + r.iflags.bits.hob.lbah = 1; r.lob.command = ATA_OP_READ_NATIVE_MAX_EXT; if (do_taskfile_cmd(fd, &r, 10)) { err = errno; @@ -1034,7 +1123,7 @@ | ((r.lob.lbah << 16) | (r.lob.lbam << 8) | r.lob.lbal)) + 1; } } else { - r.iflags.lob.dev = 1; + r.iflags.bits.lob.dev = 1; r.lob.command = ATA_OP_READ_NATIVE_MAX; if (do_taskfile_cmd(fd, &r, 0)) { err = errno; @@ -1072,7 +1161,7 @@ "This operation will probably fail (continuing regardless).\n"); } init_hdio_taskfile(r, ATA_OP_WRITE_UNC_EXT, RW_READ, LBA48_FORCE, lba, 1, 0); - r->oflags.lob.feat = 1; + r->oflags.bits.lob.feat = 1; r->lob.feat = make_bad_sector_flagged ? 0xaa : 0x55; flagged = make_bad_sector_flagged ? "flagged" : "pseudo"; printf("Corrupting sector %llu (WRITE_UNC_EXT as %s): ", lba, flagged); @@ -1225,16 +1314,11 @@ extract_id_string (__u16 *idw, int words, char *dst) { char *e; - int i, max = words * 2; + int bytes = words * 2; - for (i = 0; i < words; ++i) { - __u16 w = idw[i]; - w = __be16_to_cpu(w); - dst[i*2 ] = w >> 8; - dst[i*2+1] = w; - } - dst[max] = '\0'; - for (e = dst + max; --e != dst;) { + memcpy(dst, idw, bytes); + dst[bytes] = '\0'; + for (e = dst + bytes; --e != dst;) { if (*e && *e != ' ') break; *e = '\0'; @@ -1392,7 +1476,7 @@ abort_if_not_full_device(fd, 0, devname, NULL); init_hdio_taskfile(&r, ATA_OP_IDLEIMMEDIATE, RW_READ, LBA28_OK, 0x0554e4c, 0, 0); - r.oflags.lob.feat = 1; + r.oflags.bits.lob.feat = 1; r.lob.feat = 0x44; if (do_taskfile_cmd(fd, &r, 0)) { @@ -1415,7 +1499,7 @@ init_hdio_taskfile(&r, ATA_OP_SET_MAX_EXT, RW_READ, LBA48_FORCE, max_lba, nsect, 0); } else { init_hdio_taskfile(&r, ATA_OP_SET_MAX, RW_READ, LBA28_OK, max_lba, nsect, 0); - r.oflags.lob.feat = 1; /* this ATA op requires feat==0 */ + r.oflags.bits.lob.feat = 1; /* this ATA op requires feat==0 */ } /* spec requires that we do this immediately in front.. racey */ @@ -1487,6 +1571,7 @@ " --dco-freeze Freeze/lock current device configuration until next power cycle\n" " --dco-identify Read/dump device configuration identify data\n" " --dco-restore Reset device configuration back to factory defaults\n" + " --dco-setmax Use DCO to set maximum addressable sectors\n" " --direct Use O_DIRECT to bypass page cache for timings\n" " --drq-hsm-error Crash system with a \"stuck DRQ\" error (VERY DANGEROUS)\n" " --fallocate Create a file without writing data to disk\n" @@ -1495,6 +1580,8 @@ " --fwdownload-mode3 Download firmware using min-size segments (EXTREMELY DANGEROUS)\n" " --fwdownload-mode3-max Download firmware using max-size segments (EXTREMELY DANGEROUS)\n" " --fwdownload-mode7 Download firmware using a single segment (EXTREMELY DANGEROUS)\n" + " --fwdownload-modee Download firmware using mode E (min-size segments) (EXTREMELY DANGEROUS)\n" + " --fwdownload-modee-max Download firmware using mode E (max-size segments) (EXTREMELY DANGEROUS)\n" " --idle-immediate Idle drive immediately\n" " --idle-unload Idle immediately and unload heads\n" " --Istdin Read identify data from stdin as ASCII hex\n" @@ -1872,8 +1959,13 @@ } if (do_dco_identify) { __u16 *dco = get_dco_identify_data(fd, 0); - if (dco) + if (dco) { + if (dco_verify_checksum(dco) == (dco[255] >> 8)) + printf("DCO Checksum verified.\n"); + else + printf("DCO Checksum FAILED!\n"); dco_identify_print(dco); + } } if (do_dco_restore) { __u8 args[4] = {ATA_OP_DCO,0,0xc0,0}; @@ -1892,6 +1984,20 @@ perror(" HDIO_DRIVE_CMD(dco_freeze) failed"); } } + if (do_dco_setmax) { + get_identify_data(fd); + if (id) { + if (set_max_addr < get_lba_capacity(id)) + confirm_i_know_what_i_am_doing("--dco-setmax", "You have requested reducing the apparent size of the drive.\nThis is a BAD idea, and can easily destroy all of the drive's contents."); + + // set max sectors with DCO set command + printf("issuing DCO set command (sectors = %llu)\n", set_max_addr); + do_dco_setmax_cmd(fd); + + // invalidate current IDENTIFY data + id = NULL; + } + } if (security_freeze) { __u8 args[4] = {ATA_OP_SECURITY_FREEZE_LOCK,0,0,0}; printf(" issuing security freeze command\n"); @@ -2512,6 +2618,12 @@ } static void +get_set_max_sectors_parms_dco (void) +{ + do_dco_setmax = get_u64_parm(0, 0, NULL, &set_max_addr, 1, lba_limit, "--dco-setmax", lba_emsg); +} + +static void handle_standalone_longarg (char *name) { if (num_flags_processed) { @@ -2531,6 +2643,8 @@ } if (0 == strcasecmp(name, "dco-restore")) { do_dco_restore = 1; + } else if (0 == strcasecmp(name, "dco-setmax")) { + get_set_max_sectors_parms_dco(); } else if (0 == strcasecmp(name, "security-help")) { security_help(0); exit(0); @@ -2640,10 +2754,18 @@ get_filename_parm(&fwpath, name); do_fwdownload = 1; xfer_mode = 3; + } else if (0 == strcasecmp(name, "fwdownload-modee")) { + get_filename_parm(&fwpath, name); + do_fwdownload = 1; + xfer_mode = 0xe; + } else if (0 == strcasecmp(name, "fwdownload-modee-max")) { + get_filename_parm(&fwpath, name); + do_fwdownload = 1; + xfer_mode = 0xe0; } else if (0 == strcasecmp(name, "fwdownload-mode3-max")) { get_filename_parm(&fwpath, name); do_fwdownload = 1; - xfer_mode = 30; + xfer_mode = 0x30; } else if (0 == strcasecmp(name, "fwdownload-mode7")) { get_filename_parm(&fwpath, name); do_fwdownload = 1; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hdparm-9.43/hdparm.h new/hdparm-9.45/hdparm.h --- old/hdparm-9.43/hdparm.h 2012-01-06 17:38:59.000000000 +0100 +++ new/hdparm-9.45/hdparm.h 2014-09-27 15:31:18.000000000 +0200 @@ -20,7 +20,7 @@ int get_dev_t_geometry (dev_t dev, __u32 *cyls, __u32 *heads, __u32 *sects, __u64 *start_lba, __u64 *nsectors); int do_filemap(const char *file_name); int do_fallocate_syscall (const char *name, __u64 bytecount); -int fwdownload(int fd, __u16 *id, const char *fwpath, int xfer_mode); +int fwdownload (int fd, __u16 *id, const char *fwpath, int xfer_mode); void dco_identify_print (__u16 *dco); int set_dvdspeed(int fd, int speed); int fd_is_raid (int fd); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hdparm-9.43/hdparm.lsm new/hdparm-9.45/hdparm.lsm --- old/hdparm-9.43/hdparm.lsm 2012-11-15 23:10:14.000000000 +0100 +++ new/hdparm-9.45/hdparm.lsm 2014-09-27 16:32:52.000000000 +0200 @@ -1,8 +1,10 @@ Begin4 Title: hdparm -Version: 9.43 -Entered-date: 2012-11-15 +Version: 9.45 +Entered-date: 2014-09-27 Description: hdparm - get/set hard disk parameters for Linux SATA/IDE drives. + v9.45 fixed fibmap block size; other minor stuff. + v9.44 better sgio compatibility with kernel; fwdownload mode "E"; longer erase timeout; etc. v9.43 rearrange flag execution so that the idle/standby/sleep "now" flags are executed last. v9.42 lots of fixes from the sourceforge queue v9.41 updated SCT identification, other small fixes. @@ -117,7 +119,7 @@ Maintained-by: ml...@pobox.com (Mark Lord) Primary-site: http://sourceforge.net/projects/hdparm/ Alternate-site: http://www.ibiblio.org/pub/Linux/system/hardware - 127K hdparm-9.43.tar.gz + 129K hdparm-9.45.tar.gz 4K hdparm.lsm Platforms: Linux Copying-policy: BSD License diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hdparm-9.43/identify.c new/hdparm-9.45/identify.c --- old/hdparm-9.43/identify.c 2012-09-28 18:55:17.000000000 +0200 +++ new/hdparm-9.45/identify.c 2013-10-29 13:42:31.000000000 +0100 @@ -1307,7 +1307,7 @@ printf("\t\tRemovable Media Status Notification feature set supported\n"); /* security */ - if((eqpt != CDROM) && (like_std > 3) && (val[SECU_STATUS] || val[ERASE_TIME] || val[ENH_ERASE_TIME])) + if((val[CMDS_SUPP_2] & 2) && (eqpt != CDROM) && (like_std > 3) && (val[SECU_STATUS] || val[ERASE_TIME] || val[ENH_ERASE_TIME])) { printf("Security: \n"); if(val[PSWD_CODE] && (val[PSWD_CODE] != 0xffff)) @@ -1315,7 +1315,7 @@ jj = val[SECU_STATUS]; if(jj) { for (ii = 0; ii < NUM_SECU_STR; ii++) { - if(!(jj & 0x0001)) printf("\tnot\t"); + if(!(jj & 0x0001)) printf("%s", ii ? "\tnot\t" : "\t(?)\t"); else printf("\t\t"); printf("%s\n",secu_str[ii]); jj >>=1; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hdparm-9.43/sgio.c new/hdparm-9.45/sgio.c --- old/hdparm-9.43/sgio.c 2012-09-28 19:29:24.000000000 +0200 +++ new/hdparm-9.45/sgio.c 2014-09-27 16:14:14.000000000 +0200 @@ -430,38 +430,38 @@ tf_init(&tf, 0, 0, 0); #if 1 /* debugging */ if (verbose) { - printf("oflags.lob_all=0x%02x, flags={", r->oflags.lob_all); - if (r->oflags.lob.feat) printf(" feat"); - if (r->oflags.lob.nsect)printf(" nsect"); - if (r->oflags.lob.lbal) printf(" lbal"); - if (r->oflags.lob.lbam) printf(" lbam"); - if (r->oflags.lob.lbah) printf(" lbah"); - if (r->oflags.lob.dev) printf(" dev"); - if (r->oflags.lob.command) printf(" command"); + printf("oflags.bits.lob_all=0x%02x, flags={", r->oflags.bits.lob_all); + if (r->oflags.bits.lob.feat) printf(" feat"); + if (r->oflags.bits.lob.nsect) printf(" nsect"); + if (r->oflags.bits.lob.lbal) printf(" lbal"); + if (r->oflags.bits.lob.lbam) printf(" lbam"); + if (r->oflags.bits.lob.lbah) printf(" lbah"); + if (r->oflags.bits.lob.dev) printf(" dev"); + if (r->oflags.bits.lob.command) printf(" command"); printf(" }\n"); - printf("oflags.hob_all=0x%02x, flags={", r->oflags.hob_all); - if (r->oflags.hob.feat) printf(" feat"); - if (r->oflags.hob.nsect)printf(" nsect"); - if (r->oflags.hob.lbal) printf(" lbal"); - if (r->oflags.hob.lbam) printf(" lbam"); - if (r->oflags.hob.lbah) printf(" lbah"); + printf("oflags.bits.hob_all=0x%02x, flags={", r->oflags.bits.hob_all); + if (r->oflags.bits.hob.feat) printf(" feat"); + if (r->oflags.bits.hob.nsect) printf(" nsect"); + if (r->oflags.bits.hob.lbal) printf(" lbal"); + if (r->oflags.bits.hob.lbam) printf(" lbam"); + if (r->oflags.bits.hob.lbah) printf(" lbah"); printf(" }\n"); } #endif - if (r->oflags.lob.feat) tf.lob.feat = r->lob.feat; - if (r->oflags.lob.lbal) tf.lob.lbal = r->lob.lbal; - if (r->oflags.lob.nsect) tf.lob.nsect = r->lob.nsect; - if (r->oflags.lob.lbam) tf.lob.lbam = r->lob.lbam; - if (r->oflags.lob.lbah) tf.lob.lbah = r->lob.lbah; - if (r->oflags.lob.dev) tf.dev = r->lob.dev; - if (r->oflags.lob.command) tf.command = r->lob.command; - if (needs_lba48(tf.command,0,0) || r->oflags.hob_all || r->iflags.hob_all) { + if (r->oflags.bits.lob.feat) tf.lob.feat = r->lob.feat; + if (r->oflags.bits.lob.lbal) tf.lob.lbal = r->lob.lbal; + if (r->oflags.bits.lob.nsect) tf.lob.nsect = r->lob.nsect; + if (r->oflags.bits.lob.lbam) tf.lob.lbam = r->lob.lbam; + if (r->oflags.bits.lob.lbah) tf.lob.lbah = r->lob.lbah; + if (r->oflags.bits.lob.dev) tf.dev = r->lob.dev; + if (r->oflags.bits.lob.command) tf.command = r->lob.command; + if (needs_lba48(tf.command,0,0) || r->oflags.bits.hob_all || r->iflags.bits.hob_all) { tf.is_lba48 = 1; - if (r->oflags.hob.feat) tf.hob.feat = r->hob.feat; - if (r->oflags.hob.lbal) tf.hob.lbal = r->hob.lbal; - if (r->oflags.hob.nsect)tf.hob.nsect = r->hob.nsect; - if (r->oflags.hob.lbam) tf.hob.lbam = r->hob.lbam; - if (r->oflags.hob.lbah) tf.hob.lbah = r->hob.lbah; + if (r->oflags.bits.hob.feat) tf.hob.feat = r->hob.feat; + if (r->oflags.bits.hob.lbal) tf.hob.lbal = r->hob.lbal; + if (r->oflags.bits.hob.nsect) tf.hob.nsect = r->hob.nsect; + if (r->oflags.bits.hob.lbam) tf.hob.lbam = r->hob.lbam; + if (r->oflags.bits.hob.lbah) tf.hob.lbah = r->hob.lbah; if (verbose) fprintf(stderr, "using LBA48 taskfile\n"); } @@ -485,18 +485,18 @@ } if (rc == 0 || errno == EIO) { - if (r->iflags.lob.feat) r->lob.feat = tf.error; - if (r->iflags.lob.lbal) r->lob.lbal = tf.lob.lbal; - if (r->iflags.lob.nsect) r->lob.nsect = tf.lob.nsect; - if (r->iflags.lob.lbam) r->lob.lbam = tf.lob.lbam; - if (r->iflags.lob.lbah) r->lob.lbah = tf.lob.lbah; - if (r->iflags.lob.dev) r->lob.dev = tf.dev; - if (r->iflags.lob.command) r->lob.command = tf.status; - if (r->iflags.hob.feat) r->hob.feat = tf.hob.feat; - if (r->iflags.hob.lbal) r->hob.lbal = tf.hob.lbal; - if (r->iflags.hob.nsect) r->hob.nsect = tf.hob.nsect; - if (r->iflags.hob.lbam) r->hob.lbam = tf.hob.lbam; - if (r->iflags.hob.lbah) r->hob.lbah = tf.hob.lbah; + if (r->iflags.bits.lob.feat) r->lob.feat = tf.error; + if (r->iflags.bits.lob.lbal) r->lob.lbal = tf.lob.lbal; + if (r->iflags.bits.lob.nsect) r->lob.nsect = tf.lob.nsect; + if (r->iflags.bits.lob.lbam) r->lob.lbam = tf.lob.lbam; + if (r->iflags.bits.lob.lbah) r->lob.lbah = tf.lob.lbah; + if (r->iflags.bits.lob.dev) r->lob.dev = tf.dev; + if (r->iflags.bits.lob.command) r->lob.command = tf.status; + if (r->iflags.bits.hob.feat) r->hob.feat = tf.hob.feat; + if (r->iflags.bits.hob.lbal) r->hob.lbal = tf.hob.lbal; + if (r->iflags.bits.hob.nsect) r->hob.nsect = tf.hob.nsect; + if (r->iflags.bits.hob.lbam) r->hob.lbam = tf.hob.lbam; + if (r->iflags.bits.hob.lbah) r->hob.lbah = tf.hob.lbah; } return rc; @@ -512,18 +512,18 @@ if (verbose) { int err = errno; fprintf(stderr, "rc=%d, errno=%d, returned ATA registers: ", rc, err); - if (r->iflags.lob.feat) fprintf(stderr, " er=%02x", r->lob.feat); - if (r->iflags.lob.nsect) fprintf(stderr, " ns=%02x", r->lob.nsect); - if (r->iflags.lob.lbal) fprintf(stderr, " ll=%02x", r->lob.lbal); - if (r->iflags.lob.lbam) fprintf(stderr, " lm=%02x", r->lob.lbam); - if (r->iflags.lob.lbah) fprintf(stderr, " lh=%02x", r->lob.lbah); - if (r->iflags.lob.dev) fprintf(stderr, " dh=%02x", r->lob.dev); - if (r->iflags.lob.command) fprintf(stderr, " st=%02x", r->lob.command); - if (r->iflags.hob.feat) fprintf(stderr, " err=%02x", r->hob.feat); - if (r->iflags.hob.nsect) fprintf(stderr, " err=%02x", r->hob.nsect); - if (r->iflags.hob.lbal) fprintf(stderr, " err=%02x", r->hob.lbal); - if (r->iflags.hob.lbam) fprintf(stderr, " err=%02x", r->hob.lbam); - if (r->iflags.hob.lbah) fprintf(stderr, " err=%02x", r->hob.lbah); + if (r->iflags.bits.lob.feat) fprintf(stderr, " er=%02x", r->lob.feat); + if (r->iflags.bits.lob.nsect) fprintf(stderr, " ns=%02x", r->lob.nsect); + if (r->iflags.bits.lob.lbal) fprintf(stderr, " ll=%02x", r->lob.lbal); + if (r->iflags.bits.lob.lbam) fprintf(stderr, " lm=%02x", r->lob.lbam); + if (r->iflags.bits.lob.lbah) fprintf(stderr, " lh=%02x", r->lob.lbah); + if (r->iflags.bits.lob.dev) fprintf(stderr, " dh=%02x", r->lob.dev); + if (r->iflags.bits.lob.command) fprintf(stderr, " st=%02x", r->lob.command); + if (r->iflags.bits.hob.feat) fprintf(stderr, " err=%02x", r->hob.feat); + if (r->iflags.bits.hob.nsect) fprintf(stderr, " err=%02x", r->hob.nsect); + if (r->iflags.bits.hob.lbal) fprintf(stderr, " err=%02x", r->hob.lbal); + if (r->iflags.bits.hob.lbam) fprintf(stderr, " err=%02x", r->hob.lbam); + if (r->iflags.bits.hob.lbah) fprintf(stderr, " err=%02x", r->hob.lbah); fprintf(stderr, "\n"); errno = err; } @@ -551,15 +551,15 @@ r->ibytes = data_bytes; } r->lob.command = ata_op; - r->oflags.lob.command = 1; - r->oflags.lob.dev = 1; - r->oflags.lob.lbal = 1; - r->oflags.lob.lbam = 1; - r->oflags.lob.lbah = 1; - r->oflags.lob.nsect = 1; + r->oflags.bits.lob.command = 1; + r->oflags.bits.lob.dev = 1; + r->oflags.bits.lob.lbal = 1; + r->oflags.bits.lob.lbam = 1; + r->oflags.bits.lob.lbah = 1; + r->oflags.bits.lob.nsect = 1; - r->iflags.lob.command = 1; - r->iflags.lob.feat = 1; + r->iflags.bits.lob.command = 1; + r->iflags.bits.lob.feat = 1; r->lob.nsect = nsect; r->lob.lbal = lba; @@ -572,10 +572,10 @@ r->hob.lbal = lba >> 24; r->hob.lbam = lba >> 32; r->hob.lbah = lba >> 40; - r->oflags.hob.nsect = 1; - r->oflags.hob.lbal = 1; - r->oflags.hob.lbam = 1; - r->oflags.hob.lbah = 1; + r->oflags.bits.hob.nsect = 1; + r->oflags.bits.hob.lbal = 1; + r->oflags.bits.hob.lbam = 1; + r->oflags.bits.hob.lbah = 1; } else { r->lob.dev |= (lba >> 24) & 0x0f; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hdparm-9.43/sgio.h new/hdparm-9.45/sgio.h --- old/hdparm-9.43/sgio.h 2012-09-28 19:25:46.000000000 +0200 +++ new/hdparm-9.45/sgio.h 2014-09-27 15:36:43.000000000 +0200 @@ -117,6 +117,7 @@ union reg_flags { unsigned all :16; + struct { union { unsigned lob_all : 8; struct { @@ -143,6 +144,7 @@ unsigned command : 1; } hob; }; + } bits; } __attribute__((packed)); struct taskfile_regs { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hdparm-9.43/sgio.h.xx new/hdparm-9.45/sgio.h.xx --- old/hdparm-9.43/sgio.h.xx 2012-09-28 19:25:46.000000000 +0200 +++ new/hdparm-9.45/sgio.h.xx 1970-01-01 01:00:00.000000000 +0100 @@ -1,233 +0,0 @@ -/* prototypes and stuff for ATA command ioctls */ - -#include <linux/types.h> - -enum { - ATA_OP_DSM = 0x06, // Data Set Management (TRIM) - ATA_OP_READ_PIO = 0x20, - ATA_OP_READ_PIO_ONCE = 0x21, - ATA_OP_READ_LONG = 0x22, - ATA_OP_READ_LONG_ONCE = 0x23, - ATA_OP_READ_PIO_EXT = 0x24, - ATA_OP_READ_DMA_EXT = 0x25, - ATA_OP_READ_FPDMA = 0x60, // NCQ - ATA_OP_WRITE_PIO = 0x30, - ATA_OP_WRITE_LONG = 0x32, - ATA_OP_WRITE_LONG_ONCE = 0x33, - ATA_OP_WRITE_PIO_EXT = 0x34, - ATA_OP_WRITE_DMA_EXT = 0x35, - ATA_OP_WRITE_FPDMA = 0x61, // NCQ - ATA_OP_READ_VERIFY = 0x40, - ATA_OP_READ_VERIFY_ONCE = 0x41, - ATA_OP_READ_VERIFY_EXT = 0x42, - ATA_OP_WRITE_UNC_EXT = 0x45, // lba48, no data, uses feat reg - ATA_OP_FORMAT_TRACK = 0x50, - ATA_OP_DOWNLOAD_MICROCODE = 0x92, - ATA_OP_STANDBYNOW2 = 0x94, - ATA_OP_CHECKPOWERMODE2 = 0x98, - ATA_OP_SLEEPNOW2 = 0x99, - ATA_OP_PIDENTIFY = 0xa1, - ATA_OP_READ_NATIVE_MAX = 0xf8, - ATA_OP_READ_NATIVE_MAX_EXT = 0x27, - ATA_OP_SMART = 0xb0, - ATA_OP_DCO = 0xb1, - ATA_OP_ERASE_SECTORS = 0xc0, - ATA_OP_READ_DMA = 0xc8, - ATA_OP_WRITE_DMA = 0xca, - ATA_OP_DOORLOCK = 0xde, - ATA_OP_DOORUNLOCK = 0xdf, - ATA_OP_STANDBYNOW1 = 0xe0, - ATA_OP_IDLEIMMEDIATE = 0xe1, - ATA_OP_SETIDLE = 0xe3, - ATA_OP_SET_MAX = 0xf9, - ATA_OP_SET_MAX_EXT = 0x37, - ATA_OP_SET_MULTIPLE = 0xc6, - ATA_OP_CHECKPOWERMODE1 = 0xe5, - ATA_OP_SLEEPNOW1 = 0xe6, - ATA_OP_FLUSHCACHE = 0xe7, - ATA_OP_FLUSHCACHE_EXT = 0xea, - ATA_OP_IDENTIFY = 0xec, - ATA_OP_SETFEATURES = 0xef, - ATA_OP_SECURITY_SET_PASS = 0xf1, - ATA_OP_SECURITY_UNLOCK = 0xf2, - ATA_OP_SECURITY_ERASE_PREPARE = 0xf3, - ATA_OP_SECURITY_ERASE_UNIT = 0xf4, - ATA_OP_SECURITY_FREEZE_LOCK = 0xf5, - ATA_OP_SECURITY_DISABLE = 0xf6, - ATA_OP_VENDOR_SPECIFIC_0x80 = 0x80, -}; - -/* - * Some useful ATA register bits - */ -enum { - ATA_USING_LBA = (1 << 6), - ATA_STAT_DRQ = (1 << 3), - ATA_STAT_ERR = (1 << 0), -}; - -/* - * Useful parameters for init_hdio_taskfile(): - */ -enum { RW_READ = 0, - RW_WRITE = 1, - LBA28_OK = 0, - LBA48_FORCE = 1, -}; - -/* - * Definitions and structures for use with SG_IO + ATA_16: - */ -struct ata_lba_regs { - __u8 feat; - __u8 nsect; - __u8 lbal; - __u8 lbam; - __u8 lbah; -}; -struct ata_tf { - __u8 dev; - __u8 command; - __u8 error; - __u8 status; - __u8 is_lba48; - struct ata_lba_regs lob; - struct ata_lba_regs hob; -}; - -/* - * Definitions and structures for use with HDIO_DRIVE_TASKFILE: - */ - -enum { - /* - * These (redundantly) specify the category of the request - */ - TASKFILE_CMD_REQ_NODATA = 0, /* ide: IDE_DRIVE_TASK_NO_DATA */ - TASKFILE_CMD_REQ_IN = 2, /* ide: IDE_DRIVE_TASK_IN */ - TASKFILE_CMD_REQ_OUT = 3, /* ide: IDE_DRIVE_TASK_OUT */ - TASKFILE_CMD_REQ_RAW_OUT= 4, /* ide: IDE_DRIVE_TASK_RAW_WRITE */ - /* - * These specify the method of transfer (pio, dma, multi, ..) - */ - TASKFILE_DPHASE_NONE = 0, /* ide: TASKFILE_IN */ - TASKFILE_DPHASE_PIO_IN = 1, /* ide: TASKFILE_IN */ - TASKFILE_DPHASE_PIO_OUT = 4, /* ide: TASKFILE_OUT */ -}; - -union reg_flags { - unsigned all :16; - union { - unsigned lob_all : 8; - struct { - unsigned data : 1; - unsigned feat : 1; - unsigned lbal : 1; - unsigned nsect : 1; - unsigned lbam : 1; - unsigned lbah : 1; - unsigned dev : 1; - unsigned command : 1; - } lob; - }; - union { - unsigned hob_all : 8; - struct { - unsigned data : 1; - unsigned feat : 1; - unsigned lbal : 1; - unsigned nsect : 1; - unsigned lbam : 1; - unsigned lbah : 1; - unsigned dev : 1; - unsigned command : 1; - } hob; - }; -} __attribute__((packed)); - -struct taskfile_regs { - __u8 data; - __u8 feat; - __u8 nsect; - __u8 lbal; - __u8 lbam; - __u8 lbah; - __u8 dev; - __u8 command; -}; - -struct hdio_taskfile { - struct taskfile_regs lob; - struct taskfile_regs hob; - union reg_flags oflags; - union reg_flags iflags; - int dphase; - int cmd_req; /* IDE command_type */ - unsigned long obytes; - unsigned long ibytes; - __u16 data[0]; -}; - -struct scsi_sg_io_hdr { - int interface_id; - int dxfer_direction; - unsigned char cmd_len; - unsigned char mx_sb_len; - unsigned short iovec_count; - unsigned int dxfer_len; - void * dxferp; - unsigned char * cmdp; - void * sbp; - unsigned int timeout; - unsigned int flags; - int pack_id; - void * usr_ptr; - unsigned char status; - unsigned char masked_status; - unsigned char msg_status; - unsigned char sb_len_wr; - unsigned short host_status; - unsigned short driver_status; - int resid; - unsigned int duration; - unsigned int info; -}; - -#ifndef SG_DXFER_NONE - #define SG_DXFER_NONE -1 - #define SG_DXFER_TO_DEV -2 - #define SG_DXFER_FROM_DEV -3 - #define SG_DXFER_TO_FROM_DEV -4 -#endif - -#define SG_READ 0 -#define SG_WRITE 1 - -#define SG_PIO 0 -#define SG_DMA 1 - -#define SG_CHECK_CONDITION 0x02 -#define SG_DRIVER_SENSE 0x08 - -#define SG_ATA_16 0x85 -#define SG_ATA_16_LEN 16 - -#define SG_ATA_12 0xa1 -#define SG_ATA_12_LEN 12 - -#define SG_ATA_LBA48 1 -#define SG_ATA_PROTO_NON_DATA ( 3 << 1) -#define SG_ATA_PROTO_PIO_IN ( 4 << 1) -#define SG_ATA_PROTO_PIO_OUT ( 5 << 1) -#define SG_ATA_PROTO_DMA ( 6 << 1) -#define SG_ATA_PROTO_UDMA_IN (11 << 1) /* not yet supported in libata */ -#define SG_ATA_PROTO_UDMA_OUT (12 << 1) /* not yet supported in libata */ - -void tf_init (struct ata_tf *tf, __u8 ata_op, __u64 lba, unsigned int nsect); -__u64 tf_to_lba (struct ata_tf *tf); -int sg16 (int fd, int rw, int dma, struct ata_tf *tf, void *data, unsigned int data_bytes, unsigned int timeout_secs); -int do_drive_cmd (int fd, unsigned char *args, unsigned int timeout); -int do_taskfile_cmd (int fd, struct hdio_taskfile *r, unsigned int timeout_secs); -int dev_has_sgio (int fd); -void init_hdio_taskfile (struct hdio_taskfile *r, __u8 ata_op, int rw, int force_lba48, - __u64 lba, unsigned int nsect, int data_bytes); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hdparm-9.43/wiper/wiper.sh new/hdparm-9.45/wiper/wiper.sh --- old/hdparm-9.43/wiper/wiper.sh 2012-09-28 20:08:37.000000000 +0200 +++ new/hdparm-9.45/wiper/wiper.sh 2013-08-09 01:58:23.000000000 +0200 @@ -2,7 +2,7 @@ # # SATA SSD free-space TRIM utility, by Mark Lord <ml...@pobox.com> -VERSION=3.5 +VERSION=3.6 # Copyright (C) 2009-2010 Mark Lord. All rights reserved. # @@ -681,7 +681,7 @@ exit 1 fi fi - echo -n "Creating temporary file (${tmpsize} KB).. " + echo -n "Allocating temporary file (${tmpsize} KB).. " if ! $HDPARM --fallocate "${tmpsize}" $tmpfile ; then echo "$target: this kernel may not support 'fallocate' on a $fstype filesystem, aborting." >&2 exit 1 -- To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org For additional commands, e-mail: opensuse-commit+h...@opensuse.org