aboutsummaryrefslogtreecommitdiff
path: root/miscutils/hdparm.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Some day, maybe gcc will be able to optimize out static functions that arelandley2006-06-081-1/+2
| | | | | | | never used so we don't have to #ifdef them. Wouldn't that be nice? git-svn-id: svn://busybox.net/trunk/busybox@15340 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Fix from Tito to read from stdin only when it's not a tty.landley2006-06-071-3/+3
| | | | git-svn-id: svn://busybox.net/trunk/busybox@15328 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Tito writes: this patch fixes two potential bugs with the -i -I flags that ↵vapier2006-06-071-2/+2
| | | | | | could be reset during option parsing git-svn-id: svn://busybox.net/trunk/busybox@15307 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Callers to identify() converted the endianness of the buffer. So didlandley2006-06-071-16/+16
| | | | | | | | | identify(). This meant big endian systems had a NUXI problem. Removed the redundant conversion from the callers, and made some in-passing cleanups while I was there. git-svn-id: svn://busybox.net/trunk/busybox@15301 69ca8d6d-28ef-0310-b511-8ec308f3f277
* - move #include busybox.h to the very top so we pull in the configaldot2006-06-031-3/+1
| | | | | | | and eventual platform specific includes in early. git-svn-id: svn://busybox.net/trunk/busybox@15273 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Patch from Tito to remove long options from hdparm.landley2006-05-311-22/+7
| | | | git-svn-id: svn://busybox.net/trunk/busybox@15254 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Add SWAP_LE?? and SWAP_BE?? macros, and make things use them. Converts valueslandley2006-05-291-7/+5
| | | | | | | | to/from little endian or big endian, which is a NOP if that's what the current platform already is. git-svn-id: svn://busybox.net/trunk/busybox@15215 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Fix hdparm to use PRIu64 instead of typecasting to long long (which is 128 bitslandley2006-05-281-4/+4
| | | | | | | on 64 bit platforms), and move #include <inttypes.h> to libbb.h. git-svn-id: svn://busybox.net/trunk/busybox@15208 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Consolidate #include <sys/time.h> so libbb.h does it.landley2006-05-271-1/+0
| | | | git-svn-id: svn://busybox.net/trunk/busybox@15203 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Yann E. MORIN. writes:vapier2006-05-261-1/+1
| | | | | | | | | hdparm has a uint64_t passed to printf with a %llu format (which is ok, because it's the same size), but without first being casted(?) to unsigned long long int. Which is kinda funny because it's done OK on a few lines above... git-svn-id: svn://busybox.net/trunk/busybox@15180 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Patch from Tito:landley2006-05-251-168/+123
| | | | | | | | | | | | | | | | | | | | | | Remove -v verbose -V version -q quiet flags Remove parse_opt_v2(); Rename parse_opt_v3() to parse_xfermode() Remove if_strcat() Rearrange code in  dump_identity() to reduce size Modify some strings so that they could be optimized by the compiler Minor code clean up Remove unneeded #define <shm.h> #if BB_BIG_ENDIAN && !defined(__USE_XOPEN) # define __USE_XOPEN #endif     Must be before #include <unistd.h> and #include "busybox.h" (noticed by Bernhard Fischer <rep.nop@aon.at>) Remove duplicate code in do_time() git-svn-id: svn://busybox.net/trunk/busybox@15169 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Patch from tito to replace shared memory usage with mlock(), slightly tweakedlandley2006-05-191-24/+10
| | | | | | | by me. git-svn-id: svn://busybox.net/trunk/busybox@15136 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Largeish cleanup patch from Tito, mostly if statement therapy.landley2006-05-161-534/+350
| | | | git-svn-id: svn://busybox.net/trunk/busybox@15089 69ca8d6d-28ef-0310-b511-8ec308f3f277
* typecast bbig to kill format warningsvapier2006-05-111-3/+3
| | | | git-svn-id: svn://busybox.net/trunk/busybox@15060 69ca8d6d-28ef-0310-b511-8ec308f3f277
* The if() is cheaper than the extra function parameter. According to makelandley2006-05-081-26/+26
| | | | | | | bloatcheck, this saves 112 bytes on x86... git-svn-id: svn://busybox.net/trunk/busybox@15034 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Cleanup patch from tito.landley2006-05-071-379/+158
| | | | git-svn-id: svn://busybox.net/trunk/busybox@15028 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Patch from Dennis Vlasenko resetting values that get reused.landley2006-05-051-5/+18
| | | | git-svn-id: svn://busybox.net/trunk/busybox@15007 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Remove HDIO_GETGEO_BIG which is dead (removed from 2.6) and was pointless backlandley2006-05-031-12/+4
| | | | | | | | | | | | in 2.4 (it fetched the same hd_geometry struct only with uint cylinders instead of ushort cylinders: nothing that big has ever accurately reported gemoetry, it's all LBA. Also stop declaring the hd_geometry struct static: it's two chars, a short, and a long for a grand total of 8 bytes. That can go on the stack. git-svn-id: svn://busybox.net/trunk/busybox@14983 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Use ATTRIBUTE_NORETURN as suggested by tito, plus a few in-passing cleanups.landley2006-05-031-16/+13
| | | | git-svn-id: svn://busybox.net/trunk/busybox@14982 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Patch from tito removing obsolete code.landley2006-05-011-142/+11
| | | | git-svn-id: svn://busybox.net/trunk/busybox@14977 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Remove some unused code pointed out by Tito, plus a slightly more gracefullandley2006-04-291-35/+7
| | | | | | | way of handling endianness. git-svn-id: svn://busybox.net/trunk/busybox@14971 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Style fixes from Denis Vlasenko.landley2006-04-291-147/+146
| | | | git-svn-id: svn://busybox.net/trunk/busybox@14970 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Another patch from Denis Vlasenko:landley2006-04-291-48/+42
| | | | | | | | | | | | Make hdparm smaller: * Make bb_ioctl return the status * Replace ioctl with bb_ioctl in a few places * Add bb_ioctl_alt, use where appropriate (four places) * unsigned char args1[4+512] = {WIN_IDENTIFY,0,0,1,}; ate 0.5k of rodata, fix that git-svn-id: svn://busybox.net/trunk/busybox@14969 69ca8d6d-28ef-0310-b511-8ec308f3f277
* From Dennis Vlasenko, Make hdparm smaller:landley2006-04-291-73/+49
| | | | | | | | * Use combined no_scsi_no_xt() * Have common unsigned char args[4] = {WIN_SETFEATURES,0,0,0}; git-svn-id: svn://busybox.net/trunk/busybox@14968 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Cleanup to hdparm by tito.landley2006-04-291-12/+11
| | | | git-svn-id: svn://busybox.net/trunk/busybox@14967 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Patch from tito to update output of hdparm.landley2006-04-281-12/+22
| | | | git-svn-id: svn://busybox.net/trunk/busybox@14950 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Patch from Tito to fix printing null and make output look like hdparm 6.3.landley2006-04-171-5/+5
| | | | git-svn-id: svn://busybox.net/trunk/busybox@14902 69ca8d6d-28ef-0310-b511-8ec308f3f277
* use more boiler plate GPL noticesvapier2006-04-161-3/+1
| | | | git-svn-id: svn://busybox.net/trunk/busybox@14890 69ca8d6d-28ef-0310-b511-8ec308f3f277
* - tweak visibility of label expected_hwif_error as it's only needed foraldot2006-04-111-0/+2
| | | | | | | CONFIG_FEATURE_HDPARM_HDIO_UNREGISTER_HWIF or CONFIG_FEATURE_HDPARM_HDIO_SCAN_HWIF git-svn-id: svn://busybox.net/trunk/busybox@14815 69ca8d6d-28ef-0310-b511-8ec308f3f277
* - make sure that the label expected_hwif_error is visible even whenaldot2006-04-051-15/+3
| | | | | | | CONFIG_FEATURE_HDPARM_HDIO_SCAN_HWIF isn't set. git-svn-id: svn://busybox.net/trunk/busybox@14757 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Patch from Denis Vlasenko to add xstat() and use it.landley2006-03-131-2/+1
| | | | git-svn-id: svn://busybox.net/trunk/busybox@14530 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Patch from Robert P. Day, moving byte order checks to use platform.h macros.landley2006-03-041-2/+2
| | | | git-svn-id: svn://busybox.net/trunk/busybox@14448 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Patch from Denis Vlasenko to constify things and fix a few typos.landley2006-02-221-1/+3
| | | | git-svn-id: svn://busybox.net/trunk/busybox@14210 69ca8d6d-28ef-0310-b511-8ec308f3f277
* fix up yet more annoying signed/unsigned and mixed type errorsandersen2006-01-301-3/+3
| | | | git-svn-id: svn://busybox.net/trunk/busybox@13732 69ca8d6d-28ef-0310-b511-8ec308f3f277
* just whitespacetimr2006-01-251-36/+36
| | | | git-svn-id: svn://busybox.net/trunk/busybox@13584 69ca8d6d-28ef-0310-b511-8ec308f3f277
* data --> codevodz2005-10-151-51/+52
| | | | git-svn-id: svn://busybox.net/trunk/busybox@11871 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Patch from Bernhard Fischer to make a bunch of symbols staticandersen2005-04-161-2/+2
| | | | | | | which were otherwise cluttering the global namespace. git-svn-id: svn://busybox.net/trunk/busybox@10121 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Avoid a naming conflict with include/bits/fcntl.handersen2004-07-201-4/+4
| | | | git-svn-id: svn://busybox.net/trunk/busybox@8988 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Larry Doolittle writes:andersen2004-04-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | This is a bulk spelling fix patch against busybox-1.00-pre10. If anyone gets a corrupted copy (and cares), let me know and I will make alternate arrangements. Erik - please apply. Authors - please check that I didn't corrupt any meaning. Package importers - see if any of these changes should be passed to the upstream authors. I glossed over lots of sloppy capitalizations, missing apostrophes, mixed American/British spellings, and German-style compound words. What is "pretect redefined for test" in cmdedit.c? Good luck on the 1.00 release! - Larry git-svn-id: svn://busybox.net/trunk/busybox@8759 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Tito, farmatito at tiscali dot it writes:andersen2004-04-051-31/+32
| | | | | | | | | | | | | | | | | | | | | | Hi to all, I discovered a little bug in hdparm.c (really two little bugs...I've made...sigh! Mea culpa). Some vars were modified only locally and this could lead to wrong results to be displayed with the -I switch and maybe with others. Attached is a patch that fix it ( +88b). Also attached is second patch that reduces the size a little bit: text data bss dec hex filename 27984 624 900 29508 7344 hdparm.o (without bug-fix) 28072 624 900 29596 739c hdparm.o (with bug-fix) 28141 624 900 29665 73e1 hdparm.o (original) but maybe this one can wait as we are in a feature freeze. Ciao, Tito git-svn-id: svn://busybox.net/trunk/busybox@8686 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Tito noticed a printf that should have been a bb_error_msg.andersen2004-03-201-1/+1
| | | | git-svn-id: svn://busybox.net/trunk/busybox@8652 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Fix broken arg parsing (was not passing pointer to items so p, argc, and argvandersen2004-03-191-132/+117
| | | | | | | | were only modified locally). Fix error reporting to properly describe why ioctls fail. git-svn-id: svn://busybox.net/trunk/busybox@8644 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Remove trailing whitespace. Update copyright to include 2004.andersen2004-03-151-3/+3
| | | | git-svn-id: svn://busybox.net/trunk/busybox@8630 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Avoid naming conflict with symbol in newer glibc headersandersen2004-02-141-4/+4
| | | | git-svn-id: svn://busybox.net/trunk/busybox@8479 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Fix compile when CONFIG_FEATURE_HDPARM_GET_IDENTITY is disabledandersen2003-12-121-6/+9
| | | | git-svn-id: svn://busybox.net/trunk/busybox@8081 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Correct Matteo's email addressbug12003-11-281-1/+1
| | | | git-svn-id: svn://busybox.net/trunk/busybox@8010 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Patch from Steven Scholz, fix some warningsbug12003-10-091-1/+1
| | | | git-svn-id: svn://busybox.net/trunk/busybox@7625 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Patch from Tito, size optimisation and fix error in exit code of -Vbug12003-10-091-1056/+1265
| | | | | | | option git-svn-id: svn://busybox.net/trunk/busybox@7619 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Update Matteo Croce's email addressbug12003-09-151-1/+1
| | | | git-svn-id: svn://busybox.net/trunk/busybox@7514 69ca8d6d-28ef-0310-b511-8ec308f3f277
* quiet some noiseandersen2003-08-081-0/+2
| | | | git-svn-id: svn://busybox.net/trunk/busybox@7187 69ca8d6d-28ef-0310-b511-8ec308f3f277