Ignore:
Timestamp:
Jan 1, 2014, 12:47:38 AM (7 years ago)
Author:
Bruno Cornec
Message:
  • Update mindi-busybox to 1.21.1
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.2/mindi-busybox/miscutils/hdparm.c

    r2725 r3232  
    1212 *          - by Mark Lord (C) 1994-2002 -- freely distributable
    1313 */
     14
     15//usage:#define hdparm_trivial_usage
     16//usage:       "[OPTIONS] [DEVICE]"
     17//usage:#define hdparm_full_usage "\n\n"
     18//usage:       "    -a  Get/set fs readahead"
     19//usage:     "\n    -A  Set drive read-lookahead flag (0/1)"
     20//usage:     "\n    -b  Get/set bus state (0 == off, 1 == on, 2 == tristate)"
     21//usage:     "\n    -B  Set Advanced Power Management setting (1-255)"
     22//usage:     "\n    -c  Get/set IDE 32-bit IO setting"
     23//usage:     "\n    -C  Check IDE power mode status"
     24//usage:    IF_FEATURE_HDPARM_HDIO_GETSET_DMA(
     25//usage:     "\n    -d  Get/set using_dma flag")
     26//usage:     "\n    -D  Enable/disable drive defect-mgmt"
     27//usage:     "\n    -f  Flush buffer cache for device on exit"
     28//usage:     "\n    -g  Display drive geometry"
     29//usage:     "\n    -h  Display terse usage information"
     30//usage:    IF_FEATURE_HDPARM_GET_IDENTITY(
     31//usage:     "\n    -i  Display drive identification")
     32//usage:    IF_FEATURE_HDPARM_GET_IDENTITY(
     33//usage:     "\n    -I  Detailed/current information directly from drive")
     34//usage:     "\n    -k  Get/set keep_settings_over_reset flag (0/1)"
     35//usage:     "\n    -K  Set drive keep_features_over_reset flag (0/1)"
     36//usage:     "\n    -L  Set drive doorlock (0/1) (removable harddisks only)"
     37//usage:     "\n    -m  Get/set multiple sector count"
     38//usage:     "\n    -n  Get/set ignore-write-errors flag (0/1)"
     39//usage:     "\n    -p  Set PIO mode on IDE interface chipset (0,1,2,3,4,...)"
     40//usage:     "\n    -P  Set drive prefetch count"
     41/* //usage:  "\n    -q  Change next setting quietly" - not supported ib bbox */
     42//usage:     "\n    -Q  Get/set DMA tagged-queuing depth (if supported)"
     43//usage:     "\n    -r  Get/set readonly flag (DANGEROUS to set)"
     44//usage:    IF_FEATURE_HDPARM_HDIO_SCAN_HWIF(
     45//usage:     "\n    -R  Register an IDE interface (DANGEROUS)")
     46//usage:     "\n    -S  Set standby (spindown) timeout"
     47//usage:     "\n    -t  Perform device read timings"
     48//usage:     "\n    -T  Perform cache read timings"
     49//usage:     "\n    -u  Get/set unmaskirq flag (0/1)"
     50//usage:    IF_FEATURE_HDPARM_HDIO_UNREGISTER_HWIF(
     51//usage:     "\n    -U  Unregister an IDE interface (DANGEROUS)")
     52//usage:     "\n    -v  Defaults; same as -mcudkrag for IDE drives"
     53//usage:     "\n    -V  Display program version and exit immediately"
     54//usage:    IF_FEATURE_HDPARM_HDIO_DRIVE_RESET(
     55//usage:     "\n    -w  Perform device reset (DANGEROUS)")
     56//usage:     "\n    -W  Set drive write-caching flag (0/1) (DANGEROUS)"
     57//usage:    IF_FEATURE_HDPARM_HDIO_TRISTATE_HWIF(
     58//usage:     "\n    -x  Tristate device for hotswap (0/1) (DANGEROUS)")
     59//usage:     "\n    -X  Set IDE xfer mode (DANGEROUS)"
     60//usage:     "\n    -y  Put IDE drive in standby mode"
     61//usage:     "\n    -Y  Put IDE drive to sleep"
     62//usage:     "\n    -Z  Disable Seagate auto-powersaving mode"
     63//usage:     "\n    -z  Reread partition table"
     64
    1465#include "libbb.h"
    1566/* must be _after_ libbb.h: */
     
    383434#define hwif_ctrl          (G.hwif_ctrl              )
    384435#define hwif_irq           (G.hwif_irq               )
     436#define INIT_G() do { } while (0)
    385437
    386438
     
    9711023        if ((like_std > 3) && (val[CMDS_SUPP_1] & 0x0008)) {
    9721024            /* We print out elsewhere whether the APM feature is enabled or
    973                not.  If it's not enabled, let's not repeat the info; just print
    974                nothing here. */
     1025             * not.  If it's not enabled, let's not repeat the info; just print
     1026             * nothing here. */
    9751027            printf("\tAdvancedPM level: ");
    9761028            if ((val[ADV_PWR] & 0xFF00) == 0x4000) {
     
    9871039        }
    9881040    } else {
    989          /* ATAPI */
     1041        /* ATAPI */
    9901042        if (eqpt != CDROM && (val[CAPAB_0] & SWRST_REQ))
    9911043            printf("\tATA sw reset required\n");
     
    20082060    int c;
    20092061    int flagcount = 0;
     2062
     2063    INIT_G();
    20102064
    20112065    while ((c = getopt(argc, argv, hdparm_options)) >= 0) {
Note: See TracChangeset for help on using the changeset viewer.